20.04 boot slower than 18.04

Hello,
When I compare fresh installed 20.04 VS 18.04, each in virtual machine, 20.04 boot slower than 18.04. On my virtual system, 20.04 boot into 25 s while 18.04 boot into 18 s. Will 20.04 boot faster with the first point release? People with hard disk drive (not ssd) will more suffer when they upgrade to 20.04 from 18.04.

1 Like

my 20.04 vm booted in 13.9 s ... see what systemd-analyze blame tells you. I'm on spinning disk, too. how many vcpu, mem have you allocated? (I'm 2 vcpu, 4G ram)

1 Like

I don't want to compare my virtual machine (vm) with yours, it's not the purpose. I compared my vm 20.04 to my vm 18.04, each fresh installed, and there is 7 seconds between them while booting. Using virtualbox, easy to reproduce.

Try @pavlos_kairis suggestion of using systemd-analyze blame to analyze the causes on your VMs.

He is trying to help you.

1 Like

I don't need help, I don't want to fix something. I just want to share a fact: 20.04 boot slower than 18.04 in virtual machine. That's the point. I use a timer to measure time, from grub to wallpaper display.

As I'm cool, here the data. All from fresh installed in virtual machine

18.04:

[email protected]:~/Bureau$ sudo systemd-analyze
[sudo] Mot de passe de utilisateur : 
Startup finished in 2.464s (kernel) + 7.885s (userspace) = 10.350s
graphical.target reached after 7.875s in userspace
[email protected]:~/Bureau$ sudo systemd-analyze blame
      5.987s vboxadd.service
      5.659s plymouth-quit-wait.service
      1.173s snapd.service
      1.134s keyboard-setup.service
       912ms dev-sda1.device
       513ms networkd-dispatcher.service
       468ms udisks2.service
       465ms snapd.seeded.service
       414ms ufw.service
       395ms networking.service
       322ms NetworkManager.service
       319ms ModemManager.service
       271ms NetworkManager-wait-online.service
       266ms systemd-udevd.service
       258ms grub-common.service
       244ms loadcpufreq.service
       241ms accounts-daemon.service
       206ms apparmor.service
       206ms avahi-daemon.service
       184ms snap-pulsemixer-283.mount
       183ms snap-software\x2dboutique-31.mount
       180ms snap-pulsemixer-250.mount
       163ms snap-ubuntu\x2dmate\x2dwelcome-430.mount
       163ms lightdm.service
       162ms snap-core18-1705.mount
       159ms snap-core-9066.mount
       157ms snap-core18-1754.mount
       157ms rsyslog.service
       155ms gpu-manager.service
       149ms snap-ubuntu\x2dmate\x2dwelcome-539.mount
       147ms upower.service
       126ms snap-core-8689.mount
       122ms systemd-logind.service
       116ms thermald.service
       115ms systemd-journal-flush.service
       110ms [email protected]
       109ms wpa_supplicant.service
       108ms systemd-udev-trigger.service
        93ms dev-loop1.device
        91ms systemd-journald.service
        79ms dev-loop5.device
        78ms snap-software\x2dboutique-54.mount
        72ms swapfile.swap
        67ms speech-dispatcher.service
        65ms dev-loop3.device
        65ms systemd-modules-load.service
        57ms dev-loop0.device
        55ms dev-loop6.device
        48ms polkit.service
        46ms systemd-tmpfiles-setup-dev.service
        44ms systemd-sysctl.service
        41ms systemd-resolved.service
        39ms pppd-dns.service
        37ms dev-loop7.device
        34ms dev-loop4.device
        31ms vboxadd-service.service
        31ms systemd-tmpfiles-setup.service
        30ms lm-sensors.service
        27ms hddtemp.service
        24ms dev-loop9.device
        24ms cpufrequtils.service
        21ms plymouth-start.service
        19ms plymouth-read-write.service
        19ms sys-kernel-debug.mount
        19ms dev-mqueue.mount
        18ms systemd-random-seed.service
        17ms dev-hugepages.mount
        17ms kmod-static-nodes.service
        17ms kerneloops.service
        17ms systemd-remount-fs.service
        14ms console-setup.service
        13ms openvpn.service
        11ms systemd-update-utmp.service
        10ms systemd-user-sessions.service
         9ms dev-loop8.device
         8ms rtkit-daemon.service
         8ms sys-fs-fuse-connections.mount
         7ms systemd-update-utmp-runlevel.service
         5ms snapd.socket
         4ms setvtrgb.service
         4ms sys-kernel-config.mount
         2ms dev-loop2.device
[email protected]:~/Bureau$ sudo systemd-analyze critical-chainThe time after the unit is active or started is printed after the "@" character.
The time the unit takes to start is printed after the "+" character.

graphical.target @7.875s
└─multi-user.target @7.875s
  └─getty.target @7.875s
└─[email protected] @7.874s
  └─system-getty.slice @7.873s
    └─setvtrgb.service @7.868s +4ms
      └─systemd-user-sessions.service @2.186s +10ms
        └─network.target @2.181s
          └─NetworkManager.service @1.857s +322ms
            └─dbus.service @1.725s
              └─basic.target @1.701s
                └─sockets.target @1.701s
                  └─snapd.socket @1.694s +5ms
                    └─sysinit.target @1.689s
                      └─apparmor.service @1.482s +206ms
                        └─local-fs.target @1.479s
                          └─media-sf_shared.mount @7.741s
                            └─local-fs-pre.target @1.468s
                              └─keyboard-setup.service @333ms +1.134s
                                └─systemd-journald.socket @325ms
                                  └─system.slice @324ms
                                    └─-.slice @319ms
