[systemd-devel] Grouping services in systemd..

Reindl Harald h.reindl at thelounge.net
Thu Apr 2 14:27:23 UTC 2020


Am 02.04.20 um 15:21 schrieb nitish nagesh:
>   We are working on an embedded ARM Cortex A9 based system (aka low
> CPU). It runs on a custom linux based operating system which uses systemd.
> 
>   We have a bunch of daemons (around ~50+) that come up during boot
> simultaneously which slows down the boot significantly as the CPU runs
> out of breath. We were thinking of staggering these daemons into 2
> groups. The first group containing "critical" daemons (around 15) so
> that they finish faster and make the system usable sooner. Followed by
> the second group of daemons.
> 
>    Separating daemons into buckets could be done using: 
> 1) systemd targets: Introduce 2 new targets and classify the
> services/daemons into them. Layer these targets during boot.
> 2) Cgroups: Create a new systemd slice and put all the "critical"
> services into it. Allocate sufficient CPUShares value to the slice so
> that this slice gets its due CPU% to finish faster boot.
> 
> Can you please suggest which of the above is a better approach?
> Respective pros/cons with each.
> 
> Or if there is a third approach better than the above?

with proper After/Before ordering should work too

don't apply for "Type=simple" and in that case targets won't help either
because every "simple" service prevent waiting for something

in the end i doubt slowing things down would solve anything! when stuff
is needed it's needed and if not make it socket activated instead fire
everything up at boot


More information about the systemd-devel mailing list