Ubuntu – Why doesn’t /tmp use tmpfs

filesystemtmptmpfs

I have loads of RAM and I use very little. I also do record some screencasts with gtk-recordmydesktop, which by default saves to /tmp while recording. I assumed that it would mean storing to RAM as much as possible, but then I actually checked and found that /tmp isn't mounted with tmpfs. Why is that?

Best Answer

I think you answered your own question. A lot of programs use /tmp for storing temporary files, and they can be huge.

For example Brasero defaults to that directory to store a CD/DVD's image file, which can be 4.7 GB of size. It's not worth risking a serious slowdown (or a system lockup) in an out of memory situation if your RAM and swap get full.

For advanced users it's no problem to change some applications' defaults and mount /tmp as tmpfs. For general use it's just not worth the risk I guess.