Optimizing Boot Time - systemd-analyze blame Results

Hey Guys,

I am trying to improve / optimize my boot time and needed some help analyzing the systemd-analyze blame results. Just for some background, I have a 2016 Dell XPS 13 (9350) with an i5 Skylake Processor and 8GB of ram. The output is below:

Startup finished in 7.779s (firmware) + 1.777s (loader) + 1.049s (kernel) + 10.193s (userspace) = 20.799s 
graphical.target reached after 9.679s in userspace

systemd-analyze Blame Results:

7.462s plymouth-quit-wait.service                                                               
1.849s gdm.service                                                                              
1.629s systemd-random-seed.service                                                              
1.058s lvm2-monitor.service                                                                     
1.038s systemd-rfkill.service                                                                   
 894ms dev-nvme0n1p6.device                                                                     
 713ms apparmor.service                                                                         
 563ms snapd.service                                                                            
 506ms tlp.service                                                                              
 384ms systemd-fsck@dev-disk-by\x2duuid-82acc9d6\x2de635\x2d41ea\x2d86f7\x2db8d09946a03e.service
 381ms boot-efi.mount                                                                           
 369ms ufw.service                                                                              
 308ms cups.service                                                                             
 281ms accounts-daemon.service                                                                  
 267ms upower.service                                                                           
 263ms systemd-udevd.service                                                                    
 252ms user@1000.service                                                                        
 248ms systemd-journal-flush.service                                                            
 235ms smb.service                                                                              
 214ms NetworkManager-wait-online.service                                                       
 196ms systemd-udev-trigger.service                                                             
 195ms polkit.service                                                                           
 190ms udisks2.service                                                                          
 146ms systemd-modules-load.service                                                             
 136ms systemd-journald.service                                                                 
 133ms systemd-logind.service                                                                   
 120ms bluetooth.service                                                                        
  90ms systemd-update-utmp.service                                                              
  89ms modprobe@drm.service                                                                     
  83ms avahi-daemon.service                                                                     
  82ms systemd-vconsole-setup.service                                                           
  76ms NetworkManager.service                                                                   
  66ms systemd-fsck-root.service                                                                
  49ms systemd-fsck@dev-disk-by\x2duuid-7294\x2d110C.service                                    
  44ms wpa_supplicant.service                                                                   
  42ms dev-hugepages.mount                                                                      
  42ms dev-mqueue.mount                                                                         
  41ms colord.service                                                                           
  41ms sys-kernel-debug.mount                                                                   
  40ms sys-kernel-tracing.mount                                                                 
  39ms systemd-tmpfiles-setup.service                                                           
  38ms kmod-static-nodes.service                                                                
  35ms modprobe@configfs.service                                                                
  35ms user-runtime-dir@1000.service                                                            
  33ms linux-module-cleanup.service                                                             
  32ms sys-kernel-config.mount                                                                  
  32ms modprobe@fuse.service                                                                    
  30ms plymouth-start.service                                                                   
  28ms plymouth-read-write.service                                                              
  26ms dev-nvme0n1p7.swap                                                                       
  24ms systemd-remount-fs.service                                                               
  24ms systemd-tmpfiles-setup-dev.service                                                       
  23ms systemd-backlight@backlight:intel_backlight.service                                      
  20ms home.mount                                                                               
  18ms snapd.apparmor.service                                                                   
  17ms systemd-sysctl.service                                                                   
  17ms systemd-backlight@leds:dell::kbd_backlight.service                                       
  17ms sys-fs-fuse-connections.mount                                                            
  14ms systemd-user-sessions.service                                                            
  11ms rtkit-daemon.service                                                                     
   7ms snapd.socket                                                                             
   7ms tmp.mount                                                                                  

I’m not sure where to start, as I am a Linux newbie. Any help or assistance anyone could provide would be greatly appreciated.

Thank you!

Why do you have plymouth installed (graphical boot splash screen) when you want a fast boot? Disable it, if not needed, makes biggest improvement.

Also, if you don’t encrypt any partition then disable and mask lvm2-monitor.service by

systemctl disable --now lvm2-monitor.service
systemctl mask lvm2-monitor.service

Also, please post

systemd-analyze critical-chain

Not sure what it is used for.

Is it used for Grub? If so, I still need Grub since I dual-boot with Windows 10.

Hey @A4orce84 :wink:

Disable plymouth…

Use haveged instead which is faster…

Disable this service if you don’t have lvm volumes…

It’s only a graphical boot splash screen for Manjaro, has nothing to do with Windoze 10.

Details in my above link or here:
Plymouth - ArchWiki

Plymouth is the fancy boot splash… :wink:


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 @9.679s
└─multi-user.target @9.679s
  └─plymouth-quit-wait.service @2.215s +7.462s
    └─systemd-user-sessions.service @2.193s +14ms
      └─nss-user-lookup.target @4.087s

I would say this is a fast boot time (assuming you remove/disable plymouth), don’t you think so?

Tip: When pasting terminal output, highlight it and use the Preformatted text </> button. I’ve fixed it for you this time. :wink:

Thanks @Yochanan for fixing my posts above!

