Monday, September 04, 2006

Faster booting FreeBSD

Time when system is fully usable depends on:

  1. How long POST will end it's self tests

  2. When bootloader begin loading system

  3. How long system will be loading (kernel and modules load up)

  4. How long various services will be starting


Good router/gateway should be usable as fast as possible after turning it on.
The first point depends on hardware and BIOS. Some BIOSES have features defining type of POST for example fast, full, etc. We won't discuss it this time.
Kernel and modules - it's clear that smaller kernel and fewer modules make all system faster, not only when it's booting. This is story for another time. Similar to kernel, fewer services - faster booting.
The bootloader, especially boot0 can be easily tuned using boot0cfg:
boot0cfg -Bv -b /boot/boot0 -t ticks /dev/ad0
Ticks means quantity of impulses in RTC clock, it's about 18.2/s
Next thing wich can delay booting process is so called "beastie menu" or loader. It's next piece of code run after boot0. Loader directly loads kernel with selected parameters. Configuration file /boot/loader.conf includes many options, but we change only one value:
autoboot_delay="10"
It's in seconds let's change it to smaller piece of time. We can also disable beastie menu by setting this value:
beastie_disable="YES"

0 Comments:

Post a Comment

<< Home