How to Profile your Boot Time

From Mandriva Community Wiki

Jump to: navigation, search


The goal of this page is to gather all the ideas to improve Mandriva Linux's Boot Time.

Contents


How To Profile

  1. Install the bootchart-logger package from contribs, with following command urpmi bootchart-logger
  2. Reboot
  3. Press the F3 key at the graphical bootloader (grub) screen, and append init=/sbin/bootchartd to the kernel parameters.
  4. On Mandriva 2010.0 or later, if you want to keep graphical splash running, add plymouth:force-splash to kernel parameters.
  5. After boot, verify that /var/log/bootchart.tgz was created and contains the log files.

Producing the graph

Either:

  • Uploading your /var/log/bootchart.tgz file on http://www.bootchart.org/download.html (Renderer Web Form section).
  • Install the bootchart package and generate the bootchart graph yourself by running bootchart /var/log/bootchart.tgz.

For more information, see: http://www.bootchart.org/

Trial Results

Put the results you've had on your system here, describing:

  1. Your hardware
  2. The services that were running (if it is not a fresh basic installation)
  3. The amendments you've applied to improve time of successive boot processes
  4. Time results for each trial

To ease comparisons, it would be best to do your first test with a fresh basic installation, without modifying anything.

Test Run - 23 October 2007

Hardware

  • IBM Thinkpad T60pw
  • CPU: Intel Core 2 CPU T7400 @ 2.16GHz
  • Memory: 2.0 GiB

System / Services / Modifications

  • Distribution: Mandriva Linux 2008.0 x86_64
  • Kernel: Linux 2.6.22.9-laptop-1mdv SMP x86_64
  • Desktop: Gnome 2.20.0
  • Service at run level 5: acpi, acpid, alsa, apmd, atd, avahi-daemon, bluetooth, consolekit, cpufreq, crond, cups, dkms, dm, fuse, haldaemon, harddrake, iptables, keytable, kheader, laptop-mode, mandi, messagebus, netfs, network, network-up, nfs-common, nscd, partmon, portmap, resolvconf, shorewall, sound, syslog

Results

  • Total Boot Time: 42s
BootChart Results

Test Run 2 - 27 Apr 2008

Hardware

  • Compaq nc6320
  • CPU: Intel Core 2 CPU T5600 @ 1.83GHz (Centrino Duo)
  • Memory: 1.0 GiB

System / Services / Modifications

  • Distribution: Mandriva Linux 2008.1 i586
  • Kernel: Linux 2.6.24.4-laptop-1mnb #1 SMP i686
  • Desktop: Gnome 2.22 (does it really matter ?)
  • Service at run level 5: aaeventd acpid alsa anacron apmd apparmor atd avahi-daemon bluetooth cpufreq crond cups ddclient dkms dm fuse gpm haldaemon harddrake hddtemp iptables keytable kheader laptop-mode lisa lm_sensors mandi messagebus netfs network network-up nfs-common nscd ntpd partmon portmap psacct resolvconf shorewall smartd sound sshd syslog virtualbox

Results

  • Total Boot Time: 56s
BootChart Results

Test Run 3 - 6 Oct 2008

Hardware

  • Asus Eee PC 901
  • CPU: Intel(R) Atom(TM) CPU N270 @ 1.60GHz
  • Memory: 1.0 GiB

System / Services / Modifications

  • Distribution: Mandriva Linux 2009.0 (Cooker) i586
  • Kernel: Linux 2.6.27-desktop586-0.rc8.1mnb #1 SMP
  • Desktop: Gnome 2.24
  • Service at run level 5: acpid alsa anacron atd avahi-daemon cpufreq crond dm haldaemon ip6tables iptables irqbalance keytable kheader laptop-mode mandi messagebus netfs network network-up partmon preload psacct resolvconf shorewall sound syslog udev-post

Results

  • Total Boot Time: 23s
BootChart Results

Ideas to improve Boot Time

  • iptables/shorewall takes about 6 seconds ([How can I speed up start (restart)?])
  • harddrake takes 5 seconds at every boot => automatically activate harddrake service only when system detects new hardware before rebooting.
  • Add boot image [kernel name]-New_Hardware. When this boot image is selected, HardDrake/other hardware detection software runs. Otherwise skip the hw detection.
  • KDE Performance Tips (How to turn off system configuration startup check (kbuildsycoca) in Mandrakelinux 10.1?) (GregorP)
  • Run some services in background.
  • Start services xfs & dm sooner.
  • Use prelink.
  • Use dash instead of bash.
  • Start CUPS later in the boot process; it's rarely needed before login.
  • Start gpm later in the boot process
  • Add readahead support
  • Optimise file layout on disk (e.g. with a set aside partition)
  • Integrate highly experimental Ubuntu patches (hacked up xorg loader, hotplug changes)
  • Take a look on what Ubuntu is doing regarding Faster Boot (http://www.ubuntulinux.org/wiki/FasterBootProcess)
  • Parallelization of startup scripts -- NOW IMPLEMENTED AS DEFAULT
  • Consider finit (http://helllabs.org/finit/)

More information

Personal tools