[kwlug-disc] Decrease boot time

Chris Irwin chris at chrisirwin.ca
Thu Dec 17 16:41:45 EST 2009


On Thu, Dec 17, 2009 at 15:07, Paul Nijjar <paul_nijjar at yahoo.ca> wrote:
> One aspect of the trend towards "Desktop Linux" that I really hate is that we now hide the bootup messages. Personally I dislike Windows bootup because I don't know what is happening. Now that Ubuntu and friends are just doing progress bars (or worse yet sliders) I don't know whether the machine is just slow to boot or whether it is hanging entirely.

You can remove "quiet" and/or "splash" from menu.lst or
/etc/default/grub (grub1 vs grub2, respectively) to have a verbose
and/or non-bootsplashed boot sequence. I'm not sure of the status of
current boot splash themes with regards to text at boot. I believe
(but don't quote me) regardless of technology used (usplash, xsplash,
plymouth), verbose graphical boot is theme dependent. There may or may
not have been an effort behind it for whatever theme your distro ships
out of the box.

> I do not mind a bootup time of several minutes provided that:
>
> 0. I can see what is going on well enough to know that bootup is progressing normally.

You can remove "quiet" and/or "splash" from menu.lst or
/etc/default/grub (grub1 vs grub2, respectively) to have a verbose
and/or non-bootsplash boot sequence. I'm not sure of the status of
current boot splash themes with regards to text at boot. I believe
(but don't quote me) regardless of technology used (usplash, xsplash,
plymouth), verbose graphical boot is theme dependent. There may or may
not have been an effort behind it.

> 1. When the machine says it is booted then it is responsive -- I don't like this "log in, and then see the desktop, and then be unable to do anything for ANOTHER ten minutes" garbage.

There has been experimentation with starting gdm before the system is
done booting, but this has typically caused more problems that it's
worth. You increase "perceived" system boot time, but extend the time
it takes to log in as the system is still working in the background. I
think the gamble is on users typing their credentials slow enough that
the boot can finish behind the scenes.

This is another issue. Boot sequences for traditional hard disks has
been sped up by various readahead schemes. Profiling has shown the
processor is idle for large portions of boot while waiting for slow
disks to get required bits into memory. The reverse was also true,
while the processor was working away the disk was idle. Readahead
simply keeps a list of all files that need to be read and gets them
into cache early in the boot process so the associated scripts do not
have to wait for slow disks. There are several algorithms and
implementations of this.

Unfortunately they all seem to stop at the system level. As soon as
you log in, everything for your entire session goes through a similar
process of programs waiting for data from disk. I've seen some people
set up a similar readahead as part of their session to ensure all
files accessed during login are brought into cache. I don't log in
often enough to worry about doing weird stuff to save a few seconds,
although i would like for my distro to do it for me.

Of course these improvements work better if you have a plentiful
supply of memory.

> 2. The bootup time is reasonably consistent, so that I know I can go away for a set period of time and come back to a booted machine.

The goal of upstart in Ubuntu (and moving into debian, fedora, etc) is
to boot asynchronously, and only required pieces. So if you don't have
certain devices connected, associated services won't start.

-- 
Chris Irwin
<chris at chrisirwin.ca>



More information about the kwlug-disc_kwlug.org mailing list