Speedying up the boot for Fedora

Ziga Mahkovec ziga.mahkovec at klika.si
Thu Apr 21 16:13:29 UTC 2005


On Thu, 2005-04-21 at 15:20 +0200, Arjan van de Ven wrote:
> On Thu, 2005-04-21 at 15:01 +0200, Jean-Eric Cuendet wrote:
> > There is IMHO at least 2 problems:
> > - When the boot process change, either by removing/adding services, the
> > fiels that must be readahead change. But the readahead.files don't.
> > - The readahead process don't read the files in the best order to
> > minimize the head movement on the hard disk
> 
> this one is easy to fix btw; I wrote a small tool a while ago (and
> posted to the list) to sort the file in disk order

Yes, fileblock definitely helped.  But we still couldn't get near the
throughput 'hdparm -t' reports.  I've actually been looking into this
problem for the past few days.  What I've found so far for example is
that the current readahead(1) logic:

  for each file:
    open file
    stat file
    readahead file

can be improved by doing this instead:

  for each file:
    open file
    stat file
  for each file:
    open file
    stat file
    readahead file

The reasoning being that in the first case, we're forcing the disk head
to move from the inode tables to the data blocks, causing further
seeking.  In the second case, we take advantage of the fact that the
inodes are close together and cache them first instead (this of course
being ext2/ext3 specific).

I could send a patch that does the above, but I think this can be even
further improved by taking advantage of how ext2fs works.  See [1] for
an example of a problem I'm currently solving.  I'll let you know if I
get any good results.

[1] https://www.redhat.com/archives/ext3-users/2005-April/msg00020.html
-- 
Ziga




More information about the devel mailing list