by aargh_aargh · 2y ago · 0 comments
IIRC, I used py9p and the python experience was much nicer than fuse-python. You can mount a 9p service via FUSE (9pfuse) if you want. I just used the kernel v9fs client. If you're just looking to pass a filesystem through the network, I think I used the diod 9p server.
Overall, it's a nice little ecosystem to explore.
I have some notes here [1], but it's mostly just linking to primary sources. FUSE is great, but 9P is more general and has high quality implementations all over the place, even in Windows!
One thing I'm not so sure about is the performance properties of 9p. I've seen some places indicate it's rather slow, but nothing definitive. Does anyone have any benchmarks or info on that?
[0]: https://github.com/chaos/diod/blob/master/protocol.md [1]: https://athenaeum.wiki/Zettelkasten/9p
I also found this[2] from 2016 which points out some performance barriers, and it doesn't sound like an easy fix without some new extensions.
However there's also this[3] post from 2022 about some patches suggesting a 10x improvement in Linux 9p performance.
Would be interesting to see how things are these days.
[1]: https://www.usenix.org/legacy/events/usenix05/tech/freenix/f...
If yes, do you still use it today or why did you stop?
Do you know if it’s possible to mount one’s own 9P servers under Windows? I seem to remember a comment from a Microsoft employee on GitHub something-or-other that said that capability is private to WSL2, but I can’t find it right now.
One of the things I ran in to that made it painful, was that the block sizes for FUSE were really small, it made for a lot of latency and churn of HTTP calls to the back end that ended up needing some fairly complicated caching/pre-reading logic to handle. Kernel read-ahead logic never seemed to kick in (and I didn't do any investigation in to that at the time, other than not finding any particular way to induce it)
2) You can rechunk it in your HTTP client to make fatter HTTP requests: https://go.dev/talks/2013/oscon-dl.slide#51 -- there is even a way in FUSE of pushing the fatter results into the kernel page cache to minimize overhead of coming reads: https://pkg.go.dev/bazil.org/fuse#Conn.NotifyStore
can read the faq in https://virtio-fs.gitlab.io
When I played with 9P, this version of py9p was what worked to share a directory so a NetBSD client could mount it. It worked natively with https://man.netbsd.org/mount_9p.8 without an external client. The important difference from diod was that py9p could speak 9P2000.u, which NetBSD understood, while diod only spoke 9P2000.L.