Slashdot Mirror


Booting Linux Faster

krony writes "IBM's DeveloperWorks explains how to decrease boot times for your Linux box. The concept is to load system services in parallel when possible. Most surprising to me is the use of 'make' to handle dependencies between services." The example system shown is able to cut its boot time in half, but the article stresses the effectiveness can vary widly from machine to machine.

2 of 625 comments (clear)

  1. PowerPC Linux users had compiled boot 'scripts' by Sleepy · · Score: 5, Interesting

    This was three years or more ago, but I remember one of the PPC Linux developers "converted" all his system boot scripts in init.d to compiled C.

    Boot times went from about 2 minutes, to 35 seconds.

    (It took "so long" because it was an old PPC 601 60MHz or something like that).

    Distributions such as Mandrake and Gentoo claim they go the extra mile for "performance". I've wondered why neither has cleaned up their boot process.

    You wouldn't think Bash is slow from interactive use, but it really it. Piggyback on that speed problem that too many "functions" (OK, *commands*) are standalone executables... greate sub-process, collect result, destroy, rinse repeat.

    This is pretty interesting stuff, and I applaud this guys efforts. INIT script achitecture is pretty thankless stuff.. .no "glory". Fixing this would be like someone fixing fdisk... no one wants to touch the damn stuff...

    1. Re:PowerPC Linux users had compiled boot 'scripts' by Master+Bait · · Score: 5, Interesting
      That's a pretty good idea.
      I use a bunch of homemade Xterminals made out of Nforce boards and we have replaced /sbin/init itself with an executable shell script (and use ash for the shell instead of bash). The entire contents of init is this:
      #!/bin/sh
      /bin/cat /dev/null > /var/run/utmp
      /sbin/insmod /modules/nvnet.o
      /sbin/ifconfig lo 127.0.0.1
      /sbin/mount -o remount,rw /
      /sbin/mount -t proc /proc /proc
      /sbin/insmod /modules/nvidia.o
      /usr/X11R6/bin/X -broadcast
      /bin/sh

      No shutdown script is necessary because Xterminal users simply logout and turn them off.

      I think one of the biggest slowdowns on PCs is the lame PCBIOS which takes a very long time to run through all the hardware. I remember following LinuxBIOS development. It is so fast, that it was finished checking the computer's hardware before the disk drives finished spinning up.

      --
      "Only in their dreams can men truly be free 'twas always thus, and always thus will be."
      --Tom Schulman