Comment by cogman10
> in /tmp
Why is `/tmp` on disk and not a tmpfs mount?
> in /tmp
Why is `/tmp` on disk and not a tmpfs mount?
That is one of the reason why we should still have swap space.
> Why would I want it on tmpfs?
It's now there in several distros by default. Not that it answers your question.
There is no law that says /tmp must be on tmpfs, and historically this wasn't done, because tmpfs is limited in size to some faction of the kernel's memory, while /tmp may be used to store much larger files.
For example, GNU sort can sort arbitrarily large input files, which is implemented by splitting the input into sorted chunks that are written to a temporary directory, /tmp by default. But this is based on the assumption that /tmp can store significantly larger files than fit in memory, otherwise the point is moot. So using tmpfs makes /tmp useless for this type of operation.
In the end, it's a trade-off between performance and disk space. I also prefer to mount /tmp on tmpfs for performance reasons, but you should not assume that this is the case on all systems.