[email protected]:~/Bureau$ 

20.04:

[email protected]:~/Bureau$ sudo systemd-analyze
[sudo] Mot de passe de utilisateur : 
Startup finished in 2.036s (kernel) + 13.733s (userspace) = 15.769s 
graphical.target reached after 13.716s in userspace
[email protected]:~/Bureau$ sudo systemd-analyze blame
12.098s vboxadd.service                         
11.529s plymouth-quit-wait.service              
 2.453s dev-sda1.device                         
 1.563s dev-loop2.device                        
 1.514s dev-loop0.device                        
 1.501s dev-loop1.device                        
 1.490s dev-loop7.device                        
 1.473s dev-loop3.device                        
 1.431s dev-loop5.device                        
 1.359s dev-loop4.device                        
 1.311s dev-loop6.device                        
 1.131s blueman-mechanism.service               
 1.062s snapd.service                           
  851ms systemd-resolved.service                
  789ms networkd-dispatcher.service             
  757ms udisks2.service                         
  717ms NetworkManager-wait-online.service      
  579ms accounts-daemon.service                 
  508ms systemd-journal-flush.service           
  496ms systemd-logind.service                  
  432ms ModemManager.service                    
  425ms systemd-timedated.service               
  403ms upower.service                          
  383ms avahi-daemon.service                    
  370ms NetworkManager.service                  
  339ms systemd-journald.service                
  334ms polkit.service                          
  276ms e2scrub_reap.service                    
  268ms thermald.service                        
  256ms wpa_supplicant.service                  
  221ms grub-common.service                     
  199ms gpu-manager.service                     
  178ms lightdm.service                         
  155ms keyboard-setup.service                  
  151ms [email protected]                       
  149ms snap-software\x2dboutique-54.mount      
  147ms snap-ubuntu\x2dmate\x2dwelcome-539.mount
  138ms snap-ubuntu\x2dmate\x2dwelcome-524.mount
  138ms grub-initrd-fallback.service            
  135ms apparmor.service                        
  134ms systemd-udevd.service                   
  131ms rsyslog.service                         
  129ms lm-sensors.service                      
  123ms snap-core-8935.mount                    
  120ms systemd-udev-trigger.service            
  102ms pppd-dns.service                        
  102ms systemd-modules-load.service            
   98ms snap-core-9066.mount                    
   97ms networking.service                      
   97ms snap-core18-1705.mount                  
   95ms snap-core18-1754.mount                  
   92ms snap-software\x2dboutique-39.mount      
   78ms swapfile.swap                           
   65ms snapd.seeded.service                    
   58ms snapd.apparmor.service                  
   50ms vboxadd-service.service                 
   40ms systemd-sysusers.service                
   37ms kerneloops.service                      
   36ms systemd-tmpfiles-setup.service          
   33ms systemd-random-seed.service             
   32ms hddtemp.service                         
   28ms plymouth-start.service                  
   26ms systemd-remount-fs.service              
   24ms ufw.service                             
   22ms systemd-sysctl.service                  
   22ms openvpn.service                         
   19ms systemd-user-sessions.service           
   19ms dev-hugepages.mount                     
   18ms systemd-tmpfiles-setup-dev.service      
   17ms dev-mqueue.mount                        
   16ms sys-kernel-debug.mount                  
   15ms plymouth-read-write.service             
   15ms sys-kernel-tracing.mount                
   15ms sys-kernel-config.mount                 
   14ms kmod-static-nodes.service               
   14ms [email protected]           
   13ms systemd-update-utmp-runlevel.service    
   11ms rtkit-daemon.service                    
    9ms ifupdown-pre.service                    
    9ms console-setup.service                   
    9ms systemd-update-utmp.service             
    5ms setvtrgb.service                        
    4ms sys-fs-fuse-connections.mount           
    1ms snapd.socket                            
[email protected]:~/Bureau$ sudo 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 @13.716s
└─multi-user.target @13.716s
  └─getty.target @13.716s
    └─[email protected] @13.716s
      └─system-getty.slice @13.714s
        └─setvtrgb.service @13.708s +5ms
          └─systemd-user-sessions.service @2.140s +19ms
            └─network.target @2.132s
              └─systemd-resolved.service @1.280s +851ms
                └─systemd-tmpfiles-setup.service @1.240s +36ms
                  └─systemd-journal-flush.service @731ms +508ms
                    └─systemd-journald.service @389ms +339ms
                      └─systemd-journald.socket @382ms
                        └─system.slice @377ms
                          └─-.slice @377ms
[email protected]:~/Bureau$

When version 20.04.1 will be released, will it be as fast to start as 18.04 or slower as currently?

Hello Phillipe

To my non-expert eye the "dev-loop" events seem to be making a difference between 18.04 and 20.04. The "dev-loop" events are snap packages starting up, as far as I know.

That being the case, I would not expect to see much difference between 20.04 and 20.04.1, as more of Ubuntu-Mate is now being delivered as snaps I believe (I may be wrong there). :slightly_smiling_face: