改善 Ubuntu 20.04 的启动时间

改善 Ubuntu 20.04 的启动时间

如何改善 Ubuntu 20.04 的启动时间?

systemd-analyze在终端中使用命令,结果如下

启动耗时 5.114 秒(内核)+ 45.128 秒(用户空间)= 50.243 秒 graphic.target 在用户空间耗时 44.915 秒后达到

然后我使用了,systemd-analyze blame结果如下:

26.151s plymouth-quit-wait.service                                             >

12.393s snapd.service                                                          >

 9.588s dev-sda7.device                                                        >
 
 9.237s systemd-journal-flush.service                                          >
 
 8.921s NetworkManager-wait-online.service                                     >
 
 8.311s networkd-dispatcher.service                                            >
 
 
 6.717s winbind.service                                                        >
 
 5.311s udisks2.service                                                        >
 
 4.917s dev-loop10.device                                                      >
 
 4.078s NetworkManager.service                                                 >
 
 3.941s accounts-daemon.service                                                >
 
 3.664s dev-loop11.device                                                      >
 
 3.640s dev-loop9.device                                                       >
 
 3.584s dev-loop3.device                                                       >
 
 3.475s dev-loop6.device                                                       >
 
 3.445s polkit.service                                                         >
 
 3.387s dev-loop13.device                                                      >
 
 3.341s dev-loop4.device                                                       >
 
 3.267s dev-loop0.device                                                       >
 
 3.116s dev-loop1.device                                                       >
 
 3.057s dev-loop8.device                                                       >
 
 2.894s dev-loop12.device                                                      >
 
 2.782s avahi-daemon.service                                                   >
 
 2.781s bluetooth.service                                                      >
 
 2.718s dev-loop5.device                                                       >
 
 2.652s dev-loop2.device                                                       >
 
 2.579s switcheroo-control.service                                             >
 
 2.568s thermald.service                                                       >
 
 2.564s wpa_supplicant.service                                                 >
 
 2.560s systemd-logind.service                                                 >
 
 2.547s grub-initrd-fallback.service                                           >
 
 2.447s dev-loop7.device                                                       >
 
 2.387s grub-common.service                                                    >
 
 1.943s secureboot-db.service                                                  >
 
 1.846s apport.service                                                         >
 
 1.712s gpu-manager.service                                                    >
 
 1.470s ModemManager.service                                                   >
 
 1.381s [email protected]                                                      >
 
 1.276s e2scrub_reap.service                                                   >
 
 1.128s gdm.service                                                            >
 
 1.092s systemd-resolved.service                                               >
 
 1.058s rsyslog.service                                                        >
 
  992ms systemd-tmpfiles-setup.service                                         >
 
  905ms laptop-mode.service                                                    >
 
  889ms systemd-rfkill.service                                                 >
 
  846ms upower.service                                                         >
 
  842ms fwupd.service                                                          >
 
  728ms systemd-udevd.service                                                  >
 
  698ms apparmor.service                                                       >
 
  658ms packagekit.service                                                     >
 
  620ms systemd-backlight@backlight:intel_backlight.service                    >
 
  620ms pppd-dns.service                                                       >
 
  583ms systemd-fsck@dev-disk-by\x2duuid-3451\x2d17B3.service                  >
 
  552ms snapd.apparmor.service                                                 >
 
  508ms snap-core-9804.mount                                                   >
 
  493ms systemd-modules-load.service                                           >
 
  475ms keyboard-setup.service                                                 >
 
  473ms systemd-journald.service                                               >
 
  471ms snap-vlc-1700.mount                                                    >
 
  462ms colord.service                                                         >
 
  448ms systemd-udev-trigger.service                                           >
 
  447ms snap-snap\x2dstore-433.mount                                           >
 
  434ms dev-disk-by\x2duuid-faed61cc\x2d41cb\x2d462b\x2dbec6\x2d0515af804cd7.sw>
 
  433ms snap-snap\x2dstore-467.mount                                           >
 
  399ms snap-chromium-1260.mount                                               >
 
  396ms snap-snapd-8790.mount                                                  >
 
  387ms snapd.seeded.service                                                   >
 
  380ms snap-gnome\x2d3\x2d34\x2d1804-36.mount                                 >
 
  372ms systemd-tmpfiles-setup-dev.service                                     >
 
  323ms snap-core18-1885.mount                                                 >
 
  319ms systemd-sysusers.service                                               >
 
  317ms snap-canonical\x2dlivepatch-95.mount                                   >
 
  310ms snap-core18-1705.mount                                                 >
 
  280ms systemd-sysctl.service                                                 >
 
  267ms snap-snapd-7264.mount                                                  >
 
  252ms plymouth-start.service                                                 >
 
  250ms openvpn.service                                                        >
 
  238ms systemd-timesyncd.service                                              >
 
  232ms systemd-random-seed.service                                            >
 
  217ms snap-onlyoffice\x2ddesktopeditors-45.mount                             >
 
  205ms [email protected]                                                   >
 
  203ms systemd-remount-fs.service                                             >
 
  197ms setvtrgb.service                                                       >
 
  190ms systemd-update-utmp-runlevel.service                                   >
 
  178ms lmt-poll.service                                                       >
 
  173ms geoclue.service                                                        >
 
  172ms systemd-user-sessions.service                                          >
 
  155ms dev-hugepages.mount                                                    >
 
  154ms dev-mqueue.mount                                                       >
 
  153ms snap-gnome\x2d3\x2d34\x2d1804-24.mount                                 >
 
  153ms sys-kernel-debug.mount                                                 >
 
  152ms sys-kernel-tracing.mount                                               >
 
  148ms kmod-static-nodes.service                                              >
 
  133ms snap-gtk\x2dcommon\x2dthemes-1506.mount                                >
 
   84ms kerneloops.service                                                     >
 
   66ms ufw.service                                                            >
 
   46ms [email protected]                                          >
 
   43ms systemd-update-utmp.service                                            >
 
   41ms boot-efi.mount                                                         >
 
   33ms console-setup.service                                                  >
 
   14ms alsa-restore.service                                                   >
 
   12ms plymouth-read-write.service                                            >
 
   11ms rtkit-daemon.service                                                   >
 
    5ms sys-fs-fuse-connections.mount                                          >
 
    4ms sys-kernel-config.mount                                                >
 
    3ms snapd.socket                                                           >

