After upgrading to Ubuntu 16.04 my system boot slow down consistently
To analyze the cause I used this command.
systemd-analyze plot > boot.xml google-chrome ./boot.xml
I have found out
NetworkManager-wait-online.service was taking 7s alone so I have disabled it.
systemctl mask NetworkManager-wait-online.service
Now the result of
systemd-analyze plot show that my kernel boot time is the main cause:
Startup finished in 18.552s (kernel) + 4.704s (userspace) = 23.256s
The whole system use to boot in 10/15s no it take 18s only for the kernel
How can I found out the reason for 18s kernel boot time ?
I used @Nick suggestion
dmesg > boot.txt and I was able to find out the bottleneck points
[ 2.771745] clocksource: Switched to clocksource tsc [ 7.255226] EXT4-fs (dm-0): mounted filesystem with ordered data mode. Opts: (null) [ 18.512253] EXT4-fs (dm-1): mounted filesystem with ordered data mode. Opts: (null)
It looks there is some issue with the mounting part and maybe to LVM ...
# <file system> <mount point> <type> <options> <dump> <pass> /dev/mapper/ubuntu--vg-root / ext4 errors=remount-ro 0 1 # /boot was on /dev/sda1 during installation UUID=aa8cef14-44d2-43e4-be99-e2e826636e6b /boot ext2 defaults 0 2 #/dev/mapper/ubuntu--vg-swap_1 none swap sw 0 0 /dev/mapper/cryptswap1 none swap sw 0 0 /dev/ubuntu-vg/usr /usr ext4 defaults 1 2 /dev/ubuntu-vg/opt /opt ext4 defaults 1 2 /dev/ubuntu-vg/home /home ext4 defaults 1 2 /dev/ubuntu-vg/web /var/www/ ext4 defaults 1 2 /var/www/mysql /var/lib/mysql/ none bind
Is this a bug ? Any solution/workaround ?
dmesg > boot.txtimmediately after booting your computer, you can examine the newly-created
boot.txtto see the individual boot steps with their timestamps.