:: Re: [DNG] merging /tmp
Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Adam Borowski
Fecha:  
A: dng
Asunto: Re: [DNG] merging /tmp
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...

sysvinit has specific support for this: edit /etc/default/tmpfs
(the file says:
# NOTE: This file is ignored when systemd is used as init system #
at the start -- but it's not like you expect systemd advice on _this_ list).


Meow!
-- 
⢀⣴⠾⠻⢶⣦⠀ We domesticated dogs 36000 years ago; together we chased
⣾⠁⢰⠒⠀⣿⡁ animals, hung out and licked or scratched our private parts.
⢿⡄⠘⠷⠚⠋⠀ Cats domesticated us 9500 years ago, and immediately we got
⠈⠳⣄⠀⠀⠀⠀ agriculture, towns then cities.     -- whitroth on /.