Wisent: a Python parser generator. A Python LR(1) parser generator. … read more

Jvterm. Homepage of the JVTerm terminal emulator. … read more

Using the ALSA Sound System. A short guide through the Linux ALSA mess and some hints about con­fig­u­ra­tion. … read more

Profile of the Boot Process of a Debian System

By Jochen Voss, last updated 2012-02-18

Introduction

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.

Results

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:

[initial stages of the boot process]

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.

How does it Work?

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.

References

Copyright © 2012, Jochen Voss. All content on this website (including text, pictures, and any other original works), unless otherwise noted, is licensed under a Creative Commons Attribution-Share Alike 3.0 License.