Subject: Re: CVS commit: basesrc
To: Thilo Manske <Thilo.Manske@HEH.Uni-Oldenburg.DE>
From: Robert Elz <kre@munnari.OZ.AU>
List: source-changes
Date: 03/08/2000 03:54:26
Date: Tue, 7 Mar 2000 17:16:54 +0100
From: Thilo Manske <Thilo.Manske@HEH.Uni-Oldenburg.DE>
Message-ID: <20000307171654.E25607@WintelKiller.HEH.Uni-Oldenburg.DE>
| Well, since nearly nothing except vi uses /var/tmp in the proper way
| (i.e. for stuff that may be of need for longer than a few minutes)
That's never really been the "proper way". Originally there was just /tmp.
They was often too small, so /usr/tmp was added as an alternative for
things that were too big for /tmp. (/usr/tmp later transformed to /var/tmp).
After that, /tmp was made into a "clear at boot" system and editor
temp files were moved to /usr/tmp. And then taking advantage of that,
/tmp became often mounted via MFS (which forces clear at boot).
These days, generally /tmp is for things that are small, prefer fast
access, and truly transient. If any of those assumptions are
violated, /var/tmp is the better choice.
| my /tmp has about twice as much space free as my /var/tmp, e.g.
I suspect that is the unusual case.
| Most programs (tar, pax, compiler stuff, many, many packages - nearly
| everything except updateddb.csh?) use /tmp as default to store their
| temporary files
sort doesn't. sort and updatedb are the two which have a tendancy to
generate huge files (sometimes).
| ---often larger than the average stuff updatedb.csh creates---
You must have small filesystems - the updatedb files I've seen
can run to hundreds of MB.
| Nobody should make asumptions about the size of /tmp or /var/tmp,
If there are to be any defaults at all, some kinds of assumptions need
to be made - the ideal is not to just change things to suit the needs of
any odd user - but to look at the common case.
| i.e. wich of the two has more free space. It's about purpose:
| Store temporary stuff you will need after the next [re]boot in /var/tmp
| and everything else in /tmp. (At least this is how I understand hier(7))
hier(7) tells you that /tmp can be cleared at boot, and /var/tmp
won't be - that's important knowledge. I don't think it was ever
intended to mandate that only files which you want kept beyond
reboots should go in /var/tmp.
| So (IMHO) updatedb.csh really should use /tmp - if this doesn't work for
| some user [s]he will have to adjust the size of /tmp or set TMPDIR (e.g. in
| weekly.conf) to something else - as [s]he has to do with every other program.
I'd say exactly the opposite - put things back the way they were, if
some user needs /tmp to be used because they have a very small /var, then
they get to set TMPDIR ...
kre
ps: is no-one else other than me itrritated that updatedb is written in
csh rather than sh - if there's no objection, I'll convert it.
Previous experience doing this is that non-trivial scripts usually shrink
to about half the size, and become an order of magnitude clearer
when this is done...