[PC-BSD Dev] Wild idea to speed up boot process

Claudio L. claudio at hpgcc3.org
Thu Aug 22 11:01:41 PDT 2013


I did some testing on a VM (Virtualbox), and here's what I got:

Total time from BIOS screen to desktop: 45 sec
And this can be broken down in:
Grub+BIOS = 8sec  (includes the 3 second pause in GRUB)
Kernel init = 9sec (From the first kernel text until rc is called)
rc = 9 seconds (of which 2 seconds are to just start the loopback 
network interface)

The rest is the time from the text mode "login" prompt that marks the 
end of rc, to a full desktop, including autologin with 1 second delay, 
using XFCE desktop (on KDE will take a lot longer).

So from bios to rc finished I got 26 seconds, and then 19 seconds more 
to load gdm and the desktop.

Now we are at rc, which only takes 20% of my boot time. The speedup I 
was proposing would only be a fraction of that time, since for example 
starting the loopback network interface locks for 2 seconds (why? it's 
just a loopback, makes no sense).
**Warning** wild assumptions follow:
  Assuming we put about 10 MB of scripts and associated programs in RAM, 
at 100 MB/s sequential speed would be read in 0.1 seconds, versus 4 MB/s 
random which would take 2.5 seconds. So we would save 2.4 seconds 
maximum (in an ideal world).
2.4 seconds out of the 9 seconds in rc is a great improvement! But wait, 
2.4 seconds out of the 45 sec total is only a 5%. I can save more than 
2.4 seconds just by changing the timeout settings in GRUB.

Somehow I thought more time was being used at rc (9 seconds is not a 
lot). So I'm now inclined to trash my idea and forget it. I'm convinced 
it would produce a speedup, but after looking at these numbers I'm also 
convinced is not worth the effort.

Consider this thread closed.
Thanks to all for your input.
Claudio


More information about the Dev mailing list