2009.1-speedboot

From Mandriva Community Wiki

Jump to: navigation, search

SpeedBoot is available in 2009 Spring beta version.

What does speedboot do?

Speedboot starts all needed actions for the graphical system (display manager) first and then, continue all other actions needed for a full boot, in background.

How is it implemented ?

We are reusing techniques which have been used already on some of our OEM products, with finit, but with more standard implementation, keeping current initscripts.

To be able to start minimal services needed for display manager to start, we introduced S runlevel (with only 5 services : acpid, dbus, hal, syslog nd dm). Unfortunately chkconfig code only likes numeric runlevels, so runlevel S is implemented as runlevel 7 (both represent the same runlevel, but 7 is the one to be used in initscripts).

When booting in speedboot mode, a lot of actions which were done in initscripts are ignored. This is why speedboot might not work on your system.

For phase 1 of speedboot, I disabled as much actions as possible in rc.sysinit. Some actions just need to be delayed after display manager is started, so I'll try to defer some of the currently disabled actions, for phase 2 of speedboot.

In phase 2 (or 3) of speedboot, we will automatically enable speedboot if some criteras are met and if no conflicting features are enabled on the system, such as crypto FS, raid, network authentication. If speedboot fails, the system will automatically fallback to standard boot and will not retry speedboot by itself.

Currently, readahead has been completely disabled when using speedboot. Our measures showed regressions when using either readahead or sreadahead but they were not done on SSD drives.

How can I use speedboot ?

By default starting with 2009.1 RC2, speedboot is enabled in automatic mode by default, using the following heuristic :

  • first boot on a specific kernel version : speedboot is disabled and boot will be checked to see if some conditions are preventing speedboot to be enabled
  • second boot on the same kernel version : if conditions where met, speedboot is enabled and status is saved.
  • if speedboot failed, it will be tested a second time (for instance, if you had a dkms issue, stuff like that) for the next boot and either disabled for this kernel version (if failed) or enabled back.
  • speedboot will autodisable if network authentication is enabled or if runlevel is not 5
  • to disable or force speedboot, you can change its default in /etc/sysconfig/speedboot or to do a one time change, use speedboot=yes/no/auto/probe on kernel command line.

speedboot=probe is used to reset status for a specific kernel version (and redo the check) and should only be added manually on kernel command line.

status for speedboot is readable in /var/lib/speedboot/status, with the following value (after each kernel release ) :

  • OK : speedboot is enabled
  • STANDARD BOOT : last boot was a standard boot, next boot will be a speedboot
  • FAILED : X wasn't able to start in speedboot mode, speedboot is now disabled for this kernel release
  • FAILED (first time) : speed boot failed one time, next reboot, speedboot will be test again and disabled if failing again. This is needed to handled case where DKMS module aren't yet rebuilt or if graphic chipset changed somehow
  • DISABLED : system doesn't support speedboot. Reason is explained on the status line

The only missing things in speedboot are :

  • test disk speed to enable or not readahead (it is always enabled but will slow things on slow harddisk).
  • tune readahead "split" between first and second phase and maybe force readahead collection when speedboot has been enabled back.

Of course, we would like to collect as much bootchart data as possible, both when speedboot is enabled and when it is not. Bootchart howto

If speedboot is failing on your system, we are interested too, so please fill a bug report against initscripts and attach both bootchart graphs with and without speedboot enabled.

Personal tools
In other languages