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

Re: Moving /tmp to tmpfs makes it useless

Hi Thomas,

On Sat, Jun 02, 2012 at 07:33:26PM +0800, Thomas Goirand wrote:
> > All the complaints about /tmp as tmpfs come down to one simple issue:
> > The size of the tmpfs isn't chosen well. It would be more constructive
> > to find a better heuristic for the size there.
> No. The complain is that it will never be big enough for some cases. If
> you tell me that it should be twice as big as now, then I'll tell you:
> what if we have to handle files twice as big as what you thought to
> begin with?

that problem applies to disks as well, and especially to small /
partitions, if you don't have /tmp somewhere else. If we are talking by
making /tmp its own file system, that's ok, but if we are talking about
manually relocating it to (say) /var/tmp, then we've made exactly as
much progress as we would have made by making it tmpfs by default: We
then require the user to manually intervene and change the default.

> don't force it to all users as a default which might break and that some
> users wont understand. This is just too risky to have some users saying
> "linux is crap, libreoffice can't open big PPT files, it gets horribly
> slow, then crashes the whole system so much that I have to reboot".
> Probably that's wrong, but it's still going to be the comments of our
> users.

You certainly can't cover all edge cases, and especially "non-technical
users" have just too many ways to break any system, as well as usually
being too rash to investigate. My suggested fix for this problem is to
install a ~/tmp upon account creation, and set the TEMP environment
variable in, say, /etc/environments. That *should* fix up all cases
except for rogue applications that don't honour $TEMP. We can then
proceed to fix these over time, while not demanding too many changes to
the general setup. And fwiw, the user's home is supposed to be big
enough for all such cases where the user is "non-technical", but still
his own systems administrator - the case you are highlighting.

Kind regards,

Reply to: