mirror of
https://github.com/trapexit/mergerfs.git
synced 2026-11-30 20:06:52 -05:00
Add fuse-read-spin-us: poll /dev/fuse briefly before blocking
After handling a request, a sync read thread polls its /dev/fuse fd for up to fuse-read-spin-us microseconds before blocking in read(). Default 0 (disabled). Measured at 50us (tmpfs branch, direct_io): sequential 128K/1M reads +27-32%, 128K writes +14%, metadata walks +24-32%; no change on 8 parallel streams or 1M writes. Costs roughly one core on a busy-but-quiet mount, nothing when idle.
This commit is contained in:
parent
54166afe08
commit
76d3990776
7 changed files with 84 additions and 8 deletions
|
|
@ -116,6 +116,7 @@ Config::Config()
|
|||
posix_acl(false),
|
||||
process_thread_count(fuse_cfg.process_thread_count),
|
||||
process_thread_queue_depth(fuse_cfg.process_thread_queue_depth),
|
||||
fuse_read_spin_us(fuse_cfg.read_spin_us),
|
||||
proxy_ioprio(false),
|
||||
read_thread_count(fuse_cfg.read_thread_count),
|
||||
readahead(0),
|
||||
|
|
@ -172,6 +173,7 @@ Config::Config()
|
|||
posix_acl.ro =
|
||||
process_thread_count.ro =
|
||||
process_thread_queue_depth.ro =
|
||||
fuse_read_spin_us.ro =
|
||||
read_thread_count.ro =
|
||||
scheduling_priority.ro =
|
||||
true;
|
||||
|
|
@ -276,6 +278,7 @@ Config::Config()
|
|||
_map["posix-acl"] = &posix_acl;
|
||||
_map["process-thread-count"] = &process_thread_count;
|
||||
_map["process-thread-queue-depth"] = &process_thread_queue_depth;
|
||||
_map["fuse-read-spin-us"] = &fuse_read_spin_us;
|
||||
_map["proxy-ioprio"] = &proxy_ioprio;
|
||||
_map["read-thread-count"] = &read_thread_count;
|
||||
_map["readahead"] = &readahead;
|
||||
|
|
|
|||
|
|
@ -153,6 +153,7 @@ public:
|
|||
ConfigBOOL posix_acl;
|
||||
TFSRef<int> process_thread_count;
|
||||
TFSRef<int> process_thread_queue_depth;
|
||||
TFSRef<u64> fuse_read_spin_us;
|
||||
ProxyIOPrio proxy_ioprio;
|
||||
TFSRef<int> read_thread_count;
|
||||
ConfigU64 readahead;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue