Bug#862013: also it can be too big
On systems with large amounts of RAM allocating 10% for /run is also
undesirable. My latest server has 48G of RAM (not really big by server
standards) and I don't want a runaway process writing to /run to consume 4.8G
of RAM before it is stopped.
/dev has no size specified in /usr/share/initramfs-tools/init so it gets half
of RAM as the default tmpfs size. It's not that uncommon for a script to
write to a file under /dev thinking it's writing to a device (a typo in /dev/
null when running as root is a common example). I would prefer to mitigate
the damage that such accidents can cause by reducing the size of /dev. I
can't imagine anyone needing more than a few dozen megs for /dev anyway.
Also the number of inodes is set to half the number of pages. On a system
with 48G of RAM that means 6182147, which is well in excess of anything you
need in /dev or /run. Presumably some kernel memory is taken for the inodes
or something, otherwise it would default to 2^32 or something. So reducing
the number to something reasonable seems sensible.
I've experimented with setting both /dev and /run to 200M and 4096 inodes and
it seems fine.
But ideally it would be best to allow the sysadmin to easily tune these things
without editing /usr/share/initramfs-tools/init. Maybe make /usr/share/
initramfs-tools/init a template that is run through sed to generate the actual
paramaters used when booting from a config file under /etc/initramfs-tools.
--
My Main Blog http://etbe.coker.com.au/
My Documents Blog http://doc.coker.com.au/
Reply to: