ubuntu(16.04)启动时间分析与apt-daily.service优化

启动时间查询

mingfeng@thinking:~$ systemd-analyze
Startup finished in 8.199s (kernel) + 7.865s (userspace) = 16.064s

各启动项消费的时间查询

mingfeng@thinking:~$ systemd-analyze blame 
          6.196s NetworkManager-wait-online.service
          1.069s mysql.service
          1.015s dev-sda2.device
           331ms apparmor.service
           301ms php7.0-fpm.service
           280ms accounts-daemon.service
           253ms ModemManager.service
           253ms systemd-udevd.service
           227ms networking.service
           207ms systemd-logind.service
           198ms console-setup.service
           192ms lightdm.service
           180ms systemd-cryptsetup@cryptswap1.service
...

Continue reading