Profile and visualize Linux boot process with Bootchart


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.

Teaser

Convinced? Follow me.

Install Bootchart

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.

Download

Run Bootchart

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.

Like this:

GRUB

Press Enter or b to boot. The system will appear to hang for a few seconds and then it will resume its normal boot.

Retrieve and analyze results

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:

Report

And zoomed in:

Zoomed in 1

Zoomed in 2

Sample comparison - Ubuntu 8.10 versus Ubuntu 9.04

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)

Intrepid

Ubuntu 9.04 Jaunty Jackalope

The score: 0 minutes 38 seconds (38 seconds)

Jaunty

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.

If you're interested, you may want to read in-depth reviews of both Intrepid and Jaunty, covering a range of topics.

Conclusion

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.

Cheers.

RSS Feed icon

del.icio.us del.icio.us stumbleupon stumble digg digg reddit reddit slashdot slashdot



Advertise!

Would you like to advertise your product/site on Dedoimedo?

Read more

Donate to Dedoimedo!

Do you want to
help me take early retirement? How about donating
some dinero to
Dedoimedo?

Read more

Donate