The third mitigating feature the article forgot to mention is that tmpfs can get paged out to the swap partition. If you drop a large file there and forget it, it will all end up in the swap partition if applications are demanding more memory.
buckle8017 · 21m ago
Which is a great reason to have a big swap file now.
palmfacehn · 57m ago
If I am satisfied with my disk speed, why would I want to use system memory? What are the specific use cases where this is warranted?
margalabargala · 32m ago
Computers like a Raspberry Pi, where the OS is on a sdcard, will hugely benefit.
jauntywundrkind · 25m ago
Yup. There's lots of advice about how to reduce cycle count, increase lifetime of sd cards out there. This post has a bunch of ideas, and tmpfs is definitely on the list. https://raspberrypi.stackexchange.com/a/186/32611
techjamie · 41m ago
Technically it'll have some impact on the number of write cycles your disk goes through, and marginally reduce the level of wear.
Most disks have a lot of write cycles available that you'll be fine anyway, but it's a tiny benefit.
GCUMstlyHarmls · 1h ago
Actually quite handy and practical to know about, specifically in the context of a "low end box" where I personally would prefer that RAM exist for my applications and am totally fine with `/tmp` tasks being a bit slow (lets be real, the whole box is "slow" anyway and slow here is some factor of "vm block device on an ssd" rather than 1990s spinning rust).
ComputerGuru · 25m ago
I feel like this is mixing agendas. Is the goal freeing up /temp more regularly (so you don’t inadvertently rely on it, to save space, etc) or is the goal performance? I feel like with modern nvme (or just ssd) the argument for tmpfs out of the box is a hard one to make, and if you’re under special circumstances where it matters (eg you actually need ram speeds or are running on an SD or eMMC) then you would know to use a tmpfs yourself.
(Also, sorry but this article absolutely does not constitute a “deep dive” into anything.)
renewiltord · 33m ago
Why is there no write through unionfs in Linux? Feels like a very useful tool to have. Does no one else need this? Have half a mind to write one with an NFS interface.
File is tmpfs will swap out if your system is under memory pressure.
If that happens, reading the file back is DRAMATICALLY slower than if you had just stored the file on disk in the first place.
This change is not going to speed things up for most users, it will slow things. Instead of caching important files, you waste memory on useless temporary files. Then the system swaps it out, so you can get cache back, and then it's really slow to read back.
This change is a mistake.
saurik · 22m ago
Why is reading the data back from swap be slower at all -- much less "DRAMATICALLY" so -- than saving the data to disk and reading it back?
cwillu · 14m ago
Because swapping back in happens 4kb at a time
imp0cat · 21m ago
Most systems probably aren't having problems with insufficient RAM nowaday though, do they? And this will reduce wear on your SSD.
Most disks have a lot of write cycles available that you'll be fine anyway, but it's a tiny benefit.
(Also, sorry but this article absolutely does not constitute a “deep dive” into anything.)
If that happens, reading the file back is DRAMATICALLY slower than if you had just stored the file on disk in the first place.
This change is not going to speed things up for most users, it will slow things. Instead of caching important files, you waste memory on useless temporary files. Then the system swaps it out, so you can get cache back, and then it's really slow to read back.
This change is a mistake.
Also, you can easily disable it: https://www.debian.org/releases/trixie/release-notes/issues....