cberner / fuser

Filesystem in Userspace (FUSE) for Rust
MIT License
835 stars 114 forks source link

write data len always 4096 #252

Closed exFalso closed 1 year ago

exFalso commented 1 year ago

Hello,

We have a custom fuse filesystem implemented using fuser, and I'm looking into performance optimizations. One of the bottlenecks seems to be that on writes the Filesystem always receives small chunks of size 4096, never anything larger. Things I tried:

none of it to any avail. Is there something obvious I'm missing? We're using standard options, default features (libfuse)

GermanCoding commented 1 year ago

Just a guess, but have you checked whether you are properly requesting FUSE_BIG_WRITES? This appears to be only enabled by default if you are increasing the minimum ABI version (i.e. not the default features). https://github.com/cberner/fuser/blob/a9ddc8a7a8cd9f2ba6e7c3bc4c6a76ecad66e6b2/src/lib.rs#L52-L56

You might also need to enable the fuse writeback cache so that it actually buffers more than 4KB.

exFalso commented 1 year ago

Thank you, that was it, with a recent abi version we're getting 128k writes!