Subject: Re: shared library support
To: Robert Elz <kre@munnari.OZ.AU>
From: None <jiho@postal.c-zone.net>
List: tech-kern
Date: 03/17/1998 18:16:34
On 17-Mar-98 Robert Elz wrote:

>> The Linux user reported on one of their news groups that with a large Motif
>> client under X, he was able to start more instances statically linked than
>> with
>> shared libraries.  He pointed out that with HP-UX the reverse was true, and
>> indeed, when things are working properly it always should be so.
>
> That's not what I would necessarily expect.   I'd normally expect there to
> be some overhead from using shared libraries, as compared to static 
> applications, so if the test is to run lots of the same application (in which
> the text is shared anyway, and hence so are the libraries) I'd expect more
> concurrent copies to fit than running the same application, shared, many
> times (which contains exactly the same code and data, but more overhead).
>
> To do a real test of shared libraries, and see if you win (aside from the
> convenience of being able to upgrade the library independantly of all the
> applications) you need to run large numbers of different applications, which
> share the libraries, not the same application over and over again.
>
> kre

I've heard that argument before, and it begs the question.

Of course there is overhead in ONE INSTANCE using shared versus static. 
But if the code pages are shared, that overhead DISAPPEARS across multiple
instances.  If the code pages are not shared, you have the same overhead as
when running only one instance, multiplied by the number of instances.

You should at most be talking about a few pages if they are shared, and the
difference observed was far greater than that.  Besides, he gave HP-UX as an
example where more shared instances fit than static, for the same program.

Please finish reading my previous post, wherein I present my own test and
its results.



--Jim Howard  <jiho@mail.c-zone.net>
 

----------------------------------
E-Mail: jiho@mail.c-zone.net
Date: 17-Mar-98
Time: 18:16:34

This message was sent by XFMail
----------------------------------