[systemd-devel] Significant speedup of systemd boot time with CONFIG_HZ=1000

Henrik Grindal Bakken hgb at ifi.uio.no
Fri Nov 9 05:04:41 PST 2012


"Oester Jonas (CM-AI/PJ-CF31)" <Jonas.Oester at de.bosch.com> writes:

>> For a while, I was rather unhappy with the boot times I was seeing,
>> but after changing CONFIG_HZ from 100 to 1000, that changed
>> dramatically.
>
> ...
>
>> There is also a rather peculiar delay between the startup of several
>> services (dev-mqueue.mount, systemd-random-seed-load.service, etc)
>> which is very regular.  Not sure why this happens.
>> 
>> Does anyone have any insights into why we have this huge difference?
>
> CONFIG_PREEMPT is not enabled in your kernel configuration; in that
> case system performance is highly dependent on how often the scheduler
> runs (for some workloads at least). The delay between services most
> likely comes from the interaction between systemd and cgroup
> controllers

Yeah, I had (or was getting) an idea that was related.  Unfortunately,
our vendor kernel apparently doesn't support CONFIG_PREEMPT yet, so we
might have a problem.  Or not, of course, since HZ=1000 appears to do
the trick.

> (cf. http://0pointer.de/blog/projects/cgroups-vs-cgroups.html, which
> has further suggestions for how you might want to configure your
> kernel).

I'll read it, thanks.

-- 
Henrik Grindal Bakken <hgb at ifi.uio.no>
PGP ID: 8D436E52
Fingerprint: 131D 9590 F0CF 47EF 7963  02AF 9236 D25A 8D43 6E52


More information about the systemd-devel mailing list