40% slowdown with dynamic /bin/sh

Garance A Drosihn drosih at rpi.edu
Mon Nov 24 16:43:31 PST 2003

At 3:15 PM -0500 11/24/03, Andrew Gallatin wrote:
>Here is a simple test which times the execution of a null
>shell script.  It basically times fork/exec of the chosen

>So.. forking a dynamic sh is roughly 40% more expensive
>than forking a static copy of sh.  This is embarrassing.

To be more precise: shell scripts which do-nothing will
be 40% more expensive than they used to be.  It is not
like the entire operating system will get 40% slower.

>I propose that we at least make /bin/sh static.

I suggest that we leave all of /bin and /sbin as it is for
5.2-release.  We are still telling users that 5.2 is a
snapshot of "-current", and it is more valuable to have a
wider range of experience with this worst-case scenario.
("worst-case" == all files dynamically linked).

We certainly may want to make changes to address the
performance issues that you note, but there is no reason
we must decide *which* change should be made right now.

Garance Alistair Drosehn            =   gad at gilead.netel.rpi.edu
Senior Systems Programmer           or  gad at freebsd.org
Rensselaer Polytechnic Institute    or  drosih at rpi.edu

More information about the freebsd-current mailing list