My fresh installation of 18.04 is taking 1 to 1.5 minutes to boot, while it took <10 seconds before reinstalling.
~$ systemd-analyze time
Startup finished in 7.942s (firmware) + 11.813s (loader) + 5.323s (kernel) + 41.406s (userspace) = 1min 6.486s
graphical.target reached after 41.308s in userspace
~$ systemd-analyze blame
33.987s systemd-timesyncd.service
33.979s systemd-resolved.service
5.507s NetworkManager-wait-online.service
1.099s dev-sdb2.device
...
But when looking in the logs I see nothing suspicious, except that it's taking 30 seconds...
~$ journalctl -u systemd-timesyncd.service
-- Reboot --
Jan 15 12:27:18 ubuntu systemd[1]: Starting Network Time Synchronization...
Jan 15 12:27:52 ubuntu systemd[1]: Started Network Time Synchronization.
Jan 15 12:28:22 ubuntu systemd-timesyncd[719]: Synchronized to time server 91.189.89.199:123 (ntp.ubuntu.com).
~$ journalctl -u systemd-resolved.service
-- Reboot --
Jan 15 12:27:18 ubuntu systemd[1]: Starting Network Name Resolution...
Jan 15 12:27:52 ubuntu systemd-resolved[721]: Positive Trust Anchors:
Jan 15 12:27:52 ubuntu systemd-resolved[721]: . IN DS 19036 8 2 49aac11d7b6f6446702e54a1607371607a1a41855200fd2ce1cdde32f24e8fb4
Jan 15 12:27:52 ubuntu systemd-resolved[721]: . IN DS 20326 8 2 e06d44b80b8f1d39a95c0b0d7c65d08458e880409bbc683457104227c7f8ec8d
Jan 15 12:27:52 ubuntu systemd-resolved[721]: Negative trust anchors: 10.in-addr.arpa 16.172.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.arpa
Jan 15 12:27:52 ubuntu systemd-resolved[721]: Using system hostname 'ubuntu'.
Jan 15 12:27:52 ubuntu systemd[1]: Started Network Name Resolution.
Sometimes apparmor.service
also takes ~30s which was not the case this time.
How can I speed those up?
EDIT: Changed my dns to 8.8.8.8 and now blame says this
34.420s console-setup.service
34.416s snap-vscode-74.mount
34.381s snap-core-6130.mount
33.962s apparmor.service
33.927s systemd-tmpfiles-setup.service
5.400s NetworkManager-wait-online.service
1.543s dev-sdb2.device
1.092s keyboard-setup.service
...
However after another reboot timesyncd
and resolved
are still there, it appears the problem is not caused by the services as implied in the title.
0 Answers