Reply to post: Re: 3 seconds boot time?

After four years, Rust-based Redox OS is nearly self-hosting

TJ1
Thumb Up

Re: 3 seconds boot time?

Many times slow boot (or more accurately, time to reach "graphical.target") is due to waiting for the "network-online.target" which will only be reached on most laptops once the/a WiFi network is found and connected.

This is usually a side effect of configuring a Network Manager (WiFi) connection to be available to all system users which causes it to be brought up before desktop log-in is reached.

However, for the more general case systemd provides useful tools for identifying where boot-time delays occurred:

systemd-analyze critical-chain

systemd-analyze blame

By default these assume "--system" but with "--user" the user session start-up can be analysed separately.

"critical-chain" is the most useful when one service is delaying others, such as when waiting for a network connection to become available. The numbers show the @when and the +duration of each unit. E.g: on my laptop it takes +5.649s for the WiFi connection to be established:

graphical.target @11.614s

└─multi-user.target @11.614s

└─kerneloops.service @11.579s +34ms

└─network-online.target @11.570s

└─NetworkManager-wait-online.service @5.919s +5.649s

└─NetworkManager.service @5.419s +403ms

└─dbus.service @5.158s

└─basic.target @5.091s

(Bug alert: seems like ElReg's CODE and PRE tags do not preserve layout - the above should be indented and each line shouldn't be wrapped in P tags)

As always

man systemd-analyze

details many more useful reports and visualisations of the boot process and how to interpret the output.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon