Featured image of post Blame your boot time

Blame your boot time

PewDiePie on Arch? Let’s boot analyze

PewDiePie making a video about Linux (Arch? really??) was not something I expected this year. But hey, here we are, and I actually learned something useful from it.

Turns out systemd comes with tools that show you how long your system takes to boot and which services are the slowest.

Commands

systemd-analyze

This command breaks down your boot time. It’s the full timeline: firmware, bootloader, kernel, and userspace.

Example output:

1
2
Startup finished in 13.125s (firmware) + 5.376s (loader) + 6.182s (kernel) + 2.845s (userspace) = 27.529s
graphical.target reached after 2.844s in userspace.

systemd-analyze blame

This one shows what is taking time. It lists services and mount points, sorted by delay.

Example output:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
1.033s modprobe@dm_mod.service
1.033s modprobe@loop.service
 640ms media-saiphe-nvme1tbgames.mount
 624ms media-saiphe-ssd500gb.mount
 618ms media-saiphe-nvme250gb.mount
 593ms var-lib-snapd-snap-bare-5.mount
 592ms var-lib-snapd-snap-core-17200.mount
 592ms var-lib-snapd-snap-core18-2846.mount
 591ms var-lib-snapd-snap-core18-2855.mount
 590ms var-lib-snapd-snap-core22-1802.mount
 590ms var-lib-snapd-snap-core22-1908.mount
 589ms var-lib-snapd-snap-gnome\x2d3\x2d28\x2d1804-198.mount
 588ms var-lib-snapd-snap-gtk\x2dcommon\x2dthemes-1535.mount
 588ms var-lib-snapd-snap-snapd-23771.mount
 587ms var-lib-snapd-snap-snapd-24505.mount
 586ms var-lib-snapd-snap-superproductivity-2273.mount
 586ms var-lib-snapd-snap-superproductivity-2285.mount
 580ms tmp.mount
 412ms systemd-modules-load.service
 397ms systemd-binfmt.service
 382ms snapd.service
 274ms NetworkManager.service

Pewds’ video

Note: In the future, I might explore an animated fetch so we can flex like Felix.

Life is a choice: reboot or be root


Built with Hugo
Theme Stack designed by Jimmy