summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorAlexander Vershilov <alexander.vershilov@gmail.com>2012-10-26 09:05:41 +0400
committerWilliam Hubbs <w.d.hubbs@gmail.com>2012-11-12 10:58:00 -0600
commit4f19c2f512d9a08599b6bdf1129f508fc9a4e055 (patch)
tree82283f40dcb348701b250ca83f9d951e37c546f0 /etc
parentcf7b9047040264c02decf90e5d1355508fa98ded (diff)
downloadopenrc-4f19c2f512d9a08599b6bdf1129f508fc9a4e055.tar.gz
openrc-4f19c2f512d9a08599b6bdf1129f508fc9a4e055.tar.bz2
openrc-4f19c2f512d9a08599b6bdf1129f508fc9a4e055.tar.xz
Support cpu usage management for Linux
This commit was modified by William Hubbs as follows: - The paths in the cgroup fs were put into variables to ease maintenance. - Documentation was added to rc.conf.Linux. - The services were added originally to openrc/svcname cgroups under the controller cgroups, but this left an "openrc" cgroup which was unused. Now they are added to individual cgroups with the name openrc_${RC_SVCNAME}.
Diffstat (limited to 'etc')
-rw-r--r--etc/rc.conf.Linux17
1 files changed, 14 insertions, 3 deletions
diff --git a/etc/rc.conf.Linux b/etc/rc.conf.Linux
index 909e6a9..6285bde 100644
--- a/etc/rc.conf.Linux
+++ b/etc/rc.conf.Linux
@@ -20,10 +20,21 @@
# consolefont, numlock, etc ...)
rc_tty_number=12
+##############################################################################
+# CGROUPS RESOURCE MANAGEMENT
+
# If you have cgroups turned on in your kernel, this switch controls
# whether or not a group for each controler is mounted under
# /sys/fs/cgroup.
-# Support for process management by cgroups is planned in the future,
-# so if you turn this off, be aware that you may not be able to use that
-# feature.
+# None of the other options in this section work if this is set to "NO".
#rc_controller_cgroups="YES"
+
+# These options can be set globally in this file; however, if you do
+# this, the same setting will apply to all of your services.
+# If you want different settings for each service, place the settings in
+# /etc/conf.d/foo for service foo.
+
+# This is the number of CPU shares a service is allowed to use. The
+# default value, set by the kernel, is 1024.
+# Also, this setting is not preserved if you suspend your computer.
+#rc_cgroup_cpu_shares=1024