Updated: April 18, 2009
Bootchart is an extremely simple, extremely handsome application that allows you to profile your Linux boot process, to measure the loading times of different services, to compare kernels and distributions, to identify bottlenecks and improve the performance of your system, and then to display the results in a professional-looking chart.
Convinced? Follow me.
Bootchart is included in the repositories of the major distros, including Debian, Ubuntu, Gentoo, SUSE, and Mandriva, so you should not have a problem finding and installing the package.
After Bootchart is installed, you will need to run it. To be able to properly time the boot sequence, Bootchart needs to be started as one of the first services. For this reason, Bootchart is not started as other services, using the Start scripts. Instead, it is invoked during the boot, by editing the GRUB menu parameters.
This may sound frightening, but it is quite simple and harmless.
First, when the system boots, press Esc to display the GRUB menu, in case it is not showing.
Second, press e to edit the GRUB menu. This pauses the timer and allows you to add your changes to the GRUB menu. Under the highlighted line, which you normally boot, simple type down the following string: init=/sbin/bootchartd.
Press Enter or b to boot. The system will appear to hang for a few seconds and then it will resume its normal boot.
Once the system comes up, you will have to check under /var/log/bootchart for the profiling results. If the directory is empty, you did not perform the last two steps correctly. However, if everything worked out fine, a beautiful image file (.png by default) should be there.
Something like this:
And zoomed in:
One of the main features in this spring release of Ubuntu was a significant reduction in boot time. I thought this was an excellent opportunity to both test Bootchart and use it to profile the boot sequence of the two releases and see how of a reduction the new version really claims.
The test rig was an Athlon 3800+ dual-core machine, with a single core dedicated to the virtual machines (32-bit) and 512MB RAM.
Ubuntu 8.10 Intrepid Ibex
Here are the results: 1 minute 4 seconds (64 seconds)
Ubuntu 9.04 Jaunty Jackalope
The score: 0 minutes 38 seconds (38 seconds)
As you can see, the claim is not an empty one. Jaunty boot time, on the same machine, with the same hardware configuration, has almost halved, from 68 seconds to 38 seconds! This is a tremendous achievement that many will appreciate. I think this is such an important result that I will create a separate article dedicated to this topic.
Bootchart takes 3 minutes to install and run, but it will provide you with a wealth of useful information that can help you analyze your system. It will let you compare your favorite distro performance between releases, like we did above, find potential problems with the boot order of various scripts or services, and help you tune and tweak your system to optimum.
Bootchart is a great administration tool. Simple and friendly, it can be used by just about anyone. This should really appeal to gamers, as Linux becomes more popular and gains more of the gaming audience.