Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 447076 - sys-apps/openrc: add size limit /run tmpfs by default (e.g. size=10%)
Summary: sys-apps/openrc: add size limit /run tmpfs by default (e.g. size=10%)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: OpenRC Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 439098
  Show dependency tree
 
Reported: 2012-12-13 09:05 UTC by cazzantonio
Modified: 2012-12-22 14:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description cazzantonio 2012-12-13 09:05:44 UTC
It would be a nice idea to add a size limit on the possibile growth of /run, mounted in tmpfs. The default size is half the amount of available ram, however there is also /dev/shm who is taking up the otherl half, so there could be issues where all the ram gets used by tmpfs.

This isn't a major issue, but maybe one could add a small parameter to line 64 of /lib/rc/sh/init.sh, in this way
mount -t tmpfs -o mode=0755,nosuid,nodev,size="10%" tmpfs /run
the above should be ok on any "modern" machine with more than 64-128MB of ram.

Alternatively one could get the whole amount from:
cat /proc/meminfo |grep MemTotal|tr -s [:blank:]|cut -d" " -f2
and use this value in the script (no limit for really low amounts of ram and 50MB limit for anyone with 512MB or more)
Comment 1 SpanKY gentoo-dev 2012-12-16 23:52:53 UTC
if 10% is too small because someone is running on a really low mem system, then they can just add their own /run line to /etc/fstab
Comment 2 William Hubbs gentoo-dev 2012-12-22 14:48:32 UTC
A 10% size is implemented in commit b00f858.
Thanks for the report.