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

37.5% boot time reduction in Lenny is possible (recipe)

Here is a quick report on how I was able to speed up the boot in Lenny
by using the tools available already.  I was able to reduce the boot
time as reported by bootchart from 48 to 30 seconds (37.5%).  I post
it here to make more Debian users aware of the possibilities.

This test was done on a freshly bought Thinkpad X installed with the
Desktop task in Lenny.  I started by installing bootchart and doing a
baseline benchmark to see how much time the default boot used.
Bootchart reported 48 seconds.

Next, I went through these steps to speed up the boot:

 (1) Installed dash, and ran 'dpkg-reconfigure dash' to enable it as

 (2) Installed readahead, and touched /etc/readahead/profile-once to
     get it to profile the boot on the next boot.

 (3) Installed insserv, and ran 'dpkg-reconfigure insserv' to enable
     dependency based boot sequencing and reorder the boot sequence.

 (4) Fixed the typo in /etc/init.d/rc reported in bug #481770 to make
     it possible to enable concurrent boot and shutdown.  Enabled
     concurrent boot and shutdown by doing

       echo CONCURRENCY=startpar >> /etc/default/rcS

     This one depend on dependency based boot being enabled.

 (5) Disabled init.d/hwclock* during boot after verifying that
     "UTC=yes" was active in /etc/default/rcS, and knowing that the
     kernel would set the clock from the BIOS clock during boot on
     this machine.  I disabled it by removing /etc/rcS.d/*hwclock*
     after verifying that there was still stop symlinks left in rc0.d
     and rc6.d.

After these steps were taken, I rebooted the machine once to do the
profile run for readahead, and then did a benchmark run to see the new
boot time.  It was down to 30 seconds, a 37.5% boot time reduction.  I
do not know which of these steps contributed to what amount of
reduction.  Did not have time to do that testing before I had to
return the laptop to its owner. :)

Another second would have been possible to shave off if I had upgraded
to the latest portmap package in unstable which drop a useless 1
second sleep during boot (patch in #412636).  It also give a problem
during shutdown due to #483102/#483172, so I do not recommend
upgrading portmap until those issues are fixed.

I am not quite sure what to do to reduce it even further.  Anyone got
any ideas?

Happy hacking,
Petter Reinholdtsen

Reply to: