summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2013-02-17 15:14:06 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2013-02-19 17:09:30 -0600
commitfac96b4df4b61db399bfa18549be162e9861b0b5 (patch)
treeb6469bbad6cfa12682c5fc3abe2265a644fae071 /etc
parentebf85d598e6ad2628e5d472ceeda3f86b2f0eac1 (diff)
downloadopenrc-fac96b4df4b61db399bfa18549be162e9861b0b5.tar.gz
openrc-fac96b4df4b61db399bfa18549be162e9861b0b5.tar.bz2
openrc-fac96b4df4b61db399bfa18549be162e9861b0b5.tar.xz
cgroups: major update to cgroups support
This reworks cgroups support so we have one variable in rc.conf for each controller instead of each setting. Also we add support for all of the possible cgroup controllers. I would like to thank Alexander Vershilov for his help with testing and reworking this code.
Diffstat (limited to 'etc')
-rw-r--r--etc/rc.conf.Linux40
1 files changed, 34 insertions, 6 deletions
diff --git a/etc/rc.conf.Linux b/etc/rc.conf.Linux
index 7571f98..4fb48ae 100644
--- a/etc/rc.conf.Linux
+++ b/etc/rc.conf.Linux
@@ -29,12 +29,40 @@ rc_tty_number=12
# 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.
+# The following settings allow you to set up values for the cgroup
+# controllers for your services.
+# They can be set in this file;, however, if you do this, the settings
+# 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.
+# The format is to specify the names of the settings followed by their
+# values. Each variable can hold multiple settings.
+# For example, you would use this to set the cpu.shares setting in the
+# cpu controller to 512 for your service.
+# rc_cgroup_cpu="
+# cpu.shares 512
+# "
+#
+#For more information about the adjustments that can be made with
+#cgroups, see Documentation/cgroups/* in the linux kernel source tree.
+
+# Set the blkio controller settings for this service.
+#rc_cgroup_blkio=""
+
+# Set the cpu controller settings for this service.
+#rc_cgroup_cpu=""
+
+# Add this service to the cpuacct controller (any value means yes).
+#rc_cgroup_cpuacct=""
+
+# Set the cpuset controller settings for this service.
+#rc_cgroup_cpuset=""
+
+# Set the devices controller settings for this service.
+#rc_cgroup_devices=""
+
+# Set the memory controller settings for this service.
+#rc_cgroup_memory=""
-# This is the number of CPU shares a service is allowed to use. The
-# default value, set by the kernel, is 1024.
-# This requires CONFIG_FAIR_GROUP_SCHED to be set in the kernel.
-#rc_cgroup_cpu_shares=1024
+# Set the net_prio controller settings for this service.
+#rc_cgroup_net_prio=""