CentOS boot time on SSD!

Updated: July 13, 2012

Several weeks ago, I reviewed CentOS 6.2 on my T61 machine, equipped with two SSD disks, one of which served to host the freshly installed RedHat derivative. It worked well, just as expected. But then, came the issue of the boot time. I intentionally did not reveal it, so you would have to be reading this article.

But no, seriously, timing the boot process on CentOS is tricky, for two reasons. One, the software for that purpose, called Bootchart, is not part of the OS image or the repository, so you will have to manually set it up and create graphs. Not an easy task, hence the first part of this article, almost a tutorial. Two, CentOS is not about boot speed, because it's irrelevant when you run a server distribution. What matters is stability and performance with real tasks. But home fanboys, myself included, like numbers, so let me give you some numbers. Before you read further, take a wild guess. How quick is CentOS on SSD?

Setup Bootchart on CentOS

You will need two things. First, grab the program from the official website and run the installation script. What it will do is create a separate boot entry in the GRUB menu, which has the bootchart profiling added. If you're multi-booting or have a different distribution with GRUB2 in charge of the boot menu, you will have to update the bootloader to get things going.

The second thing is the configuration of pybootchartgui program. It's a tiny Python script that will parse collected Bootchart data and create the dependency graph complete with figures and all that.

So, the whole sequence is as follows:

Bootchart installs and clones the main GRUB stanza to read init=/sbin/bootchartd.

When the system boots, bootchart.tgz data is saved to /var/log. You can copy the file anywhere you want or leave it there. The archive is just a collection of several text files with data. Nothing more.

Bootchart files

The third step is to execute pybootchartgui.py against this file.

Running script

Here's the text:

[root@centostest]# ./pybootchartgui.py bootchart.tgz
warning: no parent for pid '2' with ppid '0'
Merged 0 logger processes
Pruned 307 processes
Pruned 0 exploders
Pruned 100 threads
Pruned 3 runs

All right, we're ready.

CentOS boot time

Now, the interesting part. Well, the distribution loaded in about 19.5 seconds total time, from start to a fully functional desktop. This figure is better than Kubuntu 11.10 and comparable to Kubuntu Pangolin. Not a bad result for a system that has no regard for desktop Fast 'n' Furious games. Speaking of optimization. Yup.

Bootchart graph


I did mention that SSD does not make a super fast system any faster than it already is, which is noticeable, or rather, not noticeable, when you boot CentOS on a machine like this. However, the boot process has always been rather long. With SSD, you see a drastic difference. Unlike the desktop experience, which is quick and snappy no matter what, the boot stage is significantly cut down, as much as 60% I dare say.

There you go, a most likely unexpected result. I like the fact that SSD does come to bear visibly with this distribution. CentOS 6.2 has always been a very lean system, but the boot was slow. Now, this has been remedied. In a way, there's usefulness to SSD after all, much more so than with other distributions. While you do not see much improvement in the Ubuntu family, due to an already well optimized and parallelized process for quite some time now, with CentOS, solid-stage storage makes an interesting boost.

Well, you learned about setting up Bootchart as well as being leet. What more could you ask for. I guess this concludes this little article. See you around, fellas.


You may also like: