Unfortunate dynamic linking for everything

Don Lewis truckman at FreeBSD.org
Tue Nov 18 21:50:51 PST 2003

On 18 Nov, Garance A Drosihn wrote:
> At 8:07 AM -0500 11/18/03, dyson at iquest.net wrote:
>>	If there hadn't been a noticed increase in cost by using
>>	all-shared-libs, then the measurements were done
>>	incorrectly.  If the decision is made based upon allowing
>>	for 1.5X (at least) times increase in fork/exec times, and
>>	larger memory usage (due to sparse allocations), ...
> I do remember some comments about benchmarks, and it was
> true that the all-dynamic bin/sbin does come out slower.  I
> don't remember if the benchmarks were ours or from NetBSD's
> investigation.  However, I think we measured increase in
> overall time for some set of commands, instead of "increase
> in the fork() routine".  Thus, the penalty observed was much
> less than 50%.  I think it was under 2%, but I don't remember
> the exact number.  When we're dealing with a 100% increase
> in the cost of compiling something with the newer gcc, the
> increase due to this change seemed pretty insignificant...

I thought there were some NetBSD benchmark numbers posted, but after
digging through my mail archives, I now think the results that I'm
remembering were posted by Gordon and were run with rcNG, which is
somewhat more shell intensive than our previous rc system:

On  2 Jun, Gordon Tetlow wrote:
> I'm planning on making a dynamically-linked root partition by 5.2. To
> that end, I'm planning on doing to the following:
> Integrate Tim Kientzle's /rescue patches into the tree
> Create /lib and populate with all the libs needed to support dynamically
>   linked binaries in /bin and /sbin
> Have a big (probably NO_DYNAMIC_ROOT) knob to switch from static to
>   dynamic.
> There will be a performance hit associated with this. I did a quick
> measurement at boot and my boot time (from invocation of /etc/rc to
> the login prompt) went from 12 seconds with a static root to 15
> seconds with a dynamic root. I have yet to perform a worldstone on
> it.

I was thinking the difference was smaller than that.

More information about the freebsd-current mailing list