Sometimes one’s never pleased with the performance of a boot process for the most services one may opt not to start at boot time. Before performing any optimizations to that maybe should be better to take a closer look on where it is slow. That’s when bootchart comes into play.
“Bootchart provides a shell script to be run by the kernel in the
initphase. The script will run in background and collect process information, CPU statistics and disk usage statistics from the/procfile system. The performance data are stored in memory and are written to disk once the boot process completes.”
Start by installing the application:
The next step is to tell the system that it must start bootchartd before anything else on the user-space level (after loading the kernel into RAM). Let’s reboot the machine and then stop by the GRUB boot menu. Once there choose the kernel you want to analyse by using the arrow keys and then press ‘e’ to edit that kernel entry in the GRUB list. Then press ‘e’ again to edit the line where is loaded the vmlinuz image and at the end of that line add:
Save and press ‘b’ to boot. The system may boot as usual. (Note: If you intent to use bootchart oftenly I recommend editing /boot/grub/menu.lst and write it there for time saving.) Once it’s complete there should be a file /var/log/bootchart.tgz wich is used to generate a graph of the boot process. Issue:
Then you should have a graph of the boot process in a png image format.
This is the graph of the boot process of my eeepc running Debian 5.0 in a Linux 2.6.26-1-686 kernel:

I’m willing to post about the entire boot process from BIOS until the user-space state but someday later. If you have some ideas or expertise on tweaking the boot process leave a comment.