From 8671be1ef2f5087b29dc327168335d3f6485b391 Mon Sep 17 00:00:00 2001 From: Thomas Waldmann Date: Thu, 10 Dec 2015 10:09:06 +0100 Subject: [PATCH] Increase FUSE read_size to 1024. From https://github.com/borgbackup/borg/pull/480 discussion: Did you try 1024 (linux cache block size) or 4096 (internal sector size of bigger hdds, also used in msgpack fallback.py as lower bound, see link)? I've tested different values - 512 and 1024 are slightly better than 4096 in my case. read_size = 1 ls -laR: 75.57 sec read_size = 64 ls -laR: 27.81 sec read_size = 512 ls -laR: 27.40 sec read_size = 1024 ls -laR: 27.20 sec read_size = 4096 ls -laR: 30.15 sec read_size = 0 ls -laR: 442.96 sec (default) OK, maybe we should go for 1024 then. That happens to be < MTU size, so in case someone works on NFS (or other network FS) we will have less reads, less network packets, less latency. --- borg/fuse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/borg/fuse.py b/borg/fuse.py index 3b2eefa0f..448fe02a4 100644 --- a/borg/fuse.py +++ b/borg/fuse.py @@ -28,7 +28,7 @@ class ItemCache: def get(self, inode): self.fd.seek(inode - self.offset, io.SEEK_SET) - return next(msgpack.Unpacker(self.fd, read_size=512)) + return next(msgpack.Unpacker(self.fd, read_size=1024)) class FuseOperations(llfuse.Operations):