From owner-freebsd-current@FreeBSD.ORG Tue Apr 13 13:00:36 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BD4F816A4CF for ; Tue, 13 Apr 2004 13:00:36 -0700 (PDT) Received: from mail012.syd.optusnet.com.au (mail012.syd.optusnet.com.au [211.29.132.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id AED8D43D4C for ; Tue, 13 Apr 2004 13:00:35 -0700 (PDT) (envelope-from PeterJeremy@optushome.com.au) Received: from cirb503493.alcatel.com.au (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) i3DK0ES08446; Wed, 14 Apr 2004 06:00:14 +1000 Received: from cirb503493.alcatel.com.au (localhost.alcatel.com.au [127.0.0.1])i3DK0DSU022689; Wed, 14 Apr 2004 06:00:14 +1000 (EST) (envelope-from jeremyp@cirb503493.alcatel.com.au) Received: (from jeremyp@localhost)i3DK0DfR022688; Wed, 14 Apr 2004 06:00:13 +1000 (EST) (envelope-from jeremyp) Date: Wed, 14 Apr 2004 06:00:13 +1000 From: Peter Jeremy To: Brian Reichert Message-ID: <20040413200013.GC53327@cirb503493.alcatel.com.au> References: <11095.1081621779@critter.freebsd.dk> <407B1EBC.6050405@freebsd.org> <407B234D.7070209@kientzle.com> <20040413160331.GM6308@numachi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040413160331.GM6308@numachi.com> User-Agent: Mutt/1.4.2i cc: current@freebsd.org Subject: Re: Optimizing RCng execution speed ? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Apr 2004 20:00:36 -0000 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