By Jochen Voss, last updated 2012-02-18
Some time ago, Ziga Mahkovec managed to create a nice graphical representation of the boot process of a Fedora Linux system. The aim of the exercise was find out where the system spends all the time during boot and ultimately to decrease start-up time. Since I liked the idea, I produced a similar (but less beautiful) plot describing the start-up of my Debian/unstable system. The result, a bit dated by now, is presented on this page.
Booting up my late computer (a laptop with a Pentium 4, 2.6GHz, 512MB RAM) takes approximately 85 seconds, roughly split into 10 seconds kernel initialisation, 40 seconds until GDM starts up and the system is ready for login, and 35 seconds more until the GDM auto-login is finished.
I generated a huge graphic which illustrates the boot process after the kernel initialisation up to the point where the GNOME Desktop is initialised. The initial stage looks like this:
The full images are huge, but contain a lot more information:
I tried to use the same color scheme as Ziga Mahkovec described in his posting.
I added the following lines to the /etc/init.d/rcS script:
mount -ttmpfs -osize=32m none /mnt /top -b -d0.10>/mnt/bootlog &
and temporarily copied /usr/bin/top
to /top
to make it available early during boot. This creates a file
bootlog
on the RAM-disk at /mnt. (I also used a specially
crafted
toprc
file, which must be installed as /.toprc.) The
generated log file contains information about all running processes, CPU
usage, memory usage etc. Samples are every 0.1 seconds.
This raw data I processed using a Python script. The images were generated with the great, Python-based MatPlotLib plotting library.
Copyright © 2012 Jochen Voss. All content on this website (including text, pictures, and any other original works), unless otherwise noted, is licensed under the CC BY-SA 4.0 license.