Hi,

On 5/8/24 07:05, Russ Allbery wrote:

It sounds like that is what kicked off this discussion, but moving /tmp to
tmpfs also usually makes programs that use /tmp run faster.  I believe
that was the original motivation for tmpfs back in the day.

IIRC it started out as an implementation of POSIX SHM, and was later generalized. The connection to SHM is still there -- POSIX SHM only works if a tmpfs is mounted anywhere in the system. Canonically, a tmpfs is mounted on /dev/shm for that purpose, but if /tmp is a tmpfs, then /dev/shm doesn't need to exist.

I agree that it makes a lot of things run faster (especially compiling, which creates temporary files in /tmp), but it has also caused situations that required pressing SysRq to resolve (also during compiling).

For /var/tmp, I think the primary motivation to garbage-collect those
files is that filling up /var/tmp is often quite bad for the system.  It's
frequently not on its own partition, but is shared with at least /var, and
filling up /var can be very bad.  It can result in bounced mail, unstable
services, and other serious problems.

When /var runs full, the problem is probably initrd building.

Taking a quick look around all my machines, the accumulated cruft in /var/tmp is on the order of kilobytes -- mostly reportbug files, and a few from audacity -- and these machines have not been reinstalled in the last ten years.

   Simon

Reply via email to