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

nitish nagesh nagesh.nitish at gmail.com
Mon May 4 06:22:37 UTC 2020


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.

Thanks,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200504/b6533b49/attachment-0001.htm>


More information about the systemd-devel mailing list