Re: Moving /tmp to tmpfs makes it useless
Serge <firstname.lastname@example.org> writes:
> What's a temporary file? Really, why would applications temporarily
> store its data in a file? They do that to *free some memory*. Placing
> those files back to memory renders the whole process of writing the file
> useless. If the files are small and can stay in memory why would
> application save it to file?
Every file that exists in /tmp on the system from which I'm writing this
exists there not because the application is saving memory but because the
application needs to share that file with other applications. That
includes a bunch of Kerberos ticket caches, several X server IPC
rendezvous points, gnupg-agent and ssh-agent data, and a bunch of UNIX
domain sockets for ORBit.
Other common examples are mail clients or web browsers saving files
temporarily so that they can pass them to external viewers.
Putting /tmp in tmpfs provides some mild benefits for file-based Kerberos
ticket caches since they're automatically wiped on reboot. (Using a more
sophisticated cache such as keyrings has even nicer benefits, but aren't
fully supported by all applications yet.)
Russ Allbery (email@example.com) <http://www.eyrie.org/~eagle/>