[systemd-devel] specialized user sessions for running large processes

Lennart Poettering mzerqung at 0pointer.de
Tue Oct 2 15:27:49 UTC 2018


On Di, 02.10.18 16:44, Thomas Blume (Thomas.Blume at suse.com) wrote:

> On Dienstag 2018-10-02 16:17, Lennart Poettering wrote:
> 
> > Not sure I follow. System users should have a UID below 1000 (or
> > whatever your OS defines as boundary between system and regular
> > users).
> 
> Sure, but even UID 0 would be still amongst the user.slice and get the
> user restrictions, right?

well, yes.

I mean not sure what you are asking for. *every* userspace process in
systemd needs to be managed under a unit. The cgroup tree is
universal, you cannot have processes outside of it, thus you have to
pick a unit.

Hence, yes, if you start some code as part of a user session it's part
of the user session units. If you start some code as a system service
then it is part of the service unit. What else would you expect? It
needs to be part of something.

> > Moreover system services should really be started as system
> > servers, and not from login sessions...
> 
> Yes, normally they should be started that way, but what if you need to
> do some maintenance tasks, for example starting a database in a special
> mode?

I don't understand what you are asking.

What would you like to happen? if you start a process from such a
pseudo session, what unit would you want it to be assigned to?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list