Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Oct 2000 21:13:07 +0200
From:      Gerhard Sittig <Gerhard.Sittig@gmx.net>
To:        freebsd-current@FreeBSD.ORG
Subject:   Re: new rc.network6 and rc.firewall6
Message-ID:  <20001026211307.V25237@speedy.gsinet>
In-Reply-To: <14839.16362.106387.571284@guru.mired.org>; from mwm@mired.org on Wed, Oct 25, 2000 at 03:17:46PM -0500
References:  <imp@village.org> <21367.972424567@winston.osd.bsdi.com> <20001025201401.Q25237@speedy.gsinet> <14839.16362.106387.571284@guru.mired.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Oct 25, 2000 at 15:17 -0500, Mike Meyer wrote:
> Gerhard Sittig writes:
> > What's new is:
> > - include the general config at the start (and yes, in every
> >   single script -- but this should be neglectable in terms of
> >   speed penalty and makes them work separately, too -- which is a
> >   real big gain!)
> 
> This isn't really new; it's been nagging me for a while. Also,
> periodic.conf does this now.  I'm not convined it's negligible when
> added up over dozens of scripts.  I'm planning on taking some
> measurements to see how much this really costs. I believe I have a
> solution if it turns out to be non-negligible.

The "negligible" (you finally got what I meant :) comes IMO from
considering how often this would happen.  I really dont mind at
all if booting would take 10 more seconds or shutdown would do.
An hourly cronjob eating two more seconds (under heavy load) is
no problem at all.  And I feel these time ranges to be estimated
in a very generous way and expect them to be much lower in real
life.  I really would be surprised to be totally wrong in this
respect.  We're talking about "source"ing config and subroutine
files -- the shell text is shared and the script code (file data)
already in the cache, we just create a new process and allocate
data (copy on write helps here) and stack.

> > - maybe include (source) some common code like
> >   - determining pids belonging to program names
> >   - starting processes in an supervised or backgrounded or any
> >     other special way
> >   - have some printouts, error level summary, etc
> > but I don't see FreeBSD having this level of "rc lib" as NetBSD
> > has in rc.subr or even RedHat has in /etc/rc.d/functions(sp?).
> > So only the sourced rc.conf (default and customized) remains.
> 
> Said solutions works shell functions as well.

When you're really afraid of speed you can always do what's
usually done with C header files:

[ -z "$SOURCED_FLAG" ] && . $SOURCE_FILE

When clearing the SOURCED_FLAG variable at boot's / shutdown's
end you aren't very confused later and who fiddles with those
variables at the command line by hand gets what he deserves. :>

> [ ... lib function and service script skeleton snipped ... ]


virtually yours   82D1 9B9C 01DC 4FB4 D7B4  61BE 3F49 4F77 72DE DA76
Gerhard Sittig   true | mail -s "get gpg key" Gerhard.Sittig@gmx.net
-- 
     If you don't understand or are scared by any of the above
             ask your parents or an adult to help you.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




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