Linux MInt启动速度的优化

把Windows改造成Linux 后,发现启动速度很慢

使用systemd-analyze分析后,结果如下:

复制代码
root@lmint:~# systemd-analyze 
Startup finished in 2min 4.534s (kernel) + 1min 23.405s (userspace) = 3min 27.939s 
graphical.target reached after 1min 21.910s in userspace.
root@lmint:~# 

进一步分析:

复制代码
root@lmint:~# systemd-analyze blame 
47.340s systemd-udev-settle.service
21.411s e2scrub_reap.service
18.399s logrotate.service
15.014s blueman-mechanism.service
 9.687s NetworkManager.service       -- 不可处理
 9.168s dev-sda3.device
 8.463s accounts-daemon.service      -- 不可处理
 8.232s udisks2.service              -- 自动mount U盘的服务  
 7.226s power-profiles-daemon.service
 7.044s dpkg-db-backup.service
 6.991s polkit.service
 6.959s NetworkManager-wait-online.service
 6.433s avahi-daemon.service
 6.414s dbus.service
 6.147s systemd-journal-flush.service
 5.394s switcheroo-control.service
 5.388s thermald.service
 4.880s ubuntu-system-adjustments.service
 4.843s lvm2-monitor.service
 3.818s systemd-udevd.service
 3.072s systemd-tmpfiles-setup-dev-early.service
 2.824s ModemManager.service
 2.679s plymouth-start.service
 2.658s systemd-sysctl.service
 2.351s systemd-modules-load.service
 2.289s rsyslog.service
 1.983s gpu-manager.service
 1.919s zfs-load-module.service
 1.790s apparmor.service
 1.653s grub-common.service
 1.606s cups.service
 1.492s casper-md5check.service
 1.265s systemd-resolved.service
  969ms lightdm.service
  959ms plymouth-quit-wait.service

随后,查看官方对这些服务的解释说明,将可以disable的服务,disable后,再次启动。速度快了很多。

复制代码
adminuser@lmint:~/Desktop$ systemd-analyze 
Startup finished in 3.175s (kernel) + 42.275s (userspace) = 45.450s 
graphical.target reached after 33.788s in userspace.
adminuser@lmint:~/Desktop$ 

END

相关推荐
orion5719 小时前
Missing Semester Class1:course overview and introduction of shell
linux
用户120487221611 天前
Linux驱动编译与加载
linux·嵌入式
用户805533698031 天前
Input 子系统架构:Core、Handler、Driver 三层是怎么协作的
linux·嵌入式
用户805533698031 天前
RK-Forge外设系列开篇 - 把板子从「能启动」变成「能用」:Ethernet/SPI/MMC 三个纯接线外设
linux·github·嵌入式
七歌杜金房2 天前
我终于又有了自己的 Linux 电脑
linux·debian·mac
tntxia3 天前
linux curl命令详解_curl详解
linux
扛枪的书生3 天前
Linux 网络管理器用法速查
linux
顺风尿一寸3 天前
Java Socket 内核之旅:从 SocketChannel.read() 到 tcp_recvmsg 与 epoll 的完整调用链路
linux
XIAOHEZIcode3 天前
Ubuntu 终端美化全栈指南:Bash 到 Kitty 踩坑实录
linux·ubuntu·命令行
唐青枫3 天前
别再只会用 cron:Linux systemd Timer 定时任务实战详解
linux