Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Apr 2004 16:16:29 -0700
From:      Tim Kientzle <tim@kientzle.com>
To:        current@freebsd.org
Cc:        Poul-Henning Kamp <phk@phk.freebsd.dk>
Subject:   Re: Optimizing RCng execution speed ?
Message-ID:  <407B234D.7070209@kientzle.com>
In-Reply-To: <407B1EBC.6050405@freebsd.org>
References:  <11095.1081621779@critter.freebsd.dk> <407B1EBC.6050405@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Poul-Henning Kamp wrote:
> 
> Is anybody working on optimizing RCng execution speed ?
>
> I think our boottime is getting a bit too slow these days...

I haven't tested the performance impact, but I've long
been suspicious of the way that RCng executes every
script in /etc/rc.d even if the corresponding functionality
is disabled.

For example, even if you've disabled all Kerberos
functionality, /etc/rc.d/kadmind will still get loaded
and executed just so it can test the kadmind5_server_enable
variable and abort immediately.

If rcorder could prune out such obviously-disabled scripts,
then that might make a difference.  For example,
we might add a new keyline to scripts:
    ONLY_IF: kadmind5_server_enable
or enforce a naming convention (the "kadmind_enable"
variable controls whether the "kadmind" script gets
run).  In this way, rcorder could pull in /etc/rc.conf,
then scan and order the available scripts, omitting
any that were clearly disabled.

Obviously, some scripts require more complex
"enabled" checking, but simple logic in rcorder
should be able to prune out the majority of the
disabled scripts without actually running them.

Tim Kientzle

P.S. There was a discussion about a year ago
on one of the mailing lists about the best
way for a C program to obtain the settings
from rc.conf.  The best approach was to fork
a shell and have it parse rc.conf and (via a
simple helper program) spit out the resulting
environment to be read in by the program.



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