Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Nov 2003 17:42:31 -0800
From:      Kent Stewart <kstewart@owt.com>
To:        "M. Warner Losh" <imp@bsdimp.com>, dnelson@allantgroup.com
Cc:        freebsd-current@freebsd.org
Subject:   Re: 40% slowdown with dynamic /bin/sh
Message-ID:  <200311241742.31961.kstewart@owt.com>
In-Reply-To: <20031124.182521.58437627.imp@bsdimp.com>
References:  <16322.26365.159173.946033@grasshopper.cs.duke.edu> <20031125012208.GD46761@dan.emsphone.com> <20031124.182521.58437627.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 24 November 2003 05:25 pm, M. Warner Losh wrote:
> In message: <20031125012208.GD46761@dan.emsphone.com>
>
>             Dan Nelson <dnelson@allantgroup.com> writes:
> : In the last episode (Nov 25), Daniel O'Connor said:
> : > On Tuesday 25 November 2003 06:45, Andrew Gallatin wrote:
> : > > So.. forking a dynamic sh is roughly 40% more expensive than
> : > > forking a static copy of sh.  This is embarrassing.
> : > >
> : > > I propose that we at least make /bin/sh static.  (and not add a
> : > > /sbin/sh; if we must have a dynamic sh, import pdksh, or put a
> : > > dynamically linked sh in /usr/bin/sh).
> : > >
> : > > I'd greatly prefer that the the dynamic root default be backed out
> : > > until a substantial amount of this performance can be recovered.
> : >
> : > What _REAL WORLD_ task does this slow down?
> :
> : Try timing "cd /usr/ports/www/mozilla-devel ; make clean" with static
> : and dynamic /bin.  bsd.port.mk spawns many many many /bin/sh processes.
>
> Maybe you could try it with both and tell us the actual difference in
> wall time?

I don't see why this surprises anyone. A dynamic shell has to be the 
equivalent of swapping. In situations I have been in, you can only improve on 
static if you have a way to leave the pieces memory resident.

Kent

-- 
Kent Stewart
Richland, WA

http://users.owt.com/kstewart/index.html



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