[clug] ARS: Ubuntu 9.10 boot optimizations: 5 second startup with an SSD

Alex Satrapa alexsatrapa at mac.com
Thu Oct 1 18:14:39 MDT 2009

On 02/10/2009, at 08:30 , David Schoen wrote:

> Back when I still used Gentoo someone implemented a parallel boot ...

> If Ubuntu can do it in such a way that it works well enough first time
> around it may actually be adopted by the masses.

There was an article about very short boot times: http://lwn.net/Articles/299483/

Executive Summary:
1) Strip kernel down to absolute minimum needed to boot and launch init
2) Strip init-launched services down to Dbus, stripped-down X,  
sReadahead, HAL, udev, networking
3) Work to a blocks-read-in budget of 5 seconds x (disk read from  
platter kB/s).
4) Profile the system startup and put the most interesting blocks into  
the cache file used by sReadahead
5) Use a fast disk to boot

The modified version of X includes not invoking the C complier every  
time it boots (ie: use the keyboard mappings that worked the last time  
you booted this hardware).

They also boot directly into a user's desktop, since the budget was 5  
seconds to boot a usable system.  They also wanted to avoid "dirty  
tricks" like booting the user's desktop and continuing to start  
services (ie: heavily load the system) in the background.

I'll add here my observation that "sleep" or "hibernate" actually  
takes longer to boot since you're potentially reading all of RAM from  
disk (eg: if you have 4GB of RAM, and a disk that handles 30MB/s,  
you'll be waiting a touch over 2 minutes to wake from hibernate).   
There was another article I was reading by someone who suggested that  
if you could make your applications all able to recover cleanly from a  
crash (ie: save the do/undo buffer to disk regularly), it would  
actually be more sensible to simply "crash to sleep" and reboot from  
scratch when you wake the computer.  After all, what's the point of  
writing all the buffers and cache from memory out to the hibernate  
file?  Fsync, then stop the processor - save two minutes of battery  
life every time the user closes the lid.

A 5 second boot is not using parallel booting. Parallel booting  
reduces a 1 minute boot time to 30 seconds - the bottleneck is reading  
heaps of redundant data from disk.

Hope this helps.

More information about the linux mailing list