Systemd Startup Times with systemd-analyze

systemd-analyze

Systemd had the goal of optimising startup times from the very beginning. It is therefore no particular wonder that it has a tool for precise startup timing and analysis: systemd-analyze.

Systemd Startup Analysis

Run without command line parameters, systemd-analyze shows a summary of how quickly your system booted Linux last time:

greys@srv:~ $ systemd-analyze
Startup finished in 2.743s (kernel) + 2.654s (userspace) = 5.397s
graphical.target reached after 2.641s in userspace

See What Systemd Service Took Longest to Start

It gets better! You can specify the blame parameter, and systemd-analyze will show you exactly how long each of the startup tasks has taken – that’s really useful for troubleshooting:

greys@srv:~ $ systemd-analyze blame
1.983s docker.service
277ms certbot.service
276ms man-db.service
223ms dev-md0.device
210ms apt-daily-upgrade.service
208ms apt-daily.service
194ms logrotate.service
101ms systemd-fsck@dev-disk-by\x2duuid-cea13f85\x2d61fa\x2d414f\x2d9c2f\x2d1e48ec41ad25.service
69ms chrony.service
66ms systemd-journald.service
61ms ssh.service
59ms systemd-remount-fs.service
57ms systemd-fsck@dev-disk-by\x2duuid-cfceff76\x2df739\x2d49e2\x2da4d1\x2d02472e5457f9.service
46ms systemd-udev-trigger.service
41ms keyboard-setup.service
41ms systemd-logind.service
40ms containerd.service
36ms networking.service
31ms apparmor.service
27ms [email protected]
21ms systemd-tmpfiles-setup.service
21ms rsyslog.service
19ms systemd-update-utmp.service
15ms storage.mount
14ms var-log.mount
14ms systemd-udevd.service
12ms dev-disk-by\x2duuid-799ad160\x2d8a59\x2d4c80\x2db78a\x2d7e3986876964.swap
11ms systemd-user-sessions.service
10ms dev-disk-by\x2duuid-261bd6ac\x2d2f4c\x2d475b\x2da4e4\x2db2548368e0fa.swap
10ms systemd-update-utmp-runlevel.service
9ms systemd-journal-flush.service
9ms polkit.service
9ms dev-disk-by\x2duuid-d45708da\x2d06f4\x2d41d6\x2daabe\x2decd87fb5edbe.swap
8ms systemd-tmpfiles-clean.service
8ms [email protected]
7ms dev-mqueue.mount
7ms sys-kernel-debug.mount
7ms systemd-tmpfiles-setup-dev.service
6ms systemd-modules-load.service
6ms console-setup.service
6ms systemd-sysusers.service
4ms systemd-sysctl.service
4ms kmod-static-nodes.service
4ms dev-hugepages.mount
4ms systemd-random-seed.service
2ms ifupdown-pre.service
1ms docker.socket
greys@srv:~ $

See Also