Hacker News new | ask | show | jobs
by butz 1425 days ago
I've used `systemd-analyze` for whole boot process overview. Thanks to your suggestions I can dig deeper.

Startup finished in 12.132s (firmware) + 1.822s (loader) + 2.106s (kernel) + 1.352s (initrd) + 10.098s (userspace) = 27.513s

2 comments

I did a `systemd-analyze citical-chain` and noticed that `snapd.service` took the most amount of time. So I edited the `/lib/systemd/system/snapd.service` based on the suggestion here [1] and set `After=network-online.start`. The critical-chain time has from ~12 sec to ~4sec. Here is full `systemd-analyze`

Startup finished in 2.348s (firmware) + 3.276s (loader) + 3.303s (kernel) + 4.309s (userspace) = 13.239s graphical.target reached after 3.892s in userspace

The interesting thing is, I haven't noticed any improvements in the time to interactivity from power button press. May a small 2-3 sec. That I could just attribute to disabling session saving and restoring in KDE

Edit: I reverted the change in snapd.service, now I get

Startup finished in 2.328s (firmware) + 3.599s (loader) + 3.284s (kernel) + 13.754s (userspace) = 22.966s graphical.target reached after 13.431s in userspace

Again, almost no difference in actual time to usability. Where is this ~10 secs saved or exhausted?

[1] - https://askubuntu.com/questions/1380790/is-it-possible-to-st...

snapd doesn't block your interactivity. You can start typing in your password and login and start to launch your app, meanwhile the user space startup sequence is still running.
That explains why there is no change in time to interactivity. Thanks.
Enabled "fast boot" in BIOS: Startup finished in 4.369s (firmware) + 1.935s (loader) + 2.516s (kernel) + 1.336s (initrd) + 9.797s (userspace) = 19.954s

One caveat - after enabling "fast boot" it is impossible to enter BIOS configuration usual way with hotkey, had to use `systemctl reboot --firmware-setup`.

And there's a `systemd-analyze plot` command, which draws a chart of boot process in SVG format.