brewedbits.dev

Personal blog with guides and news on selfhosting, Linux and AI, from the Netherlands

nextDash nextdash --aboutYour bookmarks. Your terminal. checks your links knows your Docker host one container, no cloudLive demo →nextdash.cc ↗

Tip: systemd-analyze blame shows what slows down your boot

Systemd
~/tips/tip-linux-systemd-analyze-blame

systemd-analyze blame

Lists services by how long they took to start, so you can see what slows the boot.

A slow boot is usually one unit that takes its time. Guessing is a waste of an evening when the system already keeps the numbers.

Run this:

systemd-analyze blame

It lists every unit with the time it took to start, slowest first. Often you will see a network wait service or a mount at the top. To see the chain that actually held up the boot, use:

systemd-analyze critical-chain

The caveat is that blame shows how long a unit took, not whether anything waited for it. A slow unit that runs in parallel costs you nothing. That is why I look at critical-chain before I disable anything. Also, systemd-analyze alone prints the total split into firmware, loader, kernel and userspace, which tells you where to look first.

My advice is not to disable things just because they sit high on the list. Many of those units do real work. Fix the one thing that blocks the chain and leave the rest alone.

Further reading: systemd-analyze man page, On this site: systemctl list-timers is cron's answer inside systemd

More Systemd tips [Service] sudo mkdir -p /etc/systemd/system/service.d [Service] printf 'hunter2' | sudo systemd-creds encrypt --name=dbpass – dbpass.cred systemd-analyze timespan 1h30min All Systemd tips (88) All topics

Link