Mar 30, 2012

/tmp as tmpfs for openSUSE?

Frederic informed the openSUSE factory list that upstream systemd is going to use tmpfs for the /tmp filesystem by default soon. Lennart Poettering has posted a blog entry describing this and gives also some recommendations on how to use /tmp. Debian has recently made the switch and Fedora is considering it as well. A major benefit would be "By implementing this we, by default, generate less IO on disks. This increases SSD lifetime, saves a bit of power and makes things a bit faster."

A lot of openSUSE users argued that this is fine for systems with lots of memory - and some users already run their openSUSE installation with /tmp on tmpfs - but not good for tight memory since both tmpfs and applications will use the main memory.

A couple of ideas where discussed and it seems that openSUSE - at least for openSUSE 12.2 - will do the following:
  • For system daemons, we turn on PrivateTmp in systemd .services files where applicable so that each daemon has its own private tmp directory (for details see the Fedora proposal)
  • For users, we consider to give each user a separate $TMPDIR directory.
It should be possible to setup /tmp as tmpfs but the default for now should stay the same.

There's still some discussion going on and it might be that in the future openSUSE switches. But before that, we have to evaluate applications and how they use /tmp since many place large data there (e.g. gcc and binutils can easily place 4GB during linking there). Once it's clear where what kind of data belongs (see Lennart's blog entry for a recommendation) and packages are fixed, it's IMO time to reconsider this.
Would you want tmpfs on your system in the future?