[systemd-devel] Separating user-0.slice from other users

Lennart Poettering lennart at poettering.net
Thu Mar 7 10:28:24 UTC 2019


On Do, 07.03.19 11:21, Frank Steiner (fsteiner-mail1 at bio.ifi.lmu.de) wrote:

> Hi,
>
> another weird cgroup question :-) Now that I'm able to move certain
> system services into the user slice and impose an overall memory limit
> on them and all users, I'd like to move the root user outside the user
> slice to make sure he is not hit by the limit.
>
> I was able to move part of roots processes outside the user.slice by
> creating user at 0.service and giving it a different slice. But it
> seems that "/usr/lib/systemd/systemd --user" enforces the user-0 at slice
> below user.slice, even when I rename slide in user at .service to e.g.
> blauser-%i.slice:

This is simply not supported right now. logind does not allow the
per-user slice to be arbitrarily changed.

As mentioned it always was the intention to make this configurable, so
that you can assign different users to different slices, as you like,
but this was never implemented so far, and is still on the todo
list. The big missing issue there is that the UNIX user db is not
extensible, which means any such configuration is always very
artificially attached as "sidecar", which makes this all very
unattractive to work on. Ideally we could extend the user db with info
about slices and such, and then naturally apply them, but given that
this never existed, this always was put on the list for "let's do this
later".

Lennart

--
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list