[systemd-devel] Question related to cgroup and systemd

Francis Moreau francis.moro at gmail.com
Fri Sep 18 05:11:00 PDT 2015


Hi,

I'm trying to understand how cgroup is used by systemd and having the
following behaviour that I don't understand.

I've created a slice "myslice.slice" with this resource constraint
"MemoryLimit=1024" and started it.

I was expecting to find a trace of myslice in /sys/fs/cgroup/memory
folder but I can't find anything.

I  put a process inside the slice (with the help of systemd-run
--slice=myslice), but nothing was created under /sys/fs/cgroup/memory
either.

I was expecting that "myslice.slice" would have its own directory
inside /sys/fs/cgroup/memory directory (ie inside the memory
controller) and the memory constraint applied to that directory and
hence all its children.

But it seems I'm missing something.

Could anybody enlight me please ?

Also I'm a bit lost regarding kernel cgroup and its reworked API. Does
systemd already use this new API or is it still using the old/broken
one ?

Thanks.
-- 
Francis


More information about the systemd-devel mailing list