:: Re: [DNG] merging /tmp
Página Inicial
Delete this message
Reply to this message
Autor: Didier Kryn
Data:  
Para: dng@lists.dyne.org
Assunto: Re: [DNG] merging /tmp
Le 24/11/2018 à 22:41, Adam Borowski a écrit :
> On Sat, Nov 24, 2018 at 02:40:31PM -0500, Hendrik Boom wrote:
>> On Sat, Nov 24, 2018 at 06:47:42PM +0100, Didier Kryn wrote:
>>>     In my last install, I still had /tmp and /var on separate
>>> partitions,
>>> but I'm questionning the validity of such a setup.
>> It's useful to have /tmp on a separate partition in case some process
>> running amok fills it and ordinary shell commands that need temprary
>> files stop working.
> And it's even better if that partition is formatted as swap. You then
> mount
> /tmp as tmpfs (hey, lookie at the name!), and files there won't even
> hit the
> disk unless there's some memory pressure. With default value of
> /proc/sys/vm/swappiness being 60, the system won't sacrifice caching
> just to
> keep old crap in /tmp in memory and will swap them out eventually. But,
> during any compilation, gcc's temp files won't need to be written out
> if gcc
> doesn't manage to delete them within that 5 seconds window...



    But there are other tmpfs filesystems, eg /run, whichcontain
critical files and might be swapped out if /tmp overflows. Is there a
means to dedicate a swap partition to a particular /tmpfs mount. Note
it's also possible to put a size limit to every tmpfs mount.

    Didier