Minimize boot time

Solution 1:

I'm afraid there really isn't much to be gained via configuration. But:

  • A dead certain way to increase boot speed by a lot is to buy a Solid State Disk. Since booting is very heavily dependent on disk-i/o, it can - on some systems - reduce the boot time to a fraction.

Much of the Computational work while booting is done while the system is waiting for I/O anyway (which is the result of work by canonical, see below), so getting rid of seemingly unnecessary computational work is most often not worth it. Really, booting is now mostly waiting for the disk.

alt textHow We Made Ubuntu Boot Faster by Scott James Remnant of Canonical goes in depth on the subject. (Talk filmed at LinuxCon Boston - August 2010, about 1 hour). The above is just my shallow, minimal summary of the talk, which of course doesn't do it justice!

In addition, you can disable a few of the programs that are automatically started:

Go to System → Preferences → Startup Applications and disable any you don't need:

alt text

As I've said, this will not do much in the way of reducing boot time. For me, it reduces it by about a quarter of a second, which is more than the standard deviation on DHCP, and it's done while other things are being started. But none the less, you can do it and see if if you gain anything.

Since I first answered this question, I've tried out so to speak, my solution of buying an SSD (at Jorge Catro's recommendation). And it's made my machine boot in 11 seconds. I want to stress again, even the cheapest 16gb ssd will (probably) do this (and 16 gigabytes are more than enough for /, if you have /home on a different drive).

To see what processes are taking the most time (be it I/O or CPU bound), open a Terminal via Applications → Accessories → Terminal and type

sudo apt-get install bootchart
sudo update-initramfs -u -k $(uname -r) 

Then reboot, afterwards, open a file browser and navigate to /var/log/bootchart/, you should see a png image, showing you what processes are problematic.

Here's mine

As you can see, there isn't much blue (CPU Utilisation) in it. And I only have a single core on this machine. The most CPU is spent on mutter (this is ubuntu-netbook-edition), the ubuntu single sign-on service for Ubuntu One and launching Unity (about a second altogether). On a normal Ubuntu Desktop installation, those would not count towards your boot time, it'd stop after GDM (the login screen) is launched. On This old bootchart I found somewhere on the internet, you can clearly see the improvements Canonical have made to the boot-process. This boot takes 1:15 and the time it doesn't wait for the disk, it spends basically sleeping.

At 30 seconds, your system is booting very fast indeed. I'd have expected 50-70.