A graph of gnome-session
Thanks to a Tatiana's coursework, we took a short time to make
a graph of the init session of
Bootchart is a program to collect information of the use of disc and processor of the system. It was created to be able to collect real data with which to be able to determine the necks of bottle in the init process of Linux and
thus to be able to accelerate it.
It seemed to be "an invasive" process, that it requires to perhaps modify the kernel or something similar. The certain thing, is that to collect the data it is only required to install an script, which must be invoked by kernel. Don't forget that the first process executed executed in UNIX is init; instead of invoking to init it is necessary to invoke to bootchartd, which leaves running some processes in background and later it will invoke to init. It is as simple as adding the following option in the boot:
The collected data will be stored in /var/log/bootchart.tgz (which
contains 4 archives); file that will be the input for bootchart, a
program written in Java that allows to generate a graph from the collected data.
Basically the program reads every 2 seconds the virtual archives/proc/diskstats,/proc/stats and/proc/*/stat
(for each one of the processes in execution). Being thus, it
is possible to use it to measure other programs; for example, the
init session of GNOME.
Perhaps many already they have realized that the starting depends
much on the time that takes gconf in reading all the preferences
and schemes. Thus, Federico has been indicating it for already a month and Havoc has let know that it is a pending issue of gconf and is awaiting for some
developer takes the task to solves the problem.
As an image is worth more than thousand words, I ran bootchartd to
make a graph of my GNOME session
in a notebook (Centrino 1.8 Ghz, 512 MB ram):
Graph of the second session. The firts one takes more
time, but it's possible to get the idea.
It shows the time that each application in initiating takes, as well as the disc use that each program does. The process really
start when the gdmgreeter is replaced by x-session-manager, and it happens whe the user and password
are entered and it's finish when the interface is ready to be used;
in my case it happened in second 23.
The reading of gconf varies according to the amount of stored keys, which goes in direct relation with the use of applications that a user has. Thus, in the first session of a user, gconf carries out less than 1/3 of the readings that the graph of my session of today. As well as it varies if it corresponds to the first session since the computer start up.
As is possible to see in the graph, there is another process
that for much reading to disc, it is Jamboree, which reads the
music archives. Also, there is a python process that make a
intensive use of CPU in a little period of time (which is related
to the notificador of updates of Ubuntu).
The process of data collection is simple:
$ sudo bootchartd start
$ (one begins the session, via gdm, startx, etc.)
$ sudo bootchartd stop
Once the process finish is time to run bootchart to generate
the graph. If Java is not available on the machine, still is
possible to get the graph filling a form in the website of
At first sight, it seemed that the process of data collection
is complex. But it is not. The main process is processing the
collected data and get the graph.