On 05/24/2017 08:16 AM, Ian Zimmerman wrote:
So what are gentoo users' opinions on this matter of faith?

I have long been in the camp that thinks tmpfs for /tmp has no
advantages (and may have disadvantages) over a normal filesystem like
ext3, because the files there are normally so small that they will stay
in the page cache 100% of the time.

But I see that tmpfs is the default with systemd.  Surely they have a
good reason for this? :)

Their reason is described here:

  https://www.freedesktop.org/wiki/Software/systemd/APIFileSystems

It seems that they consider it an important *default* to have /tmp exist even if nothing else exists yet during boot-up.

Normally I wouldn't care too much whether /tmp is tmpfs or not. The only cases where I do care, is when unpacking a huge tarball with contents I didn't intend to keep around. But I stopped doing that in /tmp anyway. I have my own ~/tmp for that now. When using /tmp for that, you need to rm -rf what you don't need anymore, since it eats up RAM.

Another case is when I download something big that I intend to install (*.bin installers) or unpack into a final location on disk. In those cases, /tmp on tmpfs helps since it lowers disk fragmentation: you download it to RAM, then install to disk.


Reply via email to