[systemd-devel] [PATCH 1/2] libcgroup: Added README_systemd file.

Lennart Poettering lennart at poettering.net
Tue Dec 13 03:41:39 PST 2011


On Fri, 09.12.11 15:32, Jan Safranek (jsafrane at redhat.com) wrote:

> +For specific use cases, e.g. when different tree of control groups is needed,
> +libcgroup provides cgconfig service. This service can create arbitrary control
> +group hierarchies. In this case, follow these steps:
> +
> +1. Set 'DefaultControllers=' in /etc/systemd/system.conf so systemd does not
> +create control groups for services automatically.
> +
> +2. Prepare /etc/cgconfig.conf and enable cgconfig service. The service will
> +parse /etc/cgconfig.conf file during machine boot and create all control
> +groups which are defined in it. The service automatically sets '+t' ("sticky")
> +bit on tasks file as recommended in [2].
> +
> +3. For each service that should start in specific control group, add following
> +lines into it's unit file:
> +	After=cgconfig.service
> +	ControlGroup=<name of the control group(s)>
> +
> +This ensures the service is started only after cgconfig creates necessary
> +hierarchy for it and also tells systemd into which control group should be the
> +service started.

Sounds perfect! Thanks for putting this together!

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list