[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Boot poster challenge



Arjan van de Ven <arjanv redhat com> writes:

> On Thu, 2004-11-18 at 12:06 +0100, Ziga Mahkovec wrote:
>> On Thu, 2004-11-18 at 08:36 +0100, Arjan van de Ven wrote: 
>> > > There's a 20 MB load of files in your readahead list and they are being
>> > > read for 15 seconds.  I guess a 26.60 MB/sec 'hdparm -t' suggests room
>> > > for improvement?  Note that this is on a 4200 RPM drive.
>> > 
>> > hmm yeah there ought to be room; I'll need to think about how to use that
>> > though.
>> 
>> Yeah I guess the fact that disk caches are loaded on a per-file basis
>> doesn't help either.  Because in theory: stat-ing your list takes about
>> 3 sec and readahead on a tarball is instantaneous (both of course
>> without boot-time readahead).
>
> ok here is another try; I hacked up a tool to sort the list in disk
> order.
>
> use it like this:
>
> make fileblock
> fileblock `cat readfiles` | sort -n | cut -f2 > sortedfiles
>
> and use sortedfiles as filelist for readahead as before

I'm wondering..

What would be the most efficient: readahead of files or readahead of
diskblocks?!

ie.. I was thinking of the following:

Have the kernel dump the I/O blocks to the kernel log (klogd shouldn't
be running for obvious reasons):

  # echo 1 >/proc/sys/vm/block_dump

Then using that list to preload the blocks at startup (using
POSIX_FADV_RANDOM on the block device to prevent it from doing
a readahead).


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]