Optimizing RCng execution speed ?

Colin Percival colin.percival at wadham.ox.ac.uk
Sat Apr 10 22:35:13 PDT 2004

At 19:29 10/04/2004, Poul-Henning Kamp wrote:
>Is anybody working on optimizing RCng execution speed ?
>I think our boottime is getting a bit too slow these days...

  One obvious optimization would be to avoid processing /etc/rc.subr
many times; on my 2.8GHz system running FreeBSD 5.2.1, this reduces
RCng time from 4.8 seconds down to 4.0 seconds:

Original times (with http://www.daemonology.net/tmp/src.rc.cp_time.diff) :
Starting RC scripts: kern.cp_time: 2 0 69 0 62
RC scripts done: kern.cp_time: 74 0 442 4 863

After applying http://www.daemonology.net/tmp/src.rc.subr.diff :
Starting RC scripts: kern.cp_time: 2 0 70 1 61
RC scripts done: kern.cp_time: 60 0 400 3 715

  Most of the idle time is due to HTT, but there is still 1.5
seconds when both logical processors are idle (presumably while
waiting for data from IDE); launching rcNG scripts in parallel
would presumably help with this.

  But it's a bit silly to optimize a 4 second startup time; could
someone running 5.x on slower hardware send me their cp_time values
with and without the second patch?

Colin Percival 

More information about the freebsd-current mailing list