Talk:OpenRC/CGroups

Example: limit memory and I/O for cron jobs
Running rsnapshot could use up a large amount of the system's pagecache, which can cause significant latencies for regular operations like launching new processes / allocating memory (as shown by sys-process/latencytop). To limit the impact of such background jobs on system latency you can limit the amount of memory used by all cron jobs: including the memory used for the file system cache.

https://github.com/Feh/nocache#alternate-approaches shows how to this can be done from the backup script itself.

However using OpenRC you can automatically apply this to all jobs launched from cron. Here is an example if you are using sys-process/cronie:

To check that it worked:

--Edwintorok (talk) 12:24, 9 October 2016 (UTC)

CGroups version 2 and enabled controllers by default?
How does OpenRC enable cgroups version 2? On my Gentoo, the file /sys/fs/cgroup/cgroup.subtree_control is empty. This means that no services have any enabled controllers.

To enable a controller simply do:

However, setting this in rc.local or doing it manually doesn't help services already started.

--Gatak (talk) 10:24, 9 November 2018 (UTC+1)