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

Henrik Grindal Bakken hgb at ifi.uio.no
Mon Nov 5 07:19:45 PST 2012


Hi.  I'm setting up a systemd system with a Linux-from-scratch-ish
distro on a multi-core platform.

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.

My userspace components (i.e. systemd + my scripts and services) used
to take ~11s to reach multi-user.target, but after 1000hz, they use
~2s.  The kernel boots up significantly quicker as well.

Unfortunately, I'm not at liberty to disclose too much about the
hardware architecture, but I have boot charts from 'systemd-analyze
plot' and a somewhat stripped-down kernel config.

They are available at

  http://folk.uio.no/hgb/config_hz/plot-hz100.jpeg
  http://folk.uio.no/hgb/config_hz/plot-hz1000.jpeg
  http://folk.uio.no/hgb/config_hz/kconfig

The kernel boot time seems pretty long there, but that's partly due to
a fairly long (intentional) delay in initramfs.

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?

Kernel version is 3.0.<something> btw.

-- 
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