Ubuntu 17.10启动时Mysql初始化非常慢

Ubuntu 17.10启动时Mysql初始化非常慢

Ubuntu 17.10 的启动周期大约需要 1 分 30 秒,对于配备 8GB 和 I5 处理器的笔记本电脑来说,这个时间似乎很长。分析时systemd-analize我得到了以下信息:

systemd-analyze blame 

59.481s plymouth-quit-wait.service    
53.490s mysql.service    
16.685s snapd.service
14.406s php7.1-fpm.service
14.230s dev-sda5.device
13.972s NetworkManager-wait-online.service
13.432s apparmor.service
11.119s ModemManager.service
11.070s [email protected]
10.218s dev-loop0.device
9.354s apache2.service
8.673s NetworkManager.service
7.050s udisks2.service
6.220s gpu-manager.service
5.928s accounts-daemon.service
5.310s grub-common.service
4.365s wpa_supplicant.service
4.365s fwupd.service
4.339s phpsessionclean.service
4.150s networking.service
3.909s vboxdrv.service
3.863s apport.service
3.648s thermald.service

systemd-analyze critical-chain

graphical.target @1min 30.755s
└─multi-user.target @1min 30.755s
  └─mysql.service @30.967s +53.490s
    └─network.target @30.930s
      └─wpa_supplicant.service @34.630s +4.365s
        └─basic.target @19.735s
          └─sockets.target @19.735s
            └─snapd.socket @19.612s +121ms
              └─sysinit.target @19.612s
                └─swap.target @19.612s
                  └─dev-disk-by\x2duuid-0b094dfb\x2dcb40\x2d4754\x2d8fdb\x2de1ef130fad55.swap @19.497s +114ms
                    └─dev-disk-by\x2duuid-0b094dfb\x2dcb40\x2d4754\x2d8fdb\x2de1ef130fad55.device @19.496s

看来问题似乎出在mysql.service上。我需要知道这个结论是否正确,以及该怎么做才能纠正这个问题。

谢谢。

相关内容