Mailinglist Archive: opensuse-factory (435 mails)

< Previous Next >
Re: [opensuse-factory] Proposal: /tmp as tmpfs
Le jeudi 16 juillet 2020 à 10:16 +0200, Jiri Slaby a écrit :
On 10. 07. 20, 18:00, Thorsten Kukuk wrote:
On Fri, Jul 10, Jan Engelhardt wrote:

/tmp is one of the weirder places in a system.

It is nice that FHS says it is not persistent across reboots, but
if you have a
workstation or server which is "never" (or at least, seldomly)
rebooted, the
directory can still fill up - and take away RAM from both oneself
and other
users.

We analyzed many systems for that. On standard servers (if the
admin
does not do stupid things like storing many installations DVD in
/tmp
or so or use it as Desktop), /tmp is nearly empty.

Not sure what servers you are talking about, but one of our
development
servers:
# uptime
09:53:46 up 156 days 9:43, 5 users, load average: 0.13, 0.31,
0.25
# du -sh /tmp/
30G /tmp/

Firefox for example has the very bad habit of dumping all its
.xpi file
downloads into /tmp, and not cleaning them.

Firefox is the only left over application writing things in /tmp
and
don't clean up for a long time on standard installations.
The second one is "go", if you abort the build process. But that's
the
exception.

Sure. If you use only firefox and go.

So after all those 8 years, firefox is not fixed yet, right? I really
don't like the idea that after a quick reboot or kexec I can no
longer
open documents from download history. Yes, let's fix firefox first
(at
last).

Users have bad habit :^) in abusing /tmp as the shortest way to
store a file in
a known location for some time - because any other location would
be persistent
(but /tmp might be too heh) and the path much longer.

Now they have to learn that they have a home directory for storing
files
and /tmp was always a bad idea.

Why would I store an iso file to ~? I usually need it exactly 3
seconds:
to do a loop mount. 3 seconds is temporary enough, isn't it?

Why not use /var/tmp ?

Or firefox downloads for me kernel-debuginfo (over 1G) and I *open*
it
in Ark (not save it). So it ends up in /tmp/ too (see above).

So no, /tmp still should not be a tmpfs by default for everybody:
1) there are still brand new machines with only 1G of RAM installed.
2) /tmp is used for storing large files by users or firefox.

It would make sense to fix Firefox to use /var/tmp instead of /tmp for
such case (or XDG_CACHE_DIR).

In sum, there are scenarios where /tmp on tmpfs makes sense. Like
machines with big enough RAM. So make it default on those and opt-in
during installation too.

15 years ago, in Mandriva/Mandrake Linux, for some security sensitive
setup, we were setting TMPDIR to $HOME/tmp (which was causing some
issues for applications which were expecting TMPDIR = /tmp, like ORBit
but those were fixed). I'm wondering if we should use it on openSUSE ?

--
Frederic Crozat
Release Manager SUSE Linux Enterprise
SUSE



< Previous Next >
This Thread