Preload or readahead?

Erich Schubert erich.schubert at gmail.com
Wed Apr 5 12:28:20 UTC 2006


Hello Petter,
There have been reports where readahead actually led to worse boot
times, because it was reading data too early, thus starving other
"more urgent" read processes. So this might need some in depth
tweaking. :-(

Where readahead (or preloadd) can definitely help is load the common
desktop data files while your xserver is starting.

Some time ago I did a readahead modification called "readahead-list"
to not load filenames via stdin but from a text file using mmap. I
think this was then adopted by some Gentoo developer, almost
completely rewritten and is now like the "formal" readahead.
But myself I'm not using readahead myself anymore. Well, I'm also
rarely ever booting, but using suspend2 instead.

I also did some experiments on generating "optimal" readahead file
lists, by tracing file accesses using the audit system interface.
However this kernel interface is said to slow down things a bit, so
it's not enabled in debian stock kernels. Also it was rather clumsy,
since you can't really predict when readahead will load files; it
would probably make sense to associate a readahead file with each
service and kick it off just before launching the service.
I don't know how preload monitors the system.

With a highly parallel init, the use of readahead is likely to go down
a lot, since hopefully one or another of the parallel threads will be
busy reading anyway. So in that case I'd only try a readahead at the
very beginning (while udev is busy creating device nodes), and for
bringing up the desktop faster (so readahead GDM login screen,
locales, fonts and such)

best regards,
Erich Schubert
--
    erich@(mucl.de|debian.org)      --      GPG Key ID: 4B3A135C    (o_
  To understand recursion you first need to understand recursion.   //\
  Wo befreundete Wege zusammenlaufen, da sieht die ganze Welt für   V_/_
        eine Stunde wie eine Heimat aus. --- Herrmann Hesse



More information about the initscripts-ng-devel mailing list