谁能帮我找出为什么我的 20.04 Ubuntu 这么慢?

谁能帮我找出为什么我的 20.04 Ubuntu 这么慢?

我附上了显示systemd-analyze启动我的 PC 大约需要 1 分 50 秒的输出。除此之外,我的应用程序打开速度非常慢(Chrome、Klyaout、MATLAB 等)。我的技术水平不高,如果需要进一步挖掘才能找到答案,也请告诉我。

:~$ systemd-analyze 
Startup finished in 30.147s (firmware) + 13.579s (loader) + 3.658s (kernel) + 1min 3.422s (userspace) = 1min 50.807s 
graphical.target reached after 1min 3.378s in userspace

我读过一些关于 amd-ryzen 和 nvidia 的文章(我有),但我在 18.04 上遇到了这些问题,而且一切正常,我不能说这些问题是否会给我带来问题。

我现在添加了结果systemd-analyze blame

35.298s plymouth-quit-wait.service                           
21.787s man-db.service                                       
16.798s networkd-dispatcher.service                          
13.833s systemd-journal-flush.service                        
13.442s snapd.service                                        
11.710s udisks2.service                                      
11.560s dev-sdb5.device                                      
 9.847s logrotate.service                                    
 9.765s NetworkManager-wait-online.service                   
 8.394s accounts-daemon.service                              
 8.199s polkit.service                                       
 7.343s avahi-daemon.service                                 
 7.341s bluetooth.service                                    
 7.332s NetworkManager.service                               
 7.301s switcheroo-control.service                           
 7.297s thermald.service                                     
 7.297s systemd-logind.service                               
 7.295s wpa_supplicant.service                               
 5.014s dev-loop8.device                                     
 4.691s dev-loop3.device                                     
 4.154s dev-loop13.device                                    
 4.001s dev-loop7.device                                     
 3.941s dev-loop11.device                                    
 3.904s grub-common.service                                  
 3.903s dev-loop10.device                                    
 3.858s apport.service                                       
 3.857s dev-loop12.device                                    
 3.725s dev-loop14.device                                    
 3.672s gpu-manager.service                                  
 3.651s ModemManager.service                                 
 3.639s dev-loop9.device                                     
 3.529s dev-loop1.device                                     
 3.497s dev-loop0.device                                     
 3.433s dev-loop5.device                                     
 3.409s dev-loop6.device                                     
 3.223s dev-loop2.device                                     
 3.199s dev-loop4.device                                     
 2.837s systemd-fsck@dev-disk-by\x2duuid-0CFC\x2dE96E.service
 2.799s [email protected]                                     
 2.691s fwupd.service                                        
 2.537s gdm.service                                          
 2.367s systemd-resolved.service                             
 1.953s rsyslog.service                                      
 1.723s systemd-udevd.service                                
 1.701s plymouth-start.service                               
 1.676s e2scrub_reap.service                                 
 1.612s grub-initrd-fallback.service                         
 1.604s fwupd-refresh.service                                
 1.406s apparmor.service                                     
 1.131s systemd-sysctl.service                               
  813ms systemd-modules-load.service                         
  812ms snap-core18-1932.mount                               
  696ms snap-gnome\x2d3\x2d28\x2d1804-128.mount              
  667ms snap-snap\x2dstore-481.mount                         
  657ms snap-core-10126.mount
619ms snap-core-10185.mount                                
  602ms pppd-dns.service                                     
  596ms snap-snap\x2dstore-467.mount                         
  562ms snapd.apparmor.service                               
  550ms nvidia-persistenced.service                          
  545ms systemd-journald.service                             
  540ms snap-gtk\x2dcommon\x2dthemes-1506.mount              
  528ms upower.service                                       
  513ms snapd.seeded.service                                 
  511ms systemd-sysusers.service                             
  502ms snap-gnome\x2d3\x2d34\x2d1804-36.mount               
  473ms systemd-random-seed.service                          
  453ms keyboard-setup.service                               
  441ms systemd-rfkill.service                               
  440ms systemd-tmpfiles-setup.service                       
  423ms swapfile.swap                                        
  408ms snap-qucs\x2dspice-4.mount                           
  395ms snap-core18-1885.mount                               
  386ms snap-snapd-9721.mount                                
  384ms snap-teams\x2dfor\x2dlinux-105.mount                 
  384ms [email protected]                                 
  369ms snap-gnome\x2d3\x2d34\x2d1804-60.mount               
  352ms snap-gnome\x2d3\x2d28\x2d1804-145.mount              
  330ms systemd-tmpfiles-setup-dev.service                   
  318ms colord.service                                       
  270ms kerneloops.service                                   
  248ms snap-snapd-9607.mount                                
  242ms openvpn.service                                      
  237ms systemd-user-sessions.service                        
  218ms systemd-udev-trigger.service                         
  171ms systemd-timesyncd.service                            
  168ms ufw.service                                          
  153ms console-setup.service                                
  152ms dev-hugepages.mount                                  
  152ms dev-mqueue.mount                                     
  151ms sys-kernel-debug.mount                               
  151ms sys-kernel-tracing.mount                             
  149ms kmod-static-nodes.service                            
  148ms systemd-remount-fs.service                           
  114ms boot-efi.mount                                       
   93ms [email protected]                                    
   72ms plymouth-read-write.service                          
   68ms rtkit-daemon.service                                 
   52ms [email protected]                         
   43ms setvtrgb.service                                     
   17ms systemd-update-utmp.service                          
   13ms alsa-restore.service                                 
    7ms [email protected]                        
    6ms systemd-tmpfiles-clean.service                       
    6ms systemd-update-utmp-runlevel.service                 
    1ms sys-fs-fuse-connections.mount                        
    1ms sys-kernel-config.mount                              
  514us snapd.socket   

我还添加了以下结果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 @1min 3.378s
└─multi-user.target @1min 3.378s
  └─kerneloops.service @37.662s +270ms
    └─network-online.target @37.600s
      └─NetworkManager-wait-online.service @27.834s +9.765s
        └─NetworkManager.service @20.500s +7.332s
          └─dbus.service @20.495s
            └─basic.target @20.463s
              └─sockets.target @20.463s
                └─snapd.socket @20.462s +514us
                  └─sysinit.target @20.340s
                    └─snapd.apparmor.service @19.777s +562ms
                      └─apparmor.service @18.370s +1.406s
                        └─local-fs.target @18.369s
                          └─run-user-125-gvfs.mount @43.383s
                            └─run-user-125.mount @36.280s
                              └─local-fs-pre.target @4.500s
                                └─systemd-tmpfiles-setup-dev.service @4.170s +330ms
                                  └─systemd-sysusers.service @3.658s +511ms
                                    └─systemd-remount-fs.service @3.489s +148ms
                                      └─systemd-journald.socket @3.338s
                                        └─system.slice @3.335s
                                          └─-.slice @3.335s

相关内容