From owner-freebsd-current@FreeBSD.ORG Tue Nov 25 00:48:02 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 CDD2F16A4CE for ; Tue, 25 Nov 2003 00:48:02 -0800 (PST) Received: from server.vk2pj.dyndns.org (c211-30-75-229.belrs2.nsw.optusnet.com.au [211.30.75.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F4A443FE1 for ; Tue, 25 Nov 2003 00:48:01 -0800 (PST) (envelope-from peterjeremy@optushome.com.au) Received: from server.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1])hAP8ljJD077553; Tue, 25 Nov 2003 19:47:45 +1100 (EST) (envelope-from peter@server.vk2pj.dyndns.org) Received: (from peter@localhost) by server.vk2pj.dyndns.org (8.12.9p1/8.12.9/Submit) id hAP8levw077552; Tue, 25 Nov 2003 19:47:40 +1100 (EST) (envelope-from peter) Date: Tue, 25 Nov 2003 19:47:40 +1100 From: Peter Jeremy To: "M. Warner Losh" Message-ID: <20031125084740.GE76478@server.vk2pj.dyndns.org> References: <200311242125.13786.sam@errno.com> <20031124.231607.128865107.imp@bsdimp.com> <20031125080155.GC76478@server.vk2pj.dyndns.org> <20031125.011734.118629079.imp@bsdimp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031125.011734.118629079.imp@bsdimp.com> User-Agent: Mutt/1.4.1i cc: freebsd-current@freebsd.org cc: gallatin@cs.duke.edu 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 08:48:02 -0000 On Tue, Nov 25, 2003 at 01:17:34AM -0700, M. Warner Losh wrote: >True. However, I get very similar numbers of I change it to >/usr/bin/true (12% slower). /bin/sh usually fork+exec things other >/bin/sh. That's a more interesting result and more comparable to Drew's test. It doesn't necessarily invalidate Drew's results - /bin/sh has 3 shared libraries and is locale-aware whereas /usr/bin/test has 1 shared library and doesn't rely on the locale. /usr/bin/true is also significantly smaller (implying less relocation requirements). /bin/sh could reasonably be expected to take longer to startup then /usr/bin/test. >Dynamically linked prorgrams tend to be a few percent slower than >their static counterparts due to PIC code typically being slower than >non-PIC code. There's nothing new here. Except that, on face value, your figures suggested an 11% slowdown attribute to PIC code - which is way above "a few percent". >Clearly there are problems to look into, but it isn't the end of the >world. Agreed. I think most people agree that more work needs to be done. The arguing seems to be whether the work should be done before or after the big switch is thrown and how to go about recovering the lost performance. (And of course one contingent is insisting it be green whilst a different contingent is insisting that it can't be green and has to be triangular instead). Peter