Wednesday, July 1, 2009

Hardware/software tricks --- speed up boot times

Disclaimer: I'm just passing on something interesting which works for me. Don't blame me if your box melts down....

Trawling slashdot recently I found reference to a way to speed up boot times dramatically, by forcing services to start in parallel rather than one at a time.

This method is definitely in the "quick and dirty" category but works provided that none of your services depend on each other to start.

Basically all that is required is to edit /etc/rc, by adding an & after $i start

Code:
if egrep -q "(daemon |action |success |failure )" $i 2>/dev/null \
|| [ "$subsys" = "single" -o "$subsys" = "local" ]; then
$i start &
else


On my mdk 10.1 box which is not running any servers (web server, mail server etc), it probably shaves a good 30 seconds off boot time.

No comments:

Post a Comment