Alright @Wollie and @megavolt - I made the changes you guys recommended, wanted to share the results below if there was other ‘tweaks’ or optimizations that could be made:

systemd-anaylze output:

Startup finished in 7.727s (firmware) + 1.939s (loader) + 1.061s (kernel) + 3.733s (userspace) = 14.462s 
graphical.target reached after 3.730s in userspace

systemd-anaylze critical-chain output:

graphical.target @3.730s
└─gdm.service @2.053s +1.676s
  └─systemd-user-sessions.service @2.043s +8ms
    └─network.target @2.030s
      └─wpa_supplicant.service @3.683s +38ms
        └─dbus.service @1.939s
          └─basic.target @1.931s
            └─sockets.target @1.931s
              └─snapd.socket @1.925s +5ms
                └─sysinit.target @1.902s
                  └─systemd-backlight@backlight:intel_backlight.service @3.721s +11ms
                    └─system-systemd\x2dbacklight.slice @2.534s
                      └─system.slice @355ms
                        └─-.slice @355ms

systemd-anaylze blame output:

1.676s gdm.service                                                                              
1.506s systemd-random-seed.service                                                              
1.171s tlp.service                                                                              
 932ms dev-nvme0n1p6.device                                                                     
 873ms apparmor.service                                                                         
 522ms snapd.service                                                                            
 505ms ufw.service                                                                              
 403ms boot-efi.mount                                                                           
 383ms cups.service                                                                             
 263ms upower.service                                                                           
 253ms systemd-journal-flush.service                                                            
 233ms systemd-udevd.service                                                                    
 230ms smb.service                                                                              
 227ms NetworkManager-wait-online.service                                                       
 200ms user@1000.service                                                                        
 200ms udisks2.service                                                                          
 192ms accounts-daemon.service                                                                  
 158ms systemd-modules-load.service                                                             
 157ms systemd-logind.service                                                                   
 146ms systemd-udev-trigger.service                                                             
 138ms polkit.service                                                                           
 134ms systemd-journald.service                                                                 
 122ms systemd-vconsole-setup.service                                                           
  89ms avahi-daemon.service                                                                     
  85ms modprobe@drm.service                                                                     
  81ms NetworkManager.service                                                                   
  70ms home.mount                                                                               
  57ms systemd-fsck-root.service                                                                
  53ms systemd-fsck@dev-disk-by\x2duuid-7294\x2d110C.service                                    
  52ms systemd-tmpfiles-setup-dev.service                                                       
  51ms systemd-fsck@dev-disk-by\x2duuid-82acc9d6\x2de635\x2d41ea\x2d86f7\x2db8d09946a03e.service
  51ms colord.service                                                                           
  42ms bluetooth.service                                                                        
  41ms dev-nvme0n1p7.swap                                                                       
  38ms wpa_supplicant.service                                                                   
  34ms user-runtime-dir@1000.service                                                            
  30ms plymouth-start.service                                                                   
  29ms systemd-backlight@leds:dell::kbd_backlight.service                                       
  29ms systemd-tmpfiles-setup.service                                                           
  26ms linux-module-cleanup.service                                                             
  25ms snapd.apparmor.service                                                                   
  25ms systemd-remount-fs.service                                                               
  22ms modprobe@fuse.service                                                                    
  20ms dev-hugepages.mount                                                                      
  20ms plymouth-read-write.service                                                              
  19ms dev-mqueue.mount                                                                         
  18ms sys-kernel-debug.mount                                                                   
  17ms sys-kernel-tracing.mount                                                                 
  16ms systemd-rfkill.service                                                                   
  15ms kmod-static-nodes.service                                                                
  15ms modprobe@configfs.service                                                                
  14ms sys-fs-fuse-connections.mount                                                            
  13ms systemd-update-utmp.service                                                              
  11ms systemd-backlight@backlight:intel_backlight.service                                      
  10ms sys-kernel-config.mount                                                                  
   9ms systemd-sysctl.service                                                                   
   8ms systemd-user-sessions.service                                                            
   7ms rtkit-daemon.service                                                                     
   6ms tmp.mount                                                                                
   5ms snapd.socket  

If there are any other changes I should make, please let me know. Is this a good boot time?

Thanks again for all the help so far, I really appreciate it!

Looks good to me. If you use gnome, maybe this could be interesting for you as well:

Thanks, I haven’t had any shutdown issues lately. Things have been smooth sailing when I need to restart / shutdown.

In terms of systemd-anaylze, I know every system is different, but what is generally considered ‘fast’ and an acceptable time?

I quite like systemd-analyze plot > boot.svg as it give a visual repersentation.
Then open in a browser

That was fixed with gnome-session 3.38.0+14+g87d92fec-1.0 at the end of December, FYI.

Sounds good guys, thanks for the help. Anything else before I mark it as ‘done’ ? What is considered a good boot time?

Hello Everyone,

Just wanted to give an update, is this still considered good for startup time:

Startup finished in 8.495s (firmware) + 1.756s (loader) + 1.104s (kernel) + 4.604s (userspace) = 15.961s 
graphical.target reached after 4.387s in userspace


Thanks again for all of the time and help, it is greatly appreciated!