我在 Dell G5 5587 上使用 Kubuntu 18.04。目前我的 SSD 上安装了 Win10,处于 RAID 模式,而 HDD 上安装了 ubuntu。由于 Ubuntu 无法识别 RAID SSD,我可以从一次性启动菜单在 Win 和 Ubuntu 之间切换。
我试图找出问题所在,但却找不到任何有用的信息。
systemd-analyze time
:
Startup finished in 7.196s (firmware) + 6.311s (loader) + 33.705s (kernel) + 9min 10.475s (userspace) = 9min 57.688s
graphical.target reached after 1min 6.000s in userspace
结果如下systemd-analyze blame
:
7min 23.369s apt-daily-upgrade.service
45.488s apt-daily.service
36.823s systemd-journal-flush.service
33.693s dev-sda3.device
33.330s ufw.service
25.787s systemd-udevd.service
11.314s mpd.service
10.723s phpsessionclean.service
9.636s systemd-tmpfiles-clean.service
9.218s mysql.service
8.353s NetworkManager.service
7.977s gpu-manager.service
6.713s NetworkManager-wait-online.service
4.722s udisks2.service
4.567s grub-common.service
3.718s snapd.service
3.568s networkd-dispatcher.service
3.347s keyboard-setup.service
3.211s ModemManager.service
2.941s packagekit.service
2.820s systemd-tmpfiles-setup-dev.service
2.477s accounts-daemon.service
2.403s systemd-resolved.service
2.286s systemd-timesyncd.service
2.001s apache2.service
1.900s colord.service
1.722s avahi-daemon.service
1.632s mnt-peterkovach-tempus.mount
1.624s mnt-peterkovach-bioinfo.mount
1.520s mnt-peterkovach-users.mount
1.464s systemd-remount-fs.service
1.408s dev-mqueue.mount
1.408s sys-kernel-debug.mount
1.408s dev-hugepages.mount
1.396s thermald.service
1.384s systemd-modules-load.service
1.068s mnt-peterkovach-Data.mount
1.068s swapfile.swap
850ms systemd-sysctl.service
845ms systemd-update-utmp.service
828ms wpa_supplicant.service
730ms systemd-tmpfiles-setup.service
723ms polkit.service
719ms fstrim.service
654ms systemd-random-seed.service
447ms [email protected]
440ms rsyslog.service
410ms systemd-journald.service
384ms boot-efi.mount
381ms apparmor.service
320ms systemd-logind.service
276ms upower.service
260ms kmod-static-nodes.service
212ms setvtrgb.service
189ms plymouth-read-write.service
135ms plymouth-quit.service
116ms snapd.socket
108ms systemd-fsck@dev-disk-by\x2duuid-C783\x2d9061.service
105ms systemd-udev-trigger.service
99ms rtkit-daemon.service
89ms snapd.seeded.service
80ms apport.service
57ms nvidia-persistenced.service
33ms [email protected]
33ms plymouth-start.service
31ms systemd-rfkill.service
12ms systemd-update-utmp-runlevel.service
9ms bluetooth.service
6ms alsa-restore.service
6ms kerneloops.service
6ms sddm.service
5ms pppd-dns.service
3ms ureadahead-stop.service
2ms systemd-backlight@backlight:intel_backlight.service
2ms systemd-user-sessions.service
1ms console-setup.service
1ms systemd-backlight@leds:dell::kbd_backlight.service
1ms sys-kernel-config.mount
1ms sys-fs-fuse-connections.mount
的结果systemd-analyze critical-chain
:
graphical.target @1min 6.000s
└─multi-user.target @1min 6.000s
└─cups-browsed.service @6min 41.635s
└─cups.service @6min 41.633s
└─cups.path @6min 41.631s
└─sysinit.target @46.162s
└─systemd-timesyncd.service @43.875s +2.286s
└─systemd-tmpfiles-setup.service @43.020s +730ms
└─systemd-journal-flush.service @6.196s +36.823s
└─systemd-remount-fs.service @4.731s +1.464s
└─systemd-journald.socket @4.670s
└─system.slice @4.670s
└─-.slice @4.635s
您有什么建议可以加快速度吗?提前致谢!
答案1
部分解决方案可在此处找到:Ubuntu 16.04 启动缓慢(apt-daily.service)
接受的答案是:
这是Debian 错误 #844453. apt-daily.service
不应在启动期间运行,而应在启动后的某个时间运行。
作为一种解决方法,请将sudo systemctl edit apt-daily.timer
以下文本粘贴到编辑器窗口中:
# apt-daily timer configuration override
[Timer]
OnBootSec=15min
OnUnitActiveSec=1d
AccuracySec=1h
RandomizedDelaySec=30min
这会将触发的“计时器”更改为apt-daily.service
在启动后 15 分钟到 45 分钟之间的随机时间运行,此后每天运行一次。请参阅systemd.timer 手册页以获得关于其含义的额外解释(可惜写得不是很好)。
解决方案的第二部分可以在这里找到:
我本来想融入其中,但使用手机很尴尬。
答案2
除了 WinEunuuchs2Unix 安装 haveged 或 rng-tools 的答案之外。
看来你也遇到了熵不够的问题。你可以在登录后直接使用以下命令进行检查cat /proc/sys/kernel/random/entropy_avail
如果该值过低(低于 1000),则使用 /dev/random 生成随机性将需要很长时间,因为应用程序会阻塞,直到您拥有足够的熵。换句话说,您在生成密钥或使用 OpenSSL API 时会看到速度很慢。