[systemd-devel] Systemd and cgroup management (and libcgroup)

Lennart Poettering lennart at poettering.net
Mon Oct 31 14:32:30 PDT 2011


On Mon, 31.10.11 14:43, Jan Safranek (jsafrane at redhat.com) wrote:

> >> Even if there is, then it looks like systemd is better place to manage
> >> it as it already is setting up the whole system and top level hierarchies.
> >> Thanks to Jason for the suggestion.
> 
> Systemd pretty much covers most of the use cases. The main reason to
> keep separate cgconfig is mounting several controllers together in one
> hierarchy - AFAIK systemd won't support this mounting. Still, systemd
> will happily put services to cgroups there.

We actually do support mounting hierarchies jointly these days. Use
"JoinControllers=" to achieve that. By default we moint and cpu and
cpuacct together.

> Lennart wrote once on previous discussion [1]:
> 
> <cite>
> systemd will create automatic groups for users and services, but will
> not help you to set up any more complex hierarchy then just 1:1 service
> to cgroup mappings.
> 
> As soon as you want a more complex tree, with multiple levels or
> something like this you will need something like cgconfig which allows
> you to create any tree you want.
> </cite>
> 
> Question is, if we really need complex cgroup hierarchies and/or
> multiple controllers in a hierarchy.

I am quite sure that sooner or later some folks will need complex cgroup
hierarchies, for example if they want to give a group "teachers" a more
resources than the group "students" or so. I am very sure that some
people want features like that, but I am also quite sure I don't want to
cover that in systemd, which is why I am happy if cgconfig could fill in
that void. I think systemd will cover 90% of the use cases, but the 10%
that are left are valid too, and cgconfig sounds like a useful tool to
make that work.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.


More information about the systemd-devel mailing list