Mailinglist Archive: opensuse-features (291 mails)

< Previous Next >
[openFATE 309448] Clean temporary data in SUSE
  • From: fate_noreply@xxxxxxx
  • Date: Thu, 6 May 2010 11:20:29 +0200 (CEST)
  • Message-id: <feature-309448-15@xxxxxxxxxxxxxx>
Feature changed by: Michal Vyskocil (mvyskocil)
Feature #309448, revision 15
Title: Clean temporary data in SUSE

openSUSE-11.3: Unconfirmed
Priority
Requester: Mandatory

Requested by: Michal Vyskocil (mvyskocil)

Description:
The current default behavior of SUSE is not touch files in /tmp and
others to prevent an unwanted data lost. There are at least two
requests willing to change it somehow:
* FATE#307510: Cron: set MAX_DAYS_IN_TMP different from 0
* bug#594778 - RN: include tmpwatch in a pattern
The pros:
* The common meaining of /tmp is that is for temporary data. FHS says -
"Programs must not assume that any files or directories in /tmp are
preserved between invocations of the program". FHS also allows the
removal of a content of /var/tmp and /var/cache , even if those
directories should be more persistent as /tmp .
* As SUSE places the /tmp and /var on root partition by default and not
remove the content of it, the free space should be simply eaten. There
are a lot of applications in SUSE distribution that stores a lot of
data inside those dirs, but because of the common meaning - they not
removed them. For instance - Mozilla Firefox, ssh, gpg, kde, mc, Adobe
Flash, and many others. The other way is to fix all of those programs
to safely remove all content they store in /tmp after it's not needed.
The cons:
* Strictly speaking the not removal of /tmp and others is not againts
FHS.
* Change of the default is dangerous, especially if we are talking about
files removal, because long time SUSE users might rely on this specific
behavior of SUSE.
* The default should be SAFE and not removing of files is considered as
a safe default.
Please note this FATE is not about concrete technical solution
(existing scron script, tmwatch, tmpfs, /dev/shm, or something else).
The question is - change the default behavior to remove temporary
files, or not ? And if so, which ones and how often.

Discussion:
#1: Per Jessen (pjessen) (2010-05-04 11:31:51)
I'm not really sure how this differs from feature 307510, but never
mind - the only advantage of this change is to save disk space. Disk
space is becoming cheaper by the minute and Terabyte is no longer an
exotic amount reserved for large datacentres. I say we keep the safe
default in openSUSE, and leave it to the sysadmin to do the one-line
change if he or she wants to automatically purge temporary files.

#3: Michal Vyskocil (mvyskocil) (2010-05-04 12:00:54) (reply to #1)
The biggest reason is that this FATE does not recommend the technical
solution.
You're not right, the advantage is to prevent the filling of the disc
on a running system. Your argument about cheaper disc space is true
only if you consider new and new hardware. The existing one has
typically fixed amount of disc space, should not be wasted by having a
lot of unwanted data in /tmp . For instance my five year old laptop has
40GB HDD and 7GB root partition, so it is very sensitive on available
space - not all SUSE are in datacenters :-).

#5: Per Jessen (pjessen) (2010-05-05 13:25:22) (reply to #3)
So for five years you have (presumably) managed quite well without this
default setting. My argument about cheaper disk space has held true
since around 2000 when disk sizes started doubling about once a year
due to GMR. Not having temporary files purged was not an issue then, I
see no reason why it is likely to become an issue now or later (with
disk sizes continuing to grow). Neither openSUSE nor SuSE Linux have
ever done such an automatic purge by default, so I maintain it is not a
safe change as people may well have gotten used to keeping non-
temporary data in /tmp.
Given the minimal advantage, the risk of deleting non-temporary data
and that changing the retention time is a matter of five seconds with
vi, this is really not much of a feature. IMHO.

#2: Guido Berhörster (gberh) (2010-05-04 11:41:11)
Cleaning /tmp on bootup and/or periodically through a cronjob is also
common practice on all other major Linux distros (e.g. Debian, Ubuntu,
RHEL/Fedora, Mandriva) and UNIX(-like) OS (e.g. Solaris/Opensolaris,
OpenBSD).
I'd also really like to hear any use cases and reasons why users would
put any valuable data in /tmp (rather than /var/tmp or their homedir)
and expect it to persist indefinitely.

#4: Gerald Pfeifer (geraldpfeifer) (2010-05-04 13:25:25)
It's not necessarily (just) about disk size, there is also the aspect
of partitioning and /tmp may not be all that large.
It's also not primarily about data centers (which is not the key focus
of openSUSE), but more individual users or wide spread use not
necessarily governed by professional admins, and there this just
reduces risk assuming we go for a somewhat conservative default (not
just 24 hours). The use case is my significant other's machine (or
mine), not some data center.
For what it's worth, I, for one, don't want to keep all the crap that
tends to pile up under /tmp for years.
And non-expert users, of which we have many, will be surprised what
kind of staff remains under /tmp, leaving behind a trail many won't be
aware of, remaining even after months or years.

#6: Per Jessen (pjessen) (2010-05-05 13:35:35) (reply to #4)
Well, the non-expert user is exactly who I am worried about and why I
think this feature is unsafe The non-expert user won't be aware of how
the professional sysadmins would like to run things, and might just
(intentionally or not) store or have stored valuable data in /tmp.
Oops.
Besides, I disagree about the use case - my use case is my datacentre
run by professional sysadmins. (who decided what the primary target
audience for openSUSE is? I thought we were still aiming to be
everything for everyone.)

#7: Guido Berhörster (gberh) (2010-05-05 13:51:08) (reply to #6)
The non-expert user will store his data in /home/non-expert where these
neatly named folders Documents, Music, Pictures etc. are. But he will
fill slowly fill up his 10G rootfs by opening lots of pdfs, mp3s,
archives etc. from Firefox (which are put into /tmp and never get
deleted) without being aware of it , let alone how to avoid this in the
first place.

#8: Per Jessen (pjessen) (2010-05-05 14:07:39) (reply to #7)
I'm less concerned about the new non-expert user, more about the OLD
ditto who had already been using e.g. /tmp for storing non-temp data.
For him this would not be a safe change, even if it was bent in neon in
the Changelog. (as for Firefox using /tmp - my FF3.6 doesn't seem to
store anything there?)

+ #9: Michal Vyskocil (mvyskocil) (2010-05-06 11:20:21) (reply to #8)
+ > I'm less concerned about the new non-expert user, more about the OLD
+ ditto who had already been using e.g. /tmp for storing non-temp data.
+ Are there any serious reasons why those data needs to be stored in /tmp
+ and should not be placed elsewhere in system? I'm sure that expert you
+ mention is fully able to understand the meaning of /tmp and place his
+ files to other safe location. Or at least disable this behavior.
+ As I understood your arguments - there is a bug (or rather an uncommon
+ behavior of SUSE, if you'd preffer it), but because some people rely on
+ that, so it might be not fixed/changed. And sorry, but that's not seems
+ to me as a right argumentation.



--
openSUSE Feature:
https://features.opensuse.org/309448

< Previous Next >
This Thread
References