Speeding up live cd boot through optimizing file layout
fm4j-kbys at asahi-net.or.jp
Thu Jul 27 16:12:16 BST 2006
Thank you for all your emails.
I have tryed to create optimized Dapper Desktop CD ISO which supports
readahead and some other improvements to shorten boot time.
This CD boots up in 1:09 with my PC and works fine. The normal Desktop
CD boots up in 2:24 with same PC.
I wrote more details on following page. The torrent file for my ISO
image is also available:
Test results and any feedbacks will be helpful.
Krzysztof Lichota wrote:
> Jun Kobayashi napisał(a):
>> Krzysztof Lichota wrote:
>>> I have taken a shot at optimizing boot speed of Kubuntu live CD by
>>> changing layout of files on CD (no changes to live CD contents).
>> I found 2 candidates of improvement for optimizing boot speed of live CD.
>> 1. Adding files used in initrd.gz to rootfs.sort
>> With Krzysztof's instruction, the '/dev/.squash.log' dosen't include
>> files used by scripts on initrd.gz. For instance, configuration scripts
>> for xserver-xorg (e.g. /var/lib/dpkg/info/xserver-xorg.config) are
>> kicked during boot up, but /dev/.squash.log dosen't include them.
>> These files found in '/dev/.static/dev/.squash.log'.
>> I merged these two .squash.log, generate my rootfs.sort, and make
>> filesystem.squashfs with this sort file. This boots up 9 seconds faster
>> with my PC.
> Good point. Apparently after pivot_root it lands in different place. I
> will have to merge these two files.
>> 2. Changing priority value in rootfs.sort
>> According to the manual and changelog of squashfs, highest priority
>> files are now placed at the start of the filesystem and default priority
>> is 0.
>> With Krzysztof's sort-files-by-first-access.py, priority value start with
>> 10000 and going down. I think this makes files place at the start of the
>> squashfs filesystem. So I changed priority values to -1, -2, -3 ... to
>> place files at end of squashfs.
>> This comes good in my case - boots up 7 seconds faster.
> Yes, but I guess that further operations might be spoiled, because now
> libraries are at the end of CD, while apps not run during tracing are at
> the beginning of CD. You have to choose what you prefer, faster boot or
> faster operation of these apps :)
>> I'll happy if Krzysztof and others verify these improvements.
> I will try to test it when I have some spare time.
> Thanks for feedback :)
> Krzysztof Lichota
More information about the ubuntu-devel