2

I am using Kubuntu 18.04 on my Dell G5 5587. Currently I have a Win10 installed on my SSD, which is in RAID mode and the ubuntu is installed on my HDD. Since Ubuntu can not recognize the RAID SSD I can switch between the Win and Ubuntu from the One-time boot menu.

I tried to figure out what the problem, but could not find any useful info form me.

systemd-analyze time:

Startup finished in 7.196s (firmware) + 6.311s (loader) + 33.705s (kernel) + 9min 10.475s (userspace) = 9min 57.688s

graphical.target reached after 1min 6.000s in userspace

Here is the result of systemd-analyze blame:

    7min 23.369s apt-daily-upgrade.service
     45.488s apt-daily.service
     36.823s systemd-journal-flush.service
     33.693s dev-sda3.device
     33.330s ufw.service
     25.787s systemd-udevd.service
     11.314s mpd.service
     10.723s phpsessionclean.service
      9.636s systemd-tmpfiles-clean.service
      9.218s mysql.service
      8.353s NetworkManager.service
      7.977s gpu-manager.service
      6.713s NetworkManager-wait-online.service
      4.722s udisks2.service
      4.567s grub-common.service
      3.718s snapd.service
      3.568s networkd-dispatcher.service
      3.347s keyboard-setup.service
      3.211s ModemManager.service                                                                                                                                                                                                                                          
      2.941s packagekit.service                                                                                                                                                                                                                                            
      2.820s systemd-tmpfiles-setup-dev.service                                                                                                                                                                                                                            
      2.477s accounts-daemon.service                                                                                                                                                                                                                                       
      2.403s systemd-resolved.service                                                                                                                                                                                                                                      
      2.286s systemd-timesyncd.service                                                                                                                                                                                                                                     
      2.001s apache2.service                                                                                                                                                                                                                                               
      1.900s colord.service                                                                                                                                                                                                                                                
      1.722s avahi-daemon.service                                                                                                                                                                                                                                          
      1.632s mnt-peterkovach-tempus.mount                                                                                                                                                                                                                                  
      1.624s mnt-peterkovach-bioinfo.mount                                                                                                                                                                                                                                 
      1.520s mnt-peterkovach-users.mount                                                                                                                                                                                                                                   
      1.464s systemd-remount-fs.service                                                                                                                                                                                                                                    
      1.408s dev-mqueue.mount                                                                                                                                                                                                                                              
      1.408s sys-kernel-debug.mount                                                                                                                                                                                                                                        
      1.408s dev-hugepages.mount                                                                                                                                                                                                                                           
      1.396s thermald.service                                                                                                                                                                                                                                              
      1.384s systemd-modules-load.service                                                                                                                                                                                                                                  
      1.068s mnt-peterkovach-Data.mount                                                                                                                                                                                                                                    
      1.068s swapfile.swap                                                                                                                                                                                                                                                 
       850ms systemd-sysctl.service                                                                                                                                                                                                                                        
       845ms systemd-update-utmp.service                                                                                                                                                                                                                                   
       828ms wpa_supplicant.service                                                                                                                                                                                                                                        
       730ms systemd-tmpfiles-setup.service                                                                                                                                                                                                                                
       723ms polkit.service                                                                                                                                                                                                                                                
       719ms fstrim.service                                                                                                                                                                                                                                                
       654ms systemd-random-seed.service                                                                                                                                                                                                                                   
       447ms user@118.service                                                                                                                                                                                                                                              
       440ms rsyslog.service                                                                                                                                                                                                                                               
       410ms systemd-journald.service                                                                                                                                                                                                                                      
       384ms boot-efi.mount                                                                                                                                                                                                                                                
       381ms apparmor.service                                                                                                                                                                                                                                              
       320ms systemd-logind.service                                                                                                                                                                                                                                        
       276ms upower.service                                                                                                                                                                                                                                                
       260ms kmod-static-nodes.service                                                                                                                                                                                                                                     
       212ms setvtrgb.service
       189ms plymouth-read-write.service
       135ms plymouth-quit.service
       116ms snapd.socket
       108ms systemd-fsck@dev-disk-by\x2duuid-C783\x2d9061.service
       105ms systemd-udev-trigger.service
        99ms rtkit-daemon.service
        89ms snapd.seeded.service
        80ms apport.service
        57ms nvidia-persistenced.service
        33ms user@1000.service
        33ms plymouth-start.service
        31ms systemd-rfkill.service
        12ms systemd-update-utmp-runlevel.service
         9ms bluetooth.service
         6ms alsa-restore.service
         6ms kerneloops.service
         6ms sddm.service
         5ms pppd-dns.service
         3ms ureadahead-stop.service
         2ms systemd-backlight@backlight:intel_backlight.service
         2ms systemd-user-sessions.service
         1ms console-setup.service
         1ms systemd-backlight@leds:dell::kbd_backlight.service
         1ms sys-kernel-config.mount
         1ms sys-fs-fuse-connections.mount

The result of systemd-analyze critical-chain:

graphical.target @1min 6.000s
└─multi-user.target @1min 6.000s
  └─cups-browsed.service @6min 41.635s
    └─cups.service @6min 41.633s
      └─cups.path @6min 41.631s
        └─sysinit.target @46.162s
          └─systemd-timesyncd.service @43.875s +2.286s
            └─systemd-tmpfiles-setup.service @43.020s +730ms
              └─systemd-journal-flush.service @6.196s +36.823s
                └─systemd-remount-fs.service @4.731s +1.464s
                  └─systemd-journald.socket @4.670s
                    └─system.slice @4.670s
                      └─-.slice @4.635s

Do you have any suggestions to make it faster? Thanks in advance!

2 Answers2

2

Part of the solution can be found here: Ubuntu 16.04 slow boot (apt-daily.service)

The accepted answer says:

This is Debian bug #844453. apt-daily.service shouldn't be run during boot, but only some time afterward.

As a workaround, do sudo systemctl edit apt-daily.timer and paste the following text into the editor window:

# apt-daily timer configuration override
[Timer]
OnBootSec=15min
OnUnitActiveSec=1d
AccuracySec=1h
RandomizedDelaySec=30min

This changes the "timer" that triggers apt-daily.service to run at a random time between 15 min and 45 min after boot, and once a day thereafter. See the systemd.timer manpage for additional (not very well written, alas) explanation of what this means.

The second part of the solution can be found here:

I would have merged in but using phone is awkward.

0

Besides the answer of WinEunuuchs2Unix install haveged or rng-tools.

It seems you have a Problem with enough entropy too. You can check it directly after login with cat /proc/sys/kernel/random/entropy_avail

Is it rather low (anything below =< 1000) is going to take a long time to generate randomness using /dev/random as apps will block until you have enough entropy. In other words, you will see slow speed while generating keys or while using OpenSSL APIs.

nobody
  • 5,792