[systemd-devel] unable to attach pid to service delegated directory in unified mode after restart

Michal Koutný mkoutny at suse.com
Tue Mar 1 17:35:45 UTC 2022


Hello Felip.

On Mon, Feb 21, 2022 at 10:16:30PM +0100, Felip Moll <lipixx at gmail.com> wrote:
> As I commented in my previous post, creating every single job in a separate
> slice is an overhead I cannot assume.

You may also call DBus
org.freedesktop.systemd1.Manager.StartTransientUnit() directly with no
additional fork+execs. (I agree manual cgroupfs handling would have even
less overhead.)

> An HTC system could run thousands of jobs per second,

Interesting. Do I get it right that 1000s of jobs are started and
finished every second? What's their mean duration?

Also what resources do you intend to manage with cgroups under these
conditions?

> DelegateCgroupLeaf=<yes|no>. If set to yes an extra directory will be
> created into the unit cgroup to place the newly spawned service process.
> This is useful for services which need to be restarted while its forked
> pids remain in the cgroup and the service cgroup is not a leaf anymore.

This use case of yours might be actually falling more generally under
this (still) RFE [1].


Thanks,
Michal

[1] https://github.com/systemd/systemd/issues/10228


More information about the systemd-devel mailing list