How to Resolve Slow Boot Times in Ubuntu 16.04

I’ve recently upgraded my machine from Ubuntu 14.04.4 to Ubuntu 16.04.1, but while my computer used to boot in about 40 seconds, after the upgrade boot times increased considerably to 2 to 3 minutes.
Ubuntu_16.04_Boot_timesThe first easy check was to look at dmesg:

There’s a bit 87 seconds gap between checking for the floppy, and VirtualBox drivers loading. So there’s definitely an issue here, but the log does not exactly give a clear queue.

I’ve read you could use systemd-analyze to find which process(es) may be slowing down your computer at boot time:


Two processes are taking close to 8 seconds, but those 16 seconds still do not explain why it takes 2 minutes more to boot…Eventually, I realized systemd-analyze has a few more tricks up its sleeves:


The first command shows there’s no problem with the kernel itself, and something is slow in user space. The second command draws a huge boot chart (SVG), whose shape looks like the picture below.

ubuntu_16.04_BootchartSo we have something to look at, namely the area just before the large gap… I’ve zoomed in on it:

Ubuntu_16.04_Bootchart_ProlificThere are a few things there including the DVDROM drive, and “Prolific Technology Serial Controller” connected to /dev/ttyUSB0. The latter is a USB to TTL debug board based on PL2303, so I removed it and rebooted my machine, and miracle! Boot time was reduced to just 17 seconds:


Ubuntu_16.04_Fast_Boot_TimeThe SVG chart shape, shown on the right, also changed completely as it booted most of the same services in much less time. So since I don’t use the debug board everyday, I’ll make sure I only connect it when needed.  Ideally, I suppose a bug should be filled, but I’m not sure which package cause the issue.

On a rather unrelated note, yesterday I also decided to look into Firefox performance issues (switching or closing tabs would take 2 to 3 seconds), and I discovered recent versions of Firefox browser (47+ and greater) include support for “about:performance” tab showing which add-on(s), plugin(s), or page(s) may be problematic. Just let it run for a while, and go about your business browsing the web, and then come back to the tab to check if any has many alerts. It helped me find an add-on slowing down browsing considerably, so I disabled it, and performance is now much better.

Support CNX Software - Donate via PayPal or become a Patron on Patreon

9
Leave a Reply

avatar
9 Comment threads
0 Thread replies
3 Followers
 
Most reacted comment
Hottest comment thread
6 Comment authors
GrumbelDronecnxsoftSander Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
anon
Guest
anon

It’s probably some stupid network daemon trying to search for a modem on each serial port, or something.

Sander
Guest
Sander

I can’t find the “Prolific Technology Serial Controller” in the pink diagram. Can you put an arrow in it … ?

Member

That’s nice troubleshooting. Thanks for the tip on Firefox as well.

Cheers.

Drone
Guest
Drone

I Like This Post.

Grumbel
Guest
Grumbel

@cnxsoft
I get those same error messages on all my USB drives and on two different computers. Ubuntu 16.04 / 4.4.0-36. Seems to be a kernel problem, not a problem with the HDDs:

https://bugzilla.redhat.com/show_bug.cgi?id=1351305