Commit 99f262dd authored by Levin Zimmermann's avatar Levin Zimmermann Committed by Kirill Smelkov

bigfile/zodb: Make auto 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 'auto' (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.

/reviewed-by @kirr
/reviewed-on nexedi/wendelin.core!20
parent d6628427
......@@ -492,7 +492,7 @@ ZBlk_fmt_registry = {
}
# 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', 'auto')
if ZBlk_fmt_write not in ZBlk_fmt_registry:
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