How to Profile your Boot Time
From Mandriva Community Wiki
(Redirected from Development/Howto/Boot Time Optimisation)
How to Profile Your Boot Time
The goal of this page is to gather all the ideas to improve Mandriva Linux's Boot Time.
Contents |
[edit] How To Profile
- Install the bootchart-logger package from contribs, with following command urpmi bootchart-logger
- Reboot
- Press the F2 key at the graphical bootloader (grub) screen, and append init=/sbin/bootchartd to the kernel parameters.
- After boot, verify that /var/log/bootchart.tgz was created and contains the log files.
[edit] 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/
[edit] Trial Results
Put the results you've had on your system here, describing:
- Your hardware
- The services that were running (if it is not a fresh basic installation)
- The amendments you've applied to improve time of successive boot processes
- 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.
[edit] Test Run - 23 October 2007
[edit] Hardware
- IBM Thinkpad T60pw
- CPU: Intel Core 2 CPU T7400 @ 2.16GHz
- Memory: 2.0 GiB
[edit] 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
[edit] Results
- Total Boot Time: 42s
[edit] Test Run 2 - 27 Apr 2008
[edit] Hardware
- Compaq nc6320
- CPU: Intel Core 2 CPU T5600 @ 1.83GHz (Centrino Duo)
- Memory: 1.0 GiB
[edit] 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
[edit] Results
- Total Boot Time: 56s
[edit] Test Run 3 - 6 Oct 2008
[edit] Hardware
- Asus Eee PC 901
- CPU: Intel(R) Atom(TM) CPU N270 @ 1.60GHz
- Memory: 1.0 GiB
[edit] 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
[edit] Results
- Total Boot Time: 23s
[edit] 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/)
[edit] More information
- http://jw.dyndns.org/initng/ - Initng, sysvinit replacement
- http://www.fastboot.org/ - parallelisation for sysvinit

