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

Re: Moving /tmp to tmpfs makes it useless



2012/5/25 Nikolaus Rath wrote:

> I don't think /tmp as part of the rootfs is a good idea for the reasons
> outlined in the rest of my mail.

Forgot to answer that part. Sorry.

> I think having / and /tmp share the same file system is a bad idea,
> because then writing lots of stuff to /tmp would potentially fill up the
> root file system (that typically also includes /var) and then cause a
> lot of breakage.

There's another feature, TMP_OVERFLOW_LIMIT to help just for that case,
it prints a warning and mounts /tmp on tmpfs if / partition gets filled.
Brilliant idea, I like it. :)

> That leaves you with using tmpfs or the installer having to ensure that
> there's a separate partition for /tmp. If you do the later, however, you
> may just as well ensure that there is a big enough swap partition and
> stick with tmpfs.

There's a difference between /tmp on a separate partition and /tmp on
tmpfs: /tmp on disk can't DoS the system, eat all the memory and make it
swapping. And regular user must not worry about that.

Imagine that you're helping your girlfriend to install debian by phone.
You can tell her "Just use the default", or you'll have to tell "make sure
you have enough swap space... and carefully unpack large archives or your
system may become slow... and don't run programs that write large files to
/tmp without configuring them... what programs? cd burners and archive
managers... and don't watch youtube videos larger than 250MB... how can
you find that out... well... just don't watch videos longer than 20
minutes..." etc. IMHO, that's what "default" settings are about. :)

-- 
  Serge


Reply to: