I’ve recently upgraded my machine from Ubuntu 14.04.4 to Ubuntu 16.04.1, but while my computer used to boot in about 40 seconds, after the upgrade boot times increased considerably to 2 to 3 minutes. The first easy check was to look at dmesg:
1 2 3 4 5 |
[ 9.776990] usb 3-4.4.2: pl2303 converter now attached to ttyUSB0 [ 11.510201] floppy0: no floppy controllers found [ 98.444400] vboxdrv: Found 8 processor cores [ 98.460319] vboxdrv: TSC mode is Invariant, tentative frequency 4026996449 Hz [ 98.460321] vboxdrv: Successfully loaded version 5.0.26 (interface 0x00240000 |
There’s a bit 87 seconds gap between checking for the floppy, and VirtualBox drivers loading. So there’s definitely an issue here, but the log does not exactly give a clear queue. I’ve read you could use systemd-analyze to find which process(es) may be slowing down your computer at boot time:
1 2 3 4 5 6 7 8 |
systemd-analyze blame 8.121s apt-daily.service 7.658s NetworkManager-wait-online.service 931ms docker.service 710ms winbind.service 695ms nmbd.service 647ms samba-ad-dc.service 543ms ModemManager.service |
Two processes are taking close to 8 seconds, but those 16 seconds still do not explain why it takes 2 minutes more to boot…Eventually, I realized systemd-analyze has a few more tricks up its sleeves:
1 2 3 4 |
systemd-analyze Startup finished in 5.784s (kernel) + 3min 651ms (userspace) = 3min 6.425s systemd-analyze plot > test.svg |
The first command shows there’s no problem with the kernel itself, and something is slow in user space. The […]