How-Tos

How-To: Find What’s Slowing Your Linux Boot With systemd-analyze

Leave a comment

The Omarchy 4.5 binfmt fix got me checking my own boots. systemd ships the tools to see exactly where time goes, on Omarchy or any systemd distro.

The big picture

systemd-analyze

That prints firmware, loader, kernel and userspace time. Userspace is the part you can usually fix.

The slowest units

systemd-analyze blame | head -20

Remember that a unit taking a long time isn’t always blocking boot. That’s what the next one is for.

The critical path

systemd-analyze critical-chain

This shows the chain of units that actually held up reaching the default target. On 4.5 you should see systemd-binfmt.service drop to a few milliseconds.

A picture of it

systemd-analyze plot > boot.svg

Open it in a browser to see the whole boot laid out.

Check a unit’s ordering

systemctl list-dependencies --after systemd-binfmt.service
systemctl cat systemd-binfmt.service

Don’t start masking units just because they show up in blame. Measure a few boots, change one thing, and measure again.

Isolate it: try new software in a disposable VM or spare machine first, with a backup you can roll back to.

God Bless, and May the Source Be with You!

References & Further Reading

Subscribe (RSS) Follow How-Tos via RSS

Leave a note

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.