lines 84-106/106 (END)

  190ms systemd-update-utmp-runlevel.service                                     

  178ms lmt-poll.service                                                         

  173ms geoclue.service                                                          


  172ms systemd-user-sessions.service                                            

  155ms dev-hugepages.mount                                                      

  154ms dev-mqueue.mount                                                         

  153ms snap-gnome\x2d3\x2d34\x2d1804-24.mount                                   

  153ms sys-kernel-debug.mount                                                   

  152ms sys-kernel-tracing.mount                                                 

  148ms kmod-static-nodes.service                                                

  133ms snap-gtk\x2dcommon\x2dthemes-1506.mount                                  

   84ms kerneloops.service                                                       

   66ms ufw.service                                                              

   46ms [email protected]                                            

   43ms systemd-update-utmp.service                                              

   41ms boot-efi.mount                                                           

   33ms console-setup.service                                                    

   14ms alsa-restore.service                                                     

   12ms plymouth-read-write.service                                              

   11ms rtkit-daemon.service                                                     

    5ms sys-fs-fuse-connections.mount                                            

    4ms sys-kernel-config.mount                                                  
    3ms snapd.socket                                                             
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
lines 84-106/106 (END)

  190ms systemd-update-utmp-runlevel.service                                     

  178ms lmt-poll.service                                                         

  173ms geoclue.service                                                          

  172ms systemd-user-sessions.service                                            

  155ms dev-hugepages.mount                                                      

  154ms dev-mqueue.mount                                                         

  153ms snap-gnome\x2d3\x2d34\x2d1804-24.mount                                   

  153ms sys-kernel-debug.mount                                                   

  152ms sys-kernel-tracing.mount                                                 

  148ms kmod-static-nodes.service                                                

  133ms snap-gtk\x2dcommon\x2dthemes-1506.mount                                  

   84ms kerneloops.service                                                       

   66ms ufw.service                                                              

   46ms [email protected]                                            

   43ms systemd-update-utmp.service                                              

   41ms boot-efi.mount                                                           

   33ms console-setup.service                                                    

   14ms alsa-restore.service                                                     

   12ms plymouth-read-write.service                                              

   11ms rtkit-daemon.service                                                     

    5ms sys-fs-fuse-connections.mount                                            

    4ms sys-kernel-config.mount                                                  

    3ms snapd.socket                                                             

