启动加速建议

启动加速建议

我正在寻找建议,以找出为什么启动需要超过 1 分钟。以及如何加快启动速度。

nuc:~$ systemd-analyze 
Startup finished in 7.887s (firmware) + 6.265s (loader) + 7.309s (kernel) + 1min 6.801s (userspace) = 1min 28.263s 
graphical.target reached after 1min 6.727s in userspace
nuc:~$ systemd-analyze critical-chain 

graphical.target @1min 6.727s
└─multi-user.target @1min 6.727s
  └─smbd.service @54.197s +4.149s
    └─nmbd.service @44.066s +10.124s
      └─network-online.target @43.929s
        └─NetworkManager-wait-online.service @32.601s +11.326s
          └─NetworkManager.service @25.057s +7.537s
            └─dbus.service @25.052s
              └─basic.target @24.994s
                └─sockets.target @24.994s
                  └─snapd.socket @24.988s +4ms
                    └─sysinit.target @24.780s
                      └─systemd-timesyncd.service @24.562s +217ms
                        └─systemd-tmpfiles-setup.service @24.085s +458ms
                          └─systemd-journal-flush.service @4.517s +19.565s
                            └─systemd-remount-fs.service @4.290s +130ms
                              └─systemd-fsck-root.service @4.195s +92ms
                                └─systemd-journald.socket @4.102s
                                  └─-.mount @4.090s
                                    └─system.slice @4.090s
                                      └─-.slice @4.090s

nuc:~$ systemd-analyze blame 

33.123s plymouth-quit-wait.service                                                               
19.565s systemd-journal-flush.service                                                            
19.369s snapd.service                                                                            
16.006s dev-sda3.device                                                                          
13.470s udisks2.service                                                                          
13.317s networkd-dispatcher.service                                                              
11.326s NetworkManager-wait-online.service                                                       
11.225s accounts-daemon.service                                                                  
10.124s nmbd.service                                                                             
 7.716s polkit.service                                                                           
 7.565s dev-loop11.device                                                                        
 7.553s avahi-daemon.service                                                                     
 7.549s bluetooth.service                                                                        
 7.537s NetworkManager.service                                                                   
 7.303s dev-loop12.device                                                                        
 7.300s dev-loop14.device                                                                        
 6.816s dev-loop4.device                                                                         
 6.806s dev-loop3.device                                                                         
 6.806s dev-loop5.device                                                                         
 6.802s dev-loop2.device                                                                         
 6.798s dev-loop9.device                                                                         
 6.796s dev-loop13.device                                                                        
 6.794s dev-loop8.device                                                                         
 6.469s switcheroo-control.service                                                               
 6.448s thermald.service                                                                         
 6.448s systemd-logind.service                                                                   
 6.432s wpa_supplicant.service                                                                   
 5.896s dev-loop7.device                                                                         
 5.649s dev-loop6.device                                                                         
 5.517s dev-loop10.device                                                                        
 5.219s dev-loop1.device                                                                         
 4.309s ModemManager.service                                                                     
 4.255s [email protected]                                                                        
 4.149s smbd.service                                                                             
 3.875s apport.service                                                                           
 3.548s systemd-resolved.service                                                                 
 3.499s gpu-manager.service                                                                      
 2.821s secureboot-db.service                                                                    
 2.712s fwupd.service                                                                            
 2.540s rsyslog.service                                                                          
 2.471s dev-loop0.device                                                                         
 2.204s gdm.service                                                                              
 1.713s ssh.service                                                                              
 1.618s systemd-udevd.service                                                                    
 1.614s grub-common.service                                                                      
 1.374s e2scrub_reap.service                                                                     
 1.239s upower.service                                                                           
 1.238s apparmor.service                                                                         
 1.200s snapd.seeded.service                                                                     
 1.175s systemd-rfkill.service                                                                   
  909ms snap-bare-5.mount                                                                        
  878ms snap-core18-2284.mount                                                                   
  867ms snap-core18-2344.mount                                                                   
  849ms snap-core20-1376.mount                                                                   
  836ms snap-core20-1405.mount                                                                   
  796ms grub-initrd-fallback.service                                                             
  791ms snap-gnome\x2d3\x2d34\x2d1804-72.mount                                                   
  740ms snap-gnome\x2d3\x2d34\x2d1804-77.mount                                                   
  673ms systemd-modules-load.service                                                             
  671ms snapd.apparmor.service                                                                   
  655ms systemd-backlight@backlight:acpi_video0.service                                          
  650ms systemd-user-sessions.service                                                            
  640ms snap-gnome\x2d3\x2d38\x2d2004-87.mount                                                   
  546ms keyboard-setup.service                                                                   
  539ms systemd-random-seed.service                                                              
  516ms systemd-sysusers.service                                                                 
  513ms systemd-tmpfiles-setup-dev.service                                                       
  493ms snap-gnome\x2d3\x2d38\x2d2004-99.mount                                                   
  487ms systemd-udev-trigger.service                                                             
  458ms systemd-tmpfiles-setup.service                                                           
  436ms snap-gtk\x2dcommon\x2dthemes-1515.mount                                                  
  433ms systemd-sysctl.service                                                                   
  398ms boot-efi.mount                                                                           
  366ms alsa-restore.service                                                                     
  356ms openvpn.service                                                                          
  351ms ir-keytable-load.service                                                                 
  295ms systemd-journald.service                                                                 
  282ms pppd-dns.service                                                                         
  247ms ufw.service                                                                              
  246ms snap-snapd-15177.mount                                                                   
  229ms systemd-tmpfiles-clean.service                                                           
  228ms snap-gtk\x2dcommon\x2dthemes-1519.mount                                                  
  217ms systemd-timesyncd.service                                                                
  215ms plymouth-start.service                                                                   
  202ms home.mount                                                                               
  195ms [email protected]                                                                     
  192ms colord.service                                                                           
  185ms kerneloops.service                                                                       
  182ms snap-snap\x2dstore-547.mount                                                             
  177ms dev-hugepages.mount                                                                      
  174ms dev-mqueue.mount                                                                         
  174ms snap-snapd-14978.mount                                                                   
  172ms sys-kernel-debug.mount                                                                   
  172ms sys-kernel-tracing.mount                                                                 
  170ms kmod-static-nodes.service                                                                
  146ms snap-snap\x2dstore-558.mount                                                             
  130ms systemd-remount-fs.service                                                               
   95ms console-setup.service                                                                    
   92ms systemd-fsck-root.service                                                                
   81ms [email protected]                                                            
   78ms systemd-update-utmp.service                                                              
   59ms setvtrgb.service                                                                         
   53ms rtkit-daemon.service                                                                     
   41ms finalrd.service                                                                          
   24ms systemd-update-utmp-runlevel.service                                                     
   15ms sys-fs-fuse-connections.mount                                                            
   15ms plymouth-read-write.service                                                              
   12ms sys-kernel-config.mount                                                                  
    6ms systemd-fsck@dev-disk-by\x2duuid-8986\x2dED70.service                                    
    5ms systemd-fsck@dev-disk-by\x2duuid-4daa739b\x2df12b\x2d48f5\x2db0e0\x2dd8dbf417237c.service
    5ms nordvpnd.socket                                                                          
    4ms snapd.socket

编辑 1:关键链显示 smbd 和 nmbd 耗时。禁用后差别不大。然后 snapd 开始运行。

相关内容