Как построить временную диаграмму загрузки
Материал из Mandriva Russian Community Wiki
(Перенаправлено с Development/Howto/Boot Time Optimisation)
На этой странице приводятся все идеи, касающиеся улучшения времени загрузки Mandriva Linux.
Содержание |
How To Profile
- Установите пакет bootchart-logger. Это можно сделать с помощью команды urpmi bootchart-logger.
- Перезагрузите компьютер.
- Нажмите клавишу «F2» в окне загрузчика GRUB и добавьте init=/sbin/bootchartd к параметрам ядра.
- После загрузки проверьте, что /var/log/bootchart.tgz был успешно создан и содержит файлы журналов.
Создание диаграммы
Создать диаграмму можно двумя способами:
- Загрузите свой файл /var/log/bootchart.tgz на www.bootchart.org/download.html (Renderer Web Form section).
- Установите пакет bootchart и создайте диаграмму загрузки с помощью команды bootchart /var/log/bootchart.tgz.
Более подробную информацию можно найти на сайте www.bootchart.org.
Trial Results
Put the results you've had on your system here, describing:
- Аппаратное обеспечение
- Службые, которые запускались he services that were running (в случае, если состояние системы отличается от только что установленной)
- 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.
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.png
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
Файл:Bootchart2.png
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
Файл:Bootchart4.png
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
- jw.dyndns.org/initng – Initng – замена sysvinit
- www.fastboot.org – параллелизм sysvinit

