浏览代码

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.
Thomas Waldmann 10 年之前
父节点
当前提交
8671be1ef2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      borg/fuse.py

+ 1 - 1
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):