~

~
~
~
~
~
~
~
~
~
~
~
~
~
lines 84-106/106 (END)

  190ms systemd-update-utmp-runlevel.service                                  >

  178ms lmt-poll.service                                                      >

  173ms geoclue.service                                                       >

  172ms systemd-user-sessions.service                                         >

  155ms dev-hugepages.mount                                                   >

  154ms dev-mqueue.mount                                                      >

  153ms snap-gnome\x2d3\x2d34\x2d1804-24.mount                                >

  153ms sys-kernel-debug.mount                                                >

  152ms sys-kernel-tracing.mount                                              >

  148ms kmod-static-nodes.service                                             >

  133ms snap-gtk\x2dcommon\x2dthemes-1506.mount                               >

   84ms kerneloops.service                                                    >

   66ms ufw.service                                                           >

   46ms [email protected]                                         >

   43ms systemd-update-utmp.service                                           >

   41ms boot-efi.mount                                                        >

   33ms console-setup.service                                                 >

   14ms alsa-restore.service                                                  >

   12ms plymouth-read-write.service                                           >

   11ms rtkit-daemon.service                                                  >

    5ms sys-fs-fuse-connections.mount                                         >

    4ms sys-kernel-config.mount                                               >

lines 84-105/106 99%

  190ms systemd-update-utmp-runlevel.service                             >

  178ms lmt-poll.service                                                 >

  173ms geoclue.service                                                  >

  172ms systemd-user-sessions.service                                    >

  155ms dev-hugepages.mount                                              >

  154ms dev-mqueue.mount                                                 >

  153ms snap-gnome\x2d3\x2d34\x2d1804-24.mount                           >

  153ms sys-kernel-debug.mount                                           >

  152ms sys-kernel-tracing.mount                                         >

  148ms kmod-static-nodes.service                                        >

  133ms snap-gtk\x2dcommon\x2dthemes-1506.mount                          >

   84ms kerneloops.service                                               >

   66ms ufw.service                                                      >

   46ms [email protected]                                    >

   43ms systemd-update-utmp.service                                      >

   41ms boot-efi.mount                                                   >

   33ms console-setup.service                                            >

   14ms alsa-restore.service                                             >

   12ms plymouth-read-write.service                                      >

   11ms rtkit-daemon.service                                             >

lines 84-103/106 97%

  203ms systemd-remount-fs.service                                            >

  197ms setvtrgb.service                                                      >

  190ms systemd-update-utmp-runlevel.service                                  >

  178ms lmt-poll.service                                                      >

  173ms geoclue.service                                                       >

  172ms systemd-user-sessions.service                                         >

  155ms dev-hugepages.mount                                                   >

  154ms dev-mqueue.mount                                                      >

  153ms snap-gnome\x2d3\x2d34\x2d1804-24.mount                                >

  153ms sys-kernel-debug.mount                                                >

  152ms sys-kernel-tracing.mount                                              >

  148ms kmod-static-nodes.service                                             >

  133ms snap-gtk\x2dcommon\x2dthemes-1506.mount                               >

   84ms kerneloops.service                                                    >

   66ms ufw.service                                                           >

   46ms [email protected]                                         >

   43ms systemd-update-utmp.service                                           >

   41ms boot-efi.mount                                                        >

   33ms console-setup.service                                                 >

   14ms alsa-restore.service                                                  >

   12ms plymouth-read-write.service                                           >

   11ms rtkit-daemon.service                                                  >

    5ms sys-fs-fuse-connections.mount                                         >

    4ms sys-kernel-config.mount                                               >

    3ms snapd.socket                                                          >

我有什么选择可以进一步缩短启动时间?提前致谢。

有关所用硬件的更新:

戴尔 5521 笔记本电脑

Intel® Core™ i5-3337U CPU @ 1.80GHz × 4

英特尔® 高清显卡 4000 (IVB GT2)

16 GB 内存

1TB 硬盘

相关内容