Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Apr 2004 06:00:13 +1000
From:      Peter Jeremy <PeterJeremy@optushome.com.au>
To:        Brian Reichert <reichert@numachi.com>
Cc:        current@freebsd.org
Subject:   Re: Optimizing RCng execution speed ?
Message-ID:  <20040413200013.GC53327@cirb503493.alcatel.com.au>
In-Reply-To: <20040413160331.GM6308@numachi.com>
References:  <11095.1081621779@critter.freebsd.dk> <407B1EBC.6050405@freebsd.org> <407B234D.7070209@kientzle.com> <20040413160331.GM6308@numachi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 13, 2004 at 12:03:31PM -0400, Brian Reichert wrote:
>On Mon, Apr 12, 2004 at 04:16:29PM -0700, Tim Kientzle wrote:
>> Poul-Henning Kamp wrote:
>> >
>> >Is anybody working on optimizing RCng execution speed ?
>> >
>> >I think our boottime is getting a bit too slow these days...
>
>Would 'compiling' some/all of the scripts be useful?

My gut feeling is "probably not".  Most of the rc scripts are
fairly trivial and amount to
	source configuration information and subroutines
	if action == "start" and my_config_variable != "NO"
		run some daemon
	elif action == "stop" and my daemon is running
		kill it
	endif
The time-consuming bits are starting a new shell and sourcing the
config files.  The config files can't be (totally) compiled in
because rc.conf needs to be user-configurable at runtime.  In
addition, the scripts themselves include magic comments used to
define dependency ordering so they must still exist.

If you feel that CCsh might help, why not whip up a prototype
implementation and time it.

As a general comment on this thread, my feeling is that optimising
boot speed is not the most productive use of scarce developer time
at present (though I agree it can be annoying if you need to reboot
regularly to test fixes).  If someone wants to have a look at this,
the place to start is to profile the complete system during startup
and see where the time is going.

Peter



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040413200013.GC53327>