Speeding up live cd boot through optimizing file layout

Krzysztof Lichota krzysiek at lichota.net
Thu Jun 8 07:03:05 BST 2006


Matt Zimmerman napisał(a):
> On Wed, May 31, 2006 at 11:24:11AM +0200, Krzysztof Lichota wrote:
>>>>> This, in fact, has a reasonable chance of improving performance, since all
>>>>> of these files are read in a single pass by /etc/init.d/readahead.
>>>> Interesting. I will try moving these files to the end of Squashfs image.
>>> In case you didn't know, this data can be found in /etc/readahead, in
>>> exactly the order used for readahead during startup.
>> I have tried putting these files at the edge and the results are 10
>> seconds worse. Apparently seeks are more frequent and throughput is not
>> an issue.
> 
> How interesting.  Did you ensure that the list is up to date?  If it is, it
> should be ordered according to the actual order in which files are read at
> boot, so there should be no other I/O happening in parallel to cause
> additional seeks.  Does the system have enough memory to cache all of the
> files there?

The list was up to date, I have always used the same RC iso image.

I haven't counted the size of readahead files, maybe they didn't fit in
the cache. System had 256 MB of memory, so it leaves about 90 MB for
cache. Though, these readahead files could be pruned from cache to make
space for some larger files pieces, read later, and then accessing them
again would cause seeks. I think it can be checked using vm_block_dump,
though this method suffers from the kernel log wraparound problem which
forced me to log squashfs file accesses to file.

Maybe pinning readahead files in memory would help, but it is not that
simple to do and it might be risky (use memory which is not needed thus
making less memory available to apps).

	Krzysztof Lichota


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20060608/209d960f/signature.pgp


More information about the ubuntu-devel mailing list