2

I'm running Ubuntu 18.04.4 and for some reason my boot time is very slow and it's being caused by my kernel. Here's the result of systemd-analyze time

~ ᐅ  systemd-analyze time                                                                                                                                                                  
Startup finished in 1min 17.224s (kernel) + 13.352s (userspace) = 1min 30.576s                                                                                                             
graphical.target reached after 13.347s in userspace         

So I'm not really sure why this would be the case.

I'm running this kernel version

~ ᐅ  uname -r
4.15.0-91-generic

Also, my OS is intalled on an SSD drive so it should be fast, and it used to be, some at some point a while ago it got slow.

Any help would really be appreciated. Let me know if there's any other commands I need to run to and I'll post the results here.

EDIT:

Output of systemd-analyze critical-chain :

~ ᐅ  systemd-analyze critical-chain 
The 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 @15.969s
└─multi-user.target @15.969s
  └─docker.service @11.929s +4.040s
    └─network-online.target @11.928s
      └─NetworkManager-wait-online.service @4.093s +7.834s
        └─NetworkManager.service @3.272s +817ms
          └─dbus.service @3.068s
            └─basic.target @3.067s
              └─sockets.target @3.067s
                └─docker.socket @3.066s +753us
                  └─sysinit.target @3.063s
                    └─swap.target @3.063s
                      └─dev-mapper-cryptswap1.swap @3.058s +5ms
                        └─dev-mapper-cryptswap1.device @3.057s

Output of systemd-analyze blame :

~ ᐅ  systemd-analyze blame
         11.199s apt-daily.service
          7.834s NetworkManager-wait-online.service
          4.040s docker.service
          2.772s dev-sdc1.device
          1.606s snapd.service
          1.539s apparmor.service
          1.260s motd-news.service
           989ms plymouth-quit-wait.service
           871ms mysql.service
           865ms phpsessionclean.service
           841ms dev-loop11.device
           841ms dev-loop9.device
           835ms dev-loop10.device
           829ms dev-loop8.device
           817ms NetworkManager.service
           743ms dev-loop0.device
           741ms dev-loop1.device
           741ms systemd-journal-flush.service
           732ms dev-loop2.device
           723ms dev-loop3.device
           691ms ModemManager.service
           676ms networkd-dispatcher.service
           641ms systemd-timesyncd.service
           638ms udisks2.service
           612ms apache2.service
           575ms timidity.service
           570ms dev-loop6.device
           559ms dev-loop7.device
           556ms dev-loop4.device
           542ms dev-loop5.device
           462ms apt-daily-upgrade.service
           412ms networking.service
           410ms snap-slack-22.mount
           409ms snap-gnome\x2d3\x2d28\x2d1804-116.mount
           406ms snap-core18-1668.mount
           405ms snap-gtk\x2dcommon\x2dthemes-1474.mount
           405ms snap-core-8689.mount
           404ms snap-gtk\x2dcommon\x2dthemes-1440.mount
           403ms snap-slack-21.mount
           403ms fwupd.service
           402ms accounts-daemon.service
           402ms snap-insomnia-62.mount
           397ms grub-common.service
           391ms systemd-resolved.service
           355ms systemd-logind.service
           247ms nvidia-persistenced.service
           246ms sysstat.service
           244ms keyboard-setup.service
           230ms snap-insomnia-61.mount
           229ms snap-core-8592.mount
           225ms snap-core18-1705.mount
           222ms polkit.service
           219ms snap-gnome\x2d3\x2d28\x2d1804-110.mount
           217ms systemd-rfkill.service
           212ms binfmt-support.service
           200ms systemd-sysctl.service
           193ms systemd-modules-load.service
           192ms systemd-udevd.service
           183ms rsyslog.service
           180ms speech-dispatcher.service
           180ms apport.service
           179ms pppd-dns.service
           179ms avahi-daemon.service
           176ms thermald.service
           174ms wpa_supplicant.service
           167ms gpu-manager.service
           167ms lm-sensors.service
           160ms postgresql.service
           144ms dns-clean.service
           141ms console-setup.service
           140ms systemd-tmpfiles-setup-dev.service
           136ms gdm.service
           131ms upower.service
           125ms systemd-udev-trigger.service
           118ms systemd-journald.service
            98ms apport-autoreport.service
            98ms sys-kernel-debug.mount
            96ms dev-hugepages.mount
            95ms systemd-remount-fs.service
            93ms dev-mqueue.mount
            93ms systemd-cryptsetup@cryptswap1.service
            91ms colord.service
            76ms proc-sys-fs-binfmt_misc.mount
            69ms resolvconf.service
            61ms ufw.service
            60ms kmod-static-nodes.service
            50ms bolt.service
            35ms systemd-random-seed.service
            33ms user@1000.service
            32ms systemd-update-utmp.service
            31ms packagekit.service
            27ms user@128.service
            24ms systemd-tmpfiles-setup.service
            16ms snapd.seeded.service
            14ms resolvconf-pull-resolved.service
            13ms alsa-restore.service
            13ms plymouth-start.service
            11ms plymouth-read-write.service
            10ms kerneloops.service
             5ms dev-mapper-cryptswap1.swap
             5ms ureadahead-stop.service
             4ms systemd-update-utmp-runlevel.service
             4ms systemd-user-sessions.service
             2ms rtkit-daemon.service
             2ms snapd.socket
             2ms setvtrgb.service
             1ms sys-fs-fuse-connections.mount
             1ms sys-kernel-config.mount
           753us docker.socket

2

Actually I just realized that this isn't a problem anymore.

~ ᐅ  systemd-analyze time  
Startup finished in 3.010s (kernel) + 12.969s (userspace) = 15.979s
graphical.target reached after 12.964s in userspace

Currently I'm on this kernal version:

~ ᐅ  uname -r
4.15.0-99-generic
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.