16

After updating to Ubuntu 16.04. the boot time is a bit longer (more than 10-15 seconds). I looked at the "dmesg" output and found this:

[   23.882674] audit: type=1400 audit(1461650474.108:10): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/evince" pid=644 comm="apparmor_parser"
**[   23.882682]** audit: type=1400 audit(1461650474.108:11): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/bin/evince//sanitized_helper" pid=644 comm="apparmor_parser"
**[   32.162714]** cgroup: new mount options do not match the existing superblock, will be ignored
[   32.777477] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   32.777480] Bluetooth: BNEP filters: protocol multicast

I assumed that the number on the left side of the "dmesg"output is time. If I lose 9 seconds on this step, what can I do to improve boot time?

0

1 Answer 1

28

Systemd is responsible for booting process. You can improve it by disabling some services or trying to fix your configuration. To check how much time services take in your boot process you can run:

systemd-analyze blame

For graphical detailed view of your boot procedure you can generate a plot image:

systemd-analyze plot > bootimage

Now you can open bootimage with eg. eog or different image viewer and check how much time services are taking (and eg. where system stops when booting). It will look like this:

enter image description here

As we can see e.g virtualbox.service is taking 62ms which is very nice but mounting my F3 disk is not so fast. I can consider to disable automounting (it's kinda bad example because systemd is lanuching services in parallel mode and this service is not slowing boot time, nothing depends on it but this is how it works). (In your dmesg output there is something wrong with mount options. You can check in /etc/fstab)

If you want do disable any service it is good to know if something else is not using this service as dependency. You can check it on e.g virtualbox.service example :

systemctl list-dependencies virtualbox.service --reverse 

The output shows there aren't any service files related. So if I don't need it I can stop and disable it without any complications:

sudo systemctl disable virtualbox.service --now

If you find some services in your system which are taking long time to load first read about what it is exactly doing and then try to fix related configuration files or if you don't need it disable it.

3
  • When I try to run systemd-analyze blame , it gives me this error Failed to parse reply: No such property 'FirmwareTimestampMonotonic' & nothing happened
    – AbdelHady
    Oct 16, 2017 at 11:15
  • @AbdelHady what is your ubuntu release version ?
    – EdiD
    Oct 16, 2017 at 16:11
  • It is 16.04 (I need to keep it with LTS versions for development purposes)
    – AbdelHady
    Oct 16, 2017 at 17:10

Not the answer you're looking for? Browse other questions tagged .