Date: Wed, 21 Aug 2002 09:19:42 -0700 From: Luigi Rizzo <rizzo@icir.org> To: "M. Warner Losh" <imp@bsdimp.com> Cc: nbm@mithrandr.moria.org, arch@FreeBSD.ORG Subject: Re: ugliness in rc.* scripts Message-ID: <20020821091942.B59085@iguana.icir.org> In-Reply-To: <20020821.095726.109035410.imp@bsdimp.com>; from imp@bsdimp.com on Wed, Aug 21, 2002 at 09:57:26AM -0600 References: <20020820232538.A53816@iguana.icir.org> <20020821074819.GA58163@mithrandr.moria.org> <20020821061822.A56560@iguana.icir.org> <20020821.095726.109035410.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 21, 2002 at 09:57:26AM -0600, M. Warner Losh wrote: > In message: <20020821061822.A56560@iguana.icir.org> > Luigi Rizzo <rizzo@icir.org> writes: ... > : i think it is only one process -- echo is a builtin, tolower is a shell > : function. In any case, we never cared about performance in the rc scripts, > : not spawning processes (e.g. calling scripts with . instead of sh) has > : only to do with letting variable assignements be visible in the caller. > > Actually, we have cared about the performance of shell scripts in the > past. NetBSD got a nasty surprise when they went to their new rc ... oh man, should i always include a track record when i make a posting ? sure, we do care about performance everywhere (except perhaps in -current :). I have spent a huge amount of time doing performance improvements in FreeBSD all across the board, and i do care about embedded things, as witnessed by my work on picobsd... my point is that a few occasional process forks during startup because of judiciously called external processes (i certainly don't plan to put these things within a loop) won't hurt too much. I would say that the impact would be much lower than what we currently pay by having statically-linked, non-crunched binaries in /bin and /sbin. Also, following your previous suggestion about a "case -i" : the problem is that then our scripts would then become non-portable. If we have to go to non-standard approach, i would rather implement some commands as shell builtins so that we do not pay the fork overhead in a fully transparent way. E.g. 'tr' could be one, expr another one, rm another one (it is run within a couple of loops in /etc/rc ...) I would also look for some way to implement (cheaply) associative arrays... cheers luigi > boot process. Some machines went from taking 10 seconds to boot to > taking 30 minutes. They fixed this in two ways: 1) by reducing the > number of forks in the rc scripts and 2) by fixing bugs in that > architecture that make fork insanely slow. > > We still need to boot fast enough that things aren't insanely slow on > a 32MB 66MHz 486. There's enough embedded people doing embedded > things that will likely want 5.0 that we have to keep that in mind. > The company I work for has systems with 133MHz 486-class CPUs that we > ship with 32MB RAM. > > Warner > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020821091942.B59085>
