我安装了全新的 Kubuntu 22.04.1,几天后它突然变得非常慢。
执行结果systemd-analyze critical-chain
如下:
The time when unit became active or started is printed after the "@" character.
The time the unit took to start is printed after the "+" character.
graphical.target @2min 46.588s
└─multi-user.target @2min 46.588s
└─docker.service @2min 35.488s +11.099s
└─network-online.target @2min 35.451s
└─NetworkManager-wait-online.service @2min 14.648s +20.802s
└─NetworkManager.service @2min 14.118s +489ms
└─dbus.service @2min 14.115s
└─basic.target @2min 14.096s
└─sockets.target @2min 14.096s
└─snapd.socket @2min 14.094s +1ms
└─sysinit.target @2min 14.057s
└─snapd.apparmor.service @2min 13.778s +279ms
└─apparmor.service @2min 13.344s +400ms
└─local-fs.target @2min 13.320s
└─run-snapd-ns-cups.mnt.mount @2min 17.898s
└─run-snapd-ns.mount @2min 17.533s
└─local-fs-pre.target @1min 50.253s
└─systemd-tmpfiles-setup-dev.service @1min 38.311s +11.941s
└─systemd-sysusers.service @1min 27.128s +11.163s
└─systemd-remount-fs.service @1min 24.213s +2.856s
└─systemd-journald.socket @1min 22.191s
└─-.mount @1min 22.154s
└─-.slice @1min 22.154s
这是我正在使用的发行版。
$ cat /etc/*-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"
PRETTY_NAME="Ubuntu 22.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
$ uname -a
Linux $MACHINE_NAME 5.15.0-53-generic #59-Ubuntu SMP Mon Oct 17 18:53:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
操作系统突然变得非常慢。上次使用时它一点也不慢,而且启动起来非常顺利。我使用的是 SSD 驱动器。
编辑:输出systemd-analyze blame
:
$ systemd-analyze blame
48.753s dev-sda2.device
48.552s mullvad-early-boot-blocking.service
45.814s systemd-journal-flush.service
22.991s systemd-sysctl.service
20.802s NetworkManager-wait-online.service
19.169s systemd-modules-load.service
14.611s snap-bare-5.mount
14.023s snap-chromium-2188.mount
13.496s snap-chromium-2193.mount
12.256s snap-core18-2620.mount
11.941s systemd-tmpfiles-setup-dev.service
11.163s systemd-sysusers.service
11.099s docker.service
10.740s snap-core20-1587.mount
10.143s systemd-random-seed.service
10.064s snap-core20-1695.mount
9.893s systemd-udev-trigger.service
9.571s keyboard-setup.service
8.932s snap-core22-310.mount
7.580s snap-cups-836.mount
7.110s dev-loop14.device
7.106s dev-loop10.device
7.105s dev-loop13.device
7.072s dev-loop9.device
7.071s dev-loop12.device
7.068s dev-loop11.device
6.935s dev-loop15.device
6.924s dev-loop8.device
6.846s dev-loop0.device
6.845s dev-loop1.device
6.840s dev-loop6.device
6.838s dev-loop4.device
6.836s dev-loop5.device
6.835s dev-loop3.device
6.835s dev-loop7.device
6.739s dev-loop2.device
6.436s snap-discord-145.mount
6.382s dev-loop17.device
6.286s dev-loop16.device
6.186s systemd-udevd.service
5.608s snap-firefox-1635.mount
5.545s swapfile.swap
4.616s systemd-journald.service
4.569s snap-gnome\x2d3\x2d34\x2d1804-77.mount
3.561s snap-gnome\x2d3\x2d38\x2d2004-112.mount
3.268s snapd.service
3.173s snap-gnome\x2d3\x2d38\x2d2004-119.mount
3.104s bolt.service
2.856s systemd-remount-fs.service
2.565s snap-gnome\x2d42\x2d2204-29.mount
2.531s kerneloops.service
2.193s containerd.service
2.183s dev-hugepages.mount
2.181s dev-mqueue.mount
2.178s sys-kernel-debug.mount
2.175s sys-kernel-tracing.mount
1.936s kmod-static-nodes.service
1.935s [email protected]
1.934s [email protected]
1.933s [email protected]
1.770s snap-gtk\x2dcommon\x2dthemes-1535.mount
1.280s networkd-dispatcher.service
1.111s udisks2.service
1.050s accounts-daemon.service
1.028s snap-snapd-17336.mount
1.024s snap-slack-67.mount
1.015s apt-daily.service
928ms ModemManager.service
740ms snap-snapd-17576.mount
611ms cups.service
555ms polkit.service
553ms power-profiles-daemon.service
495ms bluetooth.service
495ms avahi-daemon.service
489ms NetworkManager.service
448ms thermald.service
446ms systemd-logind.service
444ms systemd-resolved.service
429ms wpa_supplicant.service
400ms apparmor.service
363ms gpu-manager.service
356ms smartmontools.service
352ms secureboot-db.service
348ms ssh.service
279ms e2scrub_reap.service
279ms snapd.apparmor.service
275ms apport.service
265ms rsyslog.service
261ms systemd-timesyncd.service
251ms upower.service
225ms sys-fs-fuse-connections.mount
224ms sys-kernel-config.mount
222ms systemd-tmpfiles-setup.service
218ms ua-timer.service
181ms systemd-tmpfiles-clean.service
175ms systemd-fsck@dev-disk-by\x2duuid-307A\x2d2082.service
135ms packagekit.service
121ms [email protected]
102ms snapd.seeded.service
101ms plymouth-start.service
92ms systemd-rfkill.service
82ms alsa-restore.service
72ms plymouth-quit.service
70ms setvtrgb.service
64ms modprobe@chromeos_pstore.service
62ms fwupd-refresh.service
59ms boot-efi.mount
44ms systemd-backlight@leds:tpacpi::kbd_backlight.service
40ms [email protected]
40ms plymouth-read-write.service
40ms grub-initrd-fallback.service
37ms proc-sys-fs-binfmt_misc.mount
33ms systemd-backlight@backlight:intel_backlight.service
33ms ufw.service
26ms sddm.service
19ms systemd-user-sessions.service
18ms grub-common.service
15ms systemd-update-utmp.service
12ms console-setup.service
9ms modprobe@efi_pstore.service
8ms rtkit-daemon.service
7ms modprobe@pstore_blk.service
6ms modprobe@pstore_zone.service
4ms [email protected]
4ms systemd-update-utmp-runlevel.service
2ms docker.socket
1ms snapd.socket
blkid
和的输出lsblk
:
$blkid
/dev/sda2: UUID="2db45c19-bd8f-4faa-ab82-777ee377b5b7" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="238144ae-ec8d-4c17-a2de-19497332f33a"
$lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 145.5M 1 loop /snap/chromium/2188
loop1 7:1 0 4K 1 loop /snap/bare/5
loop2 7:2 0 145.3M 1 loop /snap/chromium/2193
loop3 7:3 0 55.6M 1 loop /snap/core18/2620
loop4 7:4 0 62M 1 loop /snap/core20/1587
loop5 7:5 0 63.2M 1 loop /snap/core20/1695
loop6 7:6 0 72.8M 1 loop /snap/core22/310
loop7 7:7 0 55.1M 1 loop /snap/cups/836
loop8 7:8 0 81.4M 1 loop /snap/discord/145
loop9 7:9 0 163.3M 1 loop /snap/firefox/1635
loop10 7:10 0 219M 1 loop /snap/gnome-3-34-1804/77
loop11 7:11 0 400.8M 1 loop /snap/gnome-3-38-2004/112
loop12 7:12 0 346.3M 1 loop /snap/gnome-3-38-2004/119
loop13 7:13 0 414.3M 1 loop /snap/gnome-42-2204/29
loop14 7:14 0 91.7M 1 loop /snap/gtk-common-themes/1535
loop15 7:15 0 112.6M 1 loop /snap/slack/67
loop16 7:16 0 48M 1 loop /snap/snapd/17336
loop17 7:17 0 49.6M 1 loop /snap/snapd/17576
sda 8:0 0 476.9G 0 disk
├─sda1 8:1 0 512M 0 part /boot/efi
└─sda2 8:2 0 476.4G 0 part /
sdb 8:16 1 0B 0 disk
编辑2:我已附加启动屏幕的屏幕截图,显然containerd
,无论出于什么原因,启动屏幕都失败了docker engine
。snapd
编辑3:因此,从我的系统中完全删除后docker
,containerd
问题仍然存在。
$systemd-analyze critical-chain
graphical.target @1min 49.545s
└─multi-user.target @1min 49.544s
└─snapd.seeded.service @1min 49.115s +428ms
└─snapd.service @26.943s +1min 22.164s
└─basic.target @26.858s
└─sockets.target @26.858s
└─snapd.socket @26.857s +570us
└─sysinit.target @26.853s
└─snapd.apparmor.service @26.524s +328ms
└─apparmor.service @14.232s +12.289s
└─local-fs.target @14.231s
└─run-snapd-ns.mount @1min 48.407s
└─local-fs-pre.target @1.001s
└─systemd-tmpfiles-setup-dev.service @948ms +52ms
└─systemd-sysusers.service @907ms +39ms
└─systemd-remount-fs.service @856ms +49ms
└─systemd-journald.socket @827ms
└─system.slice @823ms
└─-.slice @823ms