From owner-freebsd-current@FreeBSD.ORG Mon Nov 24 17:42:40 2003 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 150A416A4CE for ; Mon, 24 Nov 2003 17:42:40 -0800 (PST) Received: from rutger.owt.com (rutger.owt.com [204.118.6.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 31BF443FCB for ; Mon, 24 Nov 2003 17:42:39 -0800 (PST) (envelope-from kstewart@owt.com) Received: from topaz-out (owt-207-41-94-233.owt.com [207.41.94.233]) by rutger.owt.com (8.11.6p2/8.9.3) with ESMTP id hAP1gWu07569; Mon, 24 Nov 2003 17:42:32 -0800 From: Kent Stewart To: "M. Warner Losh" , dnelson@allantgroup.com Date: Mon, 24 Nov 2003 17:42:31 -0800 User-Agent: KMail/1.5.4 References: <16322.26365.159173.946033@grasshopper.cs.duke.edu> <20031125012208.GD46761@dan.emsphone.com> <20031124.182521.58437627.imp@bsdimp.com> In-Reply-To: <20031124.182521.58437627.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200311241742.31961.kstewart@owt.com> cc: freebsd-current@freebsd.org Subject: Re: 40% slowdown with dynamic /bin/sh 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, 25 Nov 2003 01:42:40 -0000 X-List-Received-Date: Tue, 25 Nov 2003 01:42:40 -0000 X-List-Received-Date: Tue, 25 Nov 2003 01:42:40 -0000 On Monday 24 November 2003 05:25 pm, M. Warner Losh wrote: > In message: <20031125012208.GD46761@dan.emsphone.com> > > Dan Nelson 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