Repository navigation
perf(fuse): replace github.com/jacobsa/fuse with sync.Pool-backed fuse-pool - #5276
kislaykishore wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request replaces the core dependency github.com/jacobsa/fuse with a personal fork github.com/kislaykishore/fuse-pool in go.mod and updates go.sum accordingly. The reviewer raised a valid concern regarding the maintenance, security, and supply-chain risks of using a personal fork in a production-grade repository, suggesting that the optimizations be upstreamed or the fork be hosted under an official organization namespace.
| google.golang.org/genproto/googleapis/rpc v0.0.0-20261019180522-ce908d29299b // indirect | ||
| ) | ||
|
|
||
| replace github.com/jacobsa/fuse => github.com/kislaykishore/fuse-pool v0.0.0-20261111125536-4cc6b567a4b7 |
There was a problem hiding this comment.
Replacing a core dependency (github.com/jacobsa/fuse) with a personal fork (github.com/kislaykishore/fuse-pool) introduces potential maintenance, security, and supply-chain risks for a production-grade repository. To ensure long-term support, security compliance, and proper vetting, please consider upstreaming these performance optimizations directly to the original repository, or hosting the fork under an official organization namespace.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## perf/file-inode-memory-opt #5276 +/- ##
==============================================================
- Coverage 85.27% 85.24% -0.03%
==============================================================
Files 181 181
Lines 19992 19965 -27
==============================================================
- Hits 17048 17020 -28
- Misses 2943 2944 +1
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
Replace
github.com/jacobsa/fusewithgithub.com/kislaykishore/fuse-pool(v0.0.0-20261111125536-4cc6b567a4b7,grpc-cpu-optbranch) viago.modreplaceto eliminate unbounded idle FUSE buffer retention after concurrency bursts and reduce per-op allocations:jacobsa/fuse's mutex-guardedfreelist.Freelist([]unsafe.Pointer) forbuffer.InMessage(~1.05 MiBeach) andbuffer.OutMessagewithsync.Pool, allowing Go's garbage collector to reclaim idle FUSE request/response buffers across two GC cycles instead of pinning peak-concurrency buffers for the lifetime of the mount.cancelFuncsmap onfuse.Connectionwithsync.Map, embedcontext.Contextdirectly inopStateto avoid per-opcontext.WithValuewrapper allocations, use inlineOutMessagestorage, and use stack-backediovecslices (capped atIOV_MAX) inwritev.orbax_checkpoints, 128-threadwarm_mount.py), idlebuffer.NewInMessageheap retention drops from134.88–139.53 MBto1.16 MB(-99.1%), reducing whole-process Goinuse_spaceacross the full optimization stack (perf(inode): compact lookupCount from 24-byte struct to 8-byte int64 #5217, perf(lru): switch internal/cache/lru to github.com/google/go-lru ArenaRadixCache #5250, perf(inode): replace syncutil.InvariantMutex with sync.Mutex in FileInode #5218, perf(inode): replace embedded MinObject with compact fileSourceMetadata in FileInode #5212, and this PR) from209.05 MBto62.34 MB(-70.2%) afterReadDirwarm-up and from292.28 MBto107.34 MB(-63.3%, with-49.9%inuse_objectsand-36.7%OSPss_AnonRSS) afterReadDir+Statwarm-up.Link to the issue in case of a bug fix.
b/582117175
Testing details
make build, and benchmarked mountedpprof(inuse_space,inuse_objects) and/proc/<pid>/smaps_rollup(Rss,Pss,Pss_Anon) across 100k-objectReadDirandStatwarm-up runs on GCE (c4-standard-96).go test -race ./cmd/... ./internal/mount/... ./internal/fs/wrappers/...and live FUSE mount tests ingo test -race ./internal/fs -run 'TestNotifier|TestReadDirPlus'.Any backward incompatible change? If so, please explain.
N/A