[systemd-devel] Grouping services in systemd..

Michal Koutný mkoutny at suse.com
Thu Jun 4 14:23:57 UTC 2020


Hi.

(Not sure if it's still pertinent.)

On Tue, Apr 07, 2020 at 10:23:22AM +0530, nitish nagesh <nagesh.nitish at gmail.com> wrote:
> In fact i did try a similar approach of assigning CPUShares to a slice.
> Basically i separated these critical services into a new slice &
> assigned a CPUShare=8192. 
> However with this i see it takes more time than before to complete the
> boot.
Note that if you didn't use cpu controller for anything else before, you
introduced whole new grouping of tasks (i.e. imagine all were in -.slice
previously), that may affect timing interactions.
Furthermore, group scheduling works relative to siblings, i.e.
system-netns.slice would be prioritized against siblings in in
system.slice only.
Finally, when prioritizing certain services you may have taken CPU
time from other services that are dependencies (priority inversion).

It makes sense to prioritize services on critical path but if there's
nothing else to prioritize against, that's just the amount of work that
has to be done anyway as others pointed out.

> So by setting it to 8192 am I reducing the CPUShare and hence seeing
> an increase in time?
No, this is a special value that represents unset CPUShare= internally.
Such units would still apply 1024 cpu.shares.

> The DefaultCPUAccounting also seems to be enabled for the system.
Aha, then my point about cpu controller regrouping is moot probably.

HTH,
Michal
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200604/3a8cb366/attachment.sig>


More information about the systemd-devel mailing list