Speeding up live cd boot through optimizing file layout
mdz at ubuntu.com
Thu Jul 13 19:13:17 BST 2006
On Thu, Jul 13, 2006 at 10:47:08PM +0900, Jun Kobayashi wrote:
> 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.
> 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.
> I'll happy if Krzysztof and others verify these improvements.
The implementation used in Edgy:
uses a different technique for its data collection which I don't think is
susceptible to this problem, so the official Edgy CDs should already have
this benefit, but I'm CCing Tollef to confirm.
More information about the ubuntu-devel