Inicio > Ubuntu, Utilidades > ¿Cuanto tarda tu equipo en arrancar?

¿Cuanto tarda tu equipo en arrancar?

Viernes, 30 de enero de 2009 Dejar un comentario Ir a comentarios

cronometro

spain

Mi equipo tarda poco en arrancar, muy poco la verdad, 15 segundos desde que selecciono Ubuntu en el grub hasta que se carga el GDM no está nada mal ehh, y más si los comparamos con los supuestos tiempos que tardan diferentes versiones de windows (que por cierto, a mi el Vista Ultimate SP1 x64 me tarda casi 45 segundos en estar todo cargado) o con los 21 segundos que prometen para la nueva versión de Ubuntu (9.04) con el nuevo sistema de ficheros EXT4.  Bueno dejo de hacerme “pajas” mentales y os explico como ver el tiempo que tarda vuestro sistema en arrancar y como obtener una pequeña mejora de tiempo.

¿Cómo medir ese tiempo?

De una forma muy sencilla, usando bootchart. Bootchart es una herramienta para analizar el rendimiento y visualizar el proceso de inicio en GNU/Linux. La utilización de recursos y la información sobre los procesos ejecutados se recolecta durante el proceso de arranque y posteriormente se renderiza en una gráfica con formato PNG. Bootchar proporciona un shell script para ser ejecutado por el kernel en la fase init. El sccript se ejecutará en el background y recopilará información sobre los procesos, estadísticas de CPU y uso de disco a partir del sistema de ficheros /proc. Los datos se alacenan en memoria y se escriben en el disco una vez que el proceso de arranque finaliza.

En caso de que usemos una distribución basada en paquetes como Ubuntu, podemos instalar el paquete bootchart y de forma automática se configura el initrd para que se lance el script al iniciar nuestro sistema. Los gráficos se almacenan en /var/lob/bootchart, y tendrán un aspecto más o menos como este:

intrepid-20090129-1

Emmm… si en esta imagen aparece que son 21 segundos los que me tarda en arrancar el sistema, pero es que aún no había hecho el truco para que los scripts se lancen de forma paralela. Por cierto, en esa entrada que os acabo de dejar hago referencia a posibles problemas en el arranque concurrente, pero leyendo la ayuda del fichero /etc/init.d/rc he apreciado que podemos instalar un paquete llamado insserv que nos reorganiza de forma automática los scripts de arranque para que no suframos dichos problemas. Ahora si os muestro la nueva gráfica generada tras arrancar el sistema con soporte de inicio de scripts de forma paralela:

intrepid-20090129-2

Por cierto, si os preguntáis como consigo esa velocidad de arranque preguntárselo a los 150€ que me gaste en el Wester Digital Velociraptor 150GB :P .

england

My computer takes little to boot, very little honestly, 15 seconds from I select Ubuntu in grub until GDM is loaded, it’s not bad ehh, especially if we compared with the supposed times  that different version of windows takes (In my case, Windows Vista Ultimate SP1 x64 takes me 45 seconds) or with the 21 seconds promised in the new version of ubuntu (9.04) with the new file system EXT4. Well, stop pissing around I will explain you how to see the time that takes your computer to boot and how to obtain a little improvement of time.

How to measure this time?

In a very easy way, using bootchart. Bootchart is a tool for performance analysis and visualization of the GNU/Linux boot process. Resource utilization and process information are collected during the boot process and are later rendered in a PNG, SVG or EPS encoded chart. Bootchart provides a shell script to be run by the kernel in the init phase. The script will run in background and collect process information, CPU statistics and disk usage statistics from the /proc file system. The performance data are stored in memory and are written to disk once the boot process completes.

In case of we use a package based distribution like Ubuntu, we can install the bootchat package and automatically initrd is configured for launching a bootchat script in the startup of our system. The charts are storaged in  /var/lob/bootchart, and they will have a appearance like this:

intrepid-20090129-1

Emmm… yes, the above image shows that my system takes 21 seconds to boot, but I had not done yet the trick to launch the init scripts parallely. In that post that I just leave you I refer to possible problems in concurrent boot, but reading the help of /etc/init.d/rc I appreciated that we can install a package called insserv that will automatically sort the startup scripts so that we don’t suffer these problems. Now I’ll show you the new chat generated after booting my system with concurrent scripts support.

intrepid-20090129-2

By the way, if you are asking how I reach this boot speed, ask to the 150€ that I spent on the Wester Digital Velociraptor 150GB :P .

GD Star Rating
loading...
Share
  1. Trece
    Viernes, 30 de enero de 2009 a las 05:47 | #1
    GD Star Rating
    loading...

    Qué tal. Yo hice la modificación para el arranque en paralelo, pero el sistema siguió tardando el mismo tiempo en arrancar (29 segundos). Utilizo ubuntu 8.10 en un aspire con intel dual core y 2 gb de ram.

    La modificación que hice al rc quedó de la siguiente manera.

    if [ startpar = "$CONCURRENCY" ] ; then
    test -s /etc/init.d/.depend.boot || CONCURRENCY=”none”
    test -s /etc/init.d/.depend.start || CONCURRENCY=”none”
    test -s /etc/init.d/.depend.stop || CONCURRENCY=”none”
    startpar -v > /dev/null 2>&1 || CONCURRENCY=”none”

    # startpar do not work properly at the start of rcS.d/. Avoid it.
    # See #457896 for details.

    if [ S = "$runlevel" ] ; then
    CONCURRENCY=shell

    ¿es correcto así o debo modificar todas las concurrencias?

    Saludos.

  2. Viernes, 30 de enero de 2009 a las 07:36 | #2
    GD Star Rating
    loading...

    Hola Trece, ahí no es donde tienes que modificar la variable concurrency, si te fijas aparece mucho antes la variable en un nivel global (sin estar dentro de un IF). Aproximadamente en la línea 32 del fichero.

    A ver si consigues mejorar un poco ese tiempo con este “truco” ;)

  1. Sin trackbacks aún.