boot visualization


Yesterday slashdot had an article about a project to visualize the GNU/Linux boot process. For no reason other than satisfying my inner geek, I rebooted this server and obtained my own visualization. Read on for gory details.

I can see right away that a huge chunk of time is spent by the SCSI driver (aic7xxx). From experience, I know that this driver spends 15-20 seconds doing nothing at all. This is done so that SCSI devices have a chance to “settle.” In the not-so-distant past of computer technology, some SCSI devices would take a really long time to initialize. If the operating system reset the SCSI bus and didn’t wait for those devices to finish initializing, major problems would ensue. I can safely reduce that wait time to about one or two seconds, because the lone SCSI hard drive in this system resets quickly.

After the SCSI driver is loaded, the RAID monitor (mdadm) loads, the filesystems are checked for errors (fsck), then mounted (mount), and the PCI bus is probed for hardware (discover). No time savings are possible here. The next step has to do with hot-pluggable hardware — USB, PCMCIA. This computer does not have any of that, so I can save another 7 seconds or so on my boot by removing hotplug and anything that depends on it.

Next, the nameserver process (bind9) is started, then a program called amavis. Once that’s started, the master antivirus process (clamav) is started.

I need to take a moment here and talk about amavis. It is a very complex program written in perl. It takes forever to start, because it pulls in an enormous number of perl libraries. One of those libraries is SpamAssassin. Another is an antivirus client that talks to clamav. The reward for such a slow startup time is an extremely fast and efficient spam filter and virus scanner. This system is so central to my server’s operation that I recently rebuilt the whole server and re-modeled my entire mail system around it.

After amavis and clamav start, a lot happens all at once. Processes that get started include the mailing list manager (mailman), the SQL database server (mysql), the mailserver (postfix and courier), the TACACS+ server (tac-plus), the ssh server (sshd), the FTP server (proftpd), and the webserver (apache).

Still with me? You can now join me in the summary: “Very cool.”


One response to “boot visualization”

  1. It is indeed, very cool. It’s funny that in your post you talk about how long it takes for SCSI to “settle down.” This is absolutely true and on some systems, very shocking how long it takes. I remember working on some external SCSI storage containers that contained 7 drives (constituting a striped volume – this was before RAID) and it would take 30 seconds per drive to recognize. Since this was a serial process it would take 4 full minutes for the external storage to come “on-line” and be ready for the computer to be turned on. One reason it takes so long is you don’t want 7 10,000 RPM drives all trying to spin up at once – it would blow your power supply. So you have each one spin up individually.

    Later with large RAID arrays of 7-10 drives, an internal controller card would make sure all the drives were ready before the BIOS allowed it to boot. These would typically take 2-3 full minutes. Rebooting servers is never a fast task.

    But your visualization is definetly very very cool!

Leave a Reply to Nat Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.