[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Moving /tmp to tmpfs makes it useless



2012/5/25 Russ Allbery wrote:

> 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.

I agree, not everybody read FHS, some software may have bugs.

According to FHS these should go to /var/run (or /run, if you like).
I mean, if you want to fix this, you should move those files to /run,
you should not turn /tmp into /run because of them.

But even as it is - it's not a big problem. Those files are small, they
almost never change, cause no disk writes, no performance issues, and
having them on disk adds no problems for users.

> Other common examples are mail clients or web browsers saving files
> temporarily so that they can pass them to external viewers.

Those files can be large, especially those opened from browsers (I've seen
a lot of users watching movies and opening archives that way). So these
files should be really stored on disk.

> 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.)

One more reason to move those files to /run.

-- 
  Serge


Reply to: