Support for tmpdir feature? #17608
Replies: 2 comments 4 replies
-
Beta Was this translation helpful? Give feedback.
-
It's not really clear what's planned from that short description, but I can't really think of anything significant OpenZFS can do better in this area. Linux tmpfs will already grow and shrink according to its contents, so it's only going to compete with the ARC in the sense that it is holding things in memory that other things can't use, but that would be the same for an ARC-backed tmpfs - it wouldn't be able to evict those buffers. Its also likely to be less efficient, because all of ZFS' data structures are designed assuming they need to be read from and written to disk blocks. If you're storing things only in memory, there's much better data structures available. And without any storage behind them, there's really not much of the OpenZFS "specialities" that make any sense. Scrubbing and error correction don't seem to be useful. Snapshots and rollbacks could work but it still all needs to be held in memory. Maybe receiving a snapshot in a network boot kind of situation? I dunno, a squashfs or even a cpio stream is gonna be smaller and easier, I think? And if you really want it, you can build a pool out of tmpfs-backed files or block devices right now. I'd genuinely like to hear real use cases; I couldn't (quickly) find anything about what prompted the bcachefs team to put this on the roadmap. Any pointers? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I read about planned support for tmpdir in bcachefs and it sound like a very cool feature. Would be nice to have something like this in ZFS. Basically make certain directories behave as temporary files storage - no ZIL, no metadata stored, spill data to disk on memory pressure, similar to tmpfs. Right know I use tmpfs for /var/tmp in gentoo for all compilations which competes for memory pages with ZFS ARC. Having this feature will make it very attractive to just use 'normal' ZFS directory for this with gain ARC efficiency.
https://bcachefs.org/Roadmap/#tmpdir_support
The downside I can see is additional complexity, ZFS already have a lot of code path for various special case operations. I very interested in other people and devs opinion about this.
Beta Was this translation helpful? Give feedback.
All reactions