DEV Community

loading...

How to troubleshoot boot-up slowness for Ubuntu

surenytcrap
・1 min read

If you are experiencing excruciating slowness when booting up your Ubuntu powered device, you might find these tips helpful. My laptop is running Ubuntu 20.04. It takes about 4-5 minutes to boot-up the laptop. Which is quite abnormal for a laptop with 32 Gb of RAM. So I ran the following command,

$ systemd-analyze blame

What this gives is a list of startup applications sorted Z-A by boot-up time.

1min 5.974s mysql.service                                        
    51.281s docker.service                                       
    34.783s snapd.service                                        
    32.278s systemd-journal-flush.service                        
    29.317s networkd-dispatcher.service                          
    25.496s dev-sda2.device                                      
    22.545s snapd.seeded.service                                 
    19.878s accounts-daemon.service  
Enter fullscreen mode Exit fullscreen mode

As you can see for my laptop it was MySQL service and Docker service which was to blame for majority of the boot time. So I used the following command to stop those services from starting up at boot time.

sudo systemctl disable mysql

This improved my boot-up time by about 2 mins. And if you want to manually start a service again that was disabled, you can use the following command,

service mysql start

It's that simple. If this doesn't work you might want to look at reinstalling your ubuntu. Specially if you updated over the internet instead of a clean install when you updated your ubuntu version. Hope this helps.

Discussion (0)