]> arthur.barton.de Git - bup.git/commit
hashsplit: increase READ_SIZE to 8 MB
authorJohannes Berg <johannes@sipsolutions.net>
Tue, 28 Apr 2020 21:11:16 +0000 (23:11 +0200)
committerRob Browning <rlb@defaultvalue.org>
Sun, 13 Jun 2021 16:32:17 +0000 (11:32 -0500)
commit81ac722759e54e6503dfcded5b4dc65ec9309250
tree59ca6a818b192d2ff620cc7fd70ddfada90834ec
parent3c0f10081bf995b16c26a9ed94607dae1375030f
hashsplit: increase READ_SIZE to 8 MB

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>
lib/bup/hashsplit.py