3 ms·
I don’t think the point about disk wear is true. ZFS is a block-based CoW filesystem already, so the “erase” is actually something more like “make a new metadat
by jbott 3y ago
I don’t think the point about disk wear is true. ZFS is a block-based CoW filesystem already, so the “erase” is actually something more like “make a new metadata entry that points to an earlier state snapshot”. Plus, I’d expect normal disk usage (ie. chrome disk cache) probably far outweighs any disk wear you’d get from the (relatively) small size of files you get written into /.
Unless you’re working on a server with a ton of ram, I also think using tmpfs is more likely to shoot yourself in the foot with excess memory pressure. I don’t know of a way for the kernel to free memory if you write a huge file to the tmpfs partition by mistake, unless you use swap, and then you have the problems that come with that.
Tmpfs might be faster though!
- yjftsjthsd-h 3y ago> tmpfs is more likely to shoot yourself in the foot with excess memory pressure It defaults to 50% of physical RAM, but you can set the size option to whatever you want: https://www.kernel.org/doc/html/latest/filesystems/tmpfs.html https://www.kernel.org/doc/html/latest/filesystems/tmpfs.htm... (So yes, something to consider, but totally possible to mitigate)
- jbott 3y agoTIL!
- SkyMarshal 3y agoYou do need enough RAM for this, though RAM is relatively cheap these days.