Benjamin Drung ae339ffd5e Make size of /run configurable
Using 10% of RAM for /run is a good default, but not suitable for all
systems. 10% might be too small for system with less memory (e.g.
virtual machine with 160 MiB RAM) or too big (VM host with 256/512 GiB
RAM). A too small /run partition leads to not enough space on it. If the
/run partition is huge, systemd's journald will consume lot of memory,
because it defaults to using at most 15% of the respective file system
of /run/log/journal.

Adjusting the size of /run via an entry in /etc/fstab is not sufficient
since journald calculates it limits before systemd remounts /run with
the small size. Therefore journald could occupy the full /run partition
with its logs.

Allow specifying the size of /run by adding a RUNSIZE configuration
variable and a initramfs.ramsize= boot argument. Mounting /run must be
done after reading the configuration.

Closes: #862013
Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com>
2018-06-05 19:17:11 +02:00
..
2018-06-05 19:17:11 +02:00