Find what's slowing your Linux boot in seconds with systemd-analyze

Find what's slowing your Linux boot in seconds with systemd-analyze — Latest news
Source: Latest news

If your Linux distribution uses the systemd init system, it already includes a tool called systemd-analyze that helps identify what is slowing boot times. Running systemd-analyze shows kernel and userspace times, for example: "Startup finished in 6.669s (kernel) + 30.368s (userspace) = 37.037s" and "graphical.target reached after 27.479s in userspace." The blame option lists unit files by how long they took to initialize, for example: "57.158s apt-daily.service", "20.879s apt-daily-upgrade.service", "17.609s snapd.service" and so on.

The critical-chain option prints the chain of units that most affected boot time, showing when each unit became active and how long it took to start. In the sample output, docker.service and containerd.service appear as potential bottlenecks that could be disabled at boot and started manually to speed up startup.

The plot option creates an SVG visual of the boot process with systemd-analyze plot > boot.svg; open the file in a web browser because the image can be huge.

systemd-analyze, systemd, boot time, kernel time, userspace time, blame option, critical-chain, docker.service, containerd.service, systemd-analyze plot