[systemd-devel] how to make systemd ignore the memory cgroup controller and hierarchy

Lennart Poettering lennart at poettering.net
Thu May 10 15:04:45 UTC 2018


On Mi, 09.05.18 16:46, john terragon (terragonjohn at yahoo.com) wrote:

> Hi.
> 
> I have the memory cgroup controller configured in the kernel. I want
> to use it myself directly without interference from systemd. I tried
> setting DefaultMemoryAccounting=no in system.conf but systemd seems
> to still interfere with the hierarchy for the memory controller
> (e.g. systemctl daemon-reload for some reason removes all tasks from
> my subgroups in the memory hierarchy). Since none of the cgroup
> controllers are strictly needed by systemd (only the basic cgroup
> infrastructure in the kernel is neede. The single controllers could
> be disabled, if I'm not mistaken.) how do I get systemd to leave the
> memory controller and relative hierarchy alone?

It leaves all hierarchies alone which aren't used by at least one of
the units it manages. Hence: if systemd is using the memory controller
on your system try to figure out which unit is causing this.

Currently there's no nice way to debug this, except maybe watching
inotify events on /sys/fs/cgroup to see why sets of cgroups systemd
precisely creates.

Other than that you might want to look for any unit that has
MemoryAccounting= set, or any a memory limit enforced, or delegation
turned on.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list