[rfc] boot-time async readahead...

Martin Pitt martin.pitt at ubuntu.com
Thu Feb 12 09:09:12 UTC 2009


Hello all,

Daniel J Blueman [2009-02-12  0:57 +0000]:
> By modifying the boot-time readahead to be at lower I/O and processor
> priority than the boot scripts and asynchronous, I see a 20% reduction
> in overall boot time (from installing bootchart) on my desktop: 41s
> down to 33s.

I tried it on my Dell Latitude D430, which has an utterly slow hard
disk (25 MB/s read), and did stopwatch measurements of 4 cases:
current jaunty readahead ("sync") and your readahead ("parallel"), as
well as default readahead lists vs. an /etc/readahead/boot which
contained the entire GNOME session.

grub->GDM is the time between pressing enter in Grub, and seeing the
user input field in gdm. G->D is the time between pressing enter in
the password field in GDM and having an usable desktop, which is
"panel menu appears" in cold-cache (default readahead), or "desktop
icons appear" in hot-cache (full GNOME session readahead).

Results:

sync RA
-------
		default RA list		full GNOME RA list
grub->GDM	45.5			48.0
G->D		36.5			18.0
sum		82.0			66.0


parallel RA
-----------
		default RA list		full GNOME RA list
grub->GDM	46.0			50.0
G->D		36.5			20.5
sum		82.5			70.5

Thus the parallelize RA makes things slightly worse to me. I'm not
entirely sure why; one theory would be that the parallel RA isn't fast
enough to stay "ahead", but even if I add a sleep 5 after the
start-stop-daemon to give it a head-start, it doesn't improve boot
speed.

However, if that became an option to readahead (--background), people
could enable it easily. 

The fork() could just as well be placed into the init script itself,
using start-stop-daemon's -b option, but if you don't use it, you
don't want to use ionice in readahead() either. If it runs in blocking
mode, it should utilize the disk as much as it can.

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)




More information about the Ubuntu-devel-discuss mailing list