一周以来,我的系统启动速度非常慢。以下是 systemd-analyze blame 的结果:
50.961s vmware-workstation-server.service
26.680s dev-sda1.device
24.653s plymouth-quit-wait.service
23.519s systemd-journal-flush.service
23.178s keyboard-setup.service
18.941s mysql.service
16.426s lvm2-monitor.service
15.701s systemd-udevd.service
14.480s systemd-sysctl.service
6.972s NetworkManager-wait-online.service
5.991s plymouth-start.service
5.951s NetworkManager.service
5.512s snapd.service
5.116s [email protected]
4.912s udisks2.service
4.358s ModemManager.service
4.212s networkd-dispatcher.service
4.134s accounts-daemon.service
3.831s vmware-USBArbitrator.service
3.705s libvirtd.service
3.647s thermald.service
3.534s virtualbox.service
3.242s systemd-tmpfiles-setup-dev.service
以及 systemd-analyze critical-chain:
graphical.target @1min 39.914s
└─multi-user.target @1min 39.914s
└─vmware-workstation-server.service @48.953s +50.961s
└─network-online.target @45.787s
└─NetworkManager-wait-online.service @38.814s +6.972s
└─NetworkManager.service @32.861s +5.951s
└─dbus.service @32.821s
└─basic.target @32.821s
└─sockets.target @32.821s
└─snapd.socket @32.798s +22ms
└─sysinit.target @32.774s
└─cryptsetup.target @32.774s
└─systemd-ask-password-wall.path @3.501s
└─-.mount @3.487s
└─system.slice @3.501s
└─-.slice @3.487s
我知道这太多了。我知道问题可能出在哪里。但我不知道如何解决。非常感谢您的帮助。
更新
23.122s dev-sda1.device
17.428s keyboard-setup.service
17.241s plymouth-quit-wait.service
15.802s lvm2-monitor.service
15.701s systemd-tmpfiles-setup-dev.service
14.746s systemd-journal-flush.service
14.029s systemd-sysctl.service
12.552s mysql.service
7.669s NetworkManager-wait-online.service
6.739s snapd.service
6.179s [email protected]
6.151s plymouth-start.service
4.449s NetworkManager.service
4.443s libvirtd.service
4.414s networkd-dispatcher.service
4.078s udisks2.service
2.674s systemd-udevd.service
2.214s thermald.service
2.175s ModemManager.service
2.083s accounts-daemon.service
答案1
dev-sda1.device 的条目和其他几个条目表明问题出在硬盘驱动器的速度上。
SSD(固态硬盘)将显著加快启动速度。
请注意,plymouth-quit-wait.service 等服务的缓慢仅仅表明它正在等待其他东西 - 在这种情况下,刷新到磁盘。
如果您发现情况变得更糟,则可能是您的硬盘已满或您安装了更多软件,这会使启动速度稍微慢一些,但更换硬盘会带来最大的改善。