Quickly Improve Boot time with Systemd

Recently I upgraded to Ubuntu 16.04 on my machine and just for curiosity I wanted to improve the boot time.

So to identify the slow services I used:
jahans:~# sudo systemd-analyze blame
18.944s docker.service (I create containers on servers, don't need to start on boot)
12.833s dev-sda8.device (Root Parition)
11.523s teamviewerd.service (Just used it one off, dont create a service for it!)
8.943s ModemManager.service
8.273s NetworkManager-wait-online.service
7.828s postfix.service (Good to have, but I don't send emails with spoofed addresses)
7.203s apparmor.service
7.011s networking.service
6.936s apport.service
6.867s irqbalance.service
6.689s speech-dispatcher.service
6.450s cgroupfs-mount.service
6.360s snapd.autoimport.service
6.359s systemd-user-sessions.service
6.359s alsa-restore.service
6.355s gpu-manager.service
6.354s pppd-dns.service
6.352s rsyslog.service
5.946s bluetooth.service (Never used it)
5.940s thermald.service
5.938s avahi-daemon.service

I went through the list and identified the services that I didn’t use on daily basis and improved the boot time significantly. So to disable the services I didn’t use I ran:
systemctl disable docker
systemctl disable teamviewerd
systemctl disable postfix
systemctl disable bluetooth

To understand the dependencies of the services you can also use the following for a graphical view:

sudo systemd-analyze plot > srv.test ; eog srv.test

Leave a Reply

Your email address will not be published. Required fields are marked *