Commit c57b4395 authored by Levin Zimmermann's avatar Levin Zimmermann

bigfile/zodb: Make h format the default

If a user doesn't explicitly declare a ZBlk format, it can be assumed
that this user wants to have the best ratio between consumed storage space
and data access speed. Currently the best ratio between these two is
provided by the new 'h' (heuristic) format. In case of small appends this
format helps reducing storage space, and in any other case it just
behaves like ZBlk0 [1]. Therefore this default ensures a fast access speed [2],
but also avoids a massive data growth in case of many small appends [3].

[1] An exception to this is: in its current implementation a block
behaves like ZBlk1 (slow access) in case it isn't fully filled up yet.

[2] As this was stated as a reason why ZBlk1 as a default format was
reverted in nexedi/wendelin.core@0b68f178.

[3] This was perhaps the reason why ZBlk1 was set to be the default format
in nexedi/wendelin.core@9ae42085. The massive
storage space consumption can already be a problem with few array to
which regularly small data is appended to, as it can easily happen with
Wendelin development instances.
parent 5d392ca7
...@@ -483,7 +483,7 @@ ZBlk_fmt_registry = { ...@@ -483,7 +483,7 @@ ZBlk_fmt_registry = {
} }
# format for updated blocks # format for updated blocks
ZBlk_fmt_write = os.environ.get('WENDELIN_CORE_ZBLK_FMT', 'ZBlk0') ZBlk_fmt_write = os.environ.get('WENDELIN_CORE_ZBLK_FMT', 'h')
if ZBlk_fmt_write != "h" and ZBlk_fmt_write not in ZBlk_fmt_registry: if ZBlk_fmt_write != "h" and ZBlk_fmt_write not in ZBlk_fmt_registry:
raise RuntimeError('E: Unknown ZBlk format %r' % ZBlk_fmt_write) raise RuntimeError('E: Unknown ZBlk format %r' % ZBlk_fmt_write)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment