It's not really possible to run bup with tiny amounts of memory,
so reading 1 MB or 8 MB doesn't make a significant difference
here.
However, python actually implements read() as mmap() (at least
on my Linux system), with the requested read size given to mmap
as the size. The kernel then doesn't appear to do any readahead
(which makes sense), which kills performance.
Even if this wasn't the case though, read() of 8MB isn't much
of an issue, so increase the size.
Note that 8 MB is also the size for the fadvise() code.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
_fmincore = getattr(helpers, 'fmincore', None)
BLOB_MAX = 8192*4 # 8192 is the "typical" blob size for bupsplit
-BLOB_READ_SIZE = 1024*1024
+BLOB_READ_SIZE = 8 * 1024 * 1024
MAX_PER_TREE = 256
progress_callback = None
fanout = 16