40% slowdown with dynamic /bin/sh

Jacques A. Vidrine nectar at FreeBSD.org
Tue Nov 25 07:19:42 PST 2003


On Mon, Nov 24, 2003 at 10:06:12PM -0500, Andrew Gallatin wrote:
> How about Gordon's initial bootstone, which increased by 25%?
> http://docs.freebsd.org/cgi/mid.cgi?16091.44150.539095.704531
> 
> And I just did a "make clean" run in /usr/ports/archivers (by manually
> mv'ing a static and dynamic sh to /bin in turn):
> 
> static:       96.63 real        53.45 user        39.27 sys
> dynamic:     112.42 real        55.51 user        51.62 sys
> 
> The wall clock is bad (16% worse) and the system time is worse (31%).
> 
> 
> So.. 
> 
> 1) Microbenchmark:	40% worse
> 2) Bootstone(*):	25% worse
> 3) Ports:		16% worse

So can we just have a statically linked /bin/sh and get on with life?
That seems to have the most impact.  We can also expend our efforts
to improve dynamic linking performance, since that will improve the
performance of the other 99.9% of the universe.

Users who REALLY REALLY need /bin/sh to support 3rd-party NSS modules
in the mean time can build /bin/sh dynamically.  Or we can have
/usr/bin/sh as someone else suggested (most of the FreeBSD world's
shell scripts--- which are what we *really* seem to be talking
about--- already have #! /bin/sh).

I prefer to keep as much of the world dynamic, both for dlopen support
and for easier system patching.  But I can also understand the desire
to avoid a penalty for all those short but oft-run scripts.

In any case, I'd really like to see a goal for 5.3-RELEASE that
includes bringing dynamically-linked /bin/sh performance (*much*)
closer to statically-linked /bin/sh performance.

Cheers,
-- 
Jacques Vidrine   NTT/Verio SME      FreeBSD UNIX       Heimdal
nectar at celabo.org jvidrine at verio.net nectar at freebsd.org nectar at kth.se


More information about the freebsd-current mailing list