[systemd-devel] Antw: [EXT] Moving a service from one systemd slice to another..

Ulrich Windl Ulrich.Windl at rz.uni-regensburg.de
Mon May 4 06:32:24 UTC 2020


>>> nitish nagesh <nagesh.nitish at gmail.com> schrieb am 04.05.2020 um 08:22 in
Nachricht
<16105_1588573381_5EAFB4C4_16105_232_1_CAK6_9mPKJ8wWFDgw+eWGe5oYy=s42v0joKwz2Nfk
Gvqw1pAeg at mail.gmail.com>:
> Hello,
> 
>    We have this odd want to move a daemon between different systemd slices.
> Not sure if that's even a valid thing to do, but here is the requirement.
> 
>    The daemon while booting up belongs to a systemd slice (say X) which has
> parameters like startupCPUShares tuned to bring the system up faster.
> However for normal operations after bootup, it would be apt to make it
> belong to another slice (say Y) with different cgroup parameters
> configurations (ex: CPUShares). The set of daemons that belong to X and Y
> are totally different, except for this one daemon. Also the cgroup
> parameter that are set via slice Y are totally different than those set via
> slice X.
> 
>   A few basic questions:
> - Can a daemon be a part of 2 slices?
> - If yes, going by the example above, if slice X loads first followed by
> slice Y, does it mean when slice X is in force this daemon will have
> startUpCPUShares set & when slice Y is loaded the CPUShares will be set?
> 
>    Please suggest if there are alternate ways in systemd to handle this
> requirement.

What about assigning a specific cgroup right from the start, and then after bootup change the properties of that cgroup? That sounds like a more logical approach to me.

> 
> Thanks,






More information about the systemd-devel mailing list