distri
distri copied to clipboard
explore fuse optimizations
jacobsa/fuse implements fuse 7.12. Current Linux kernels are at 7.31. Here are a few features which we should look into to possibly improve performance:
- [ ] enable parallel dirops (
FUSE_PARALLEL_DIROPS
) - [ ] permanent caching with invalidation: https://github.com/torvalds/linux/commit/3b463ae0c6264f70e5d4c0a9c46af20fed43c96e (WIP in the
notify
branch) - [ ] increase max_pages: https://github.com/torvalds/linux/commit/5da784cce4308ae10a79e3c8c41b13fb9568e4e0
- [x] symlink caching: https://github.com/torvalds/linux/commit/5571f1e65486be025f73fa6aa30fb03725d362a2
- [ ]
readdir caching: https://github.com/torvalds/linux/commit/6433b8998a21dc597002731c4ceb4144e856edc4(see next item) - [x] no opendir: https://github.com/torvalds/linux/commit/d9a9ea94f748f47b1d75c6c5e33edcf74476c445 (implicitly turns on readdir caching)
- [x] no open: https://github.com/torvalds/linux/commit/7678ac50615d9c7a491d9861e020e4f5f71b594c (implicitly turns on page cache)
- [x] return nil with child inode == 0 instead of ENOENT to cache ENOENT: https://github.com/torvalds/linux/blob/2019fc96af228b412bdb2e8e0ad4b1fc12046a51/fs/fuse/dir.c#L353
- [ ] read from multiple file descriptors? https://john-millikin.com/the-fuse-protocol#multi-threading
We should also figure out a representative benchmark for root file system performance.
We can use bpftrace to measure the number of FUSE calls during builds:
sudo bpftrace -e 'kprobe:fuse_simple_request { @[kstack(perf)] = count(); }'
AFAICT, building pkgs/linux looks bottlenecked on the distri fuse process. Maybe improvements can be measured by compiling pkgs/linux and measuring the time difference.
edit: gtk+-2 might be a better candidate, as it completes in ≈2 minutes instead of ≈10 minutes