[debian-mysql] Bug#508406: Intend to create an -fPIC library package...

Wouter Verhelst wouter at debian.org
Tue Jul 21 14:52:52 UTC 2009


On Tue, Jul 21, 2009 at 09:17:28AM -0500, Peter Samuelson wrote:
> 
> [Wouter Verhelst]
> > Whether we should recommend using static libraries is another matter
> > entirely; indeed performance does go down a teeny weeny bit when using
> > shared libraries, but the difference shouldn't be *that* large; if it
> > is, that probably means they're using a twisty maze of function calls,
> > all alike, that they probably shouldn't be doing.
> 
> As I understand it, the performance drawbacks of a shared library are:
> 
> 1) The PIC code and its use of a GOT.  Given that we're talking about a
>    PIC static library, this is not relevant.

The argument was that a shared library is 'too slow'. Reading the
discussion thread that Christian pointed to, it appears that Monty
doesn't actually know what he's talking about, but read on some random
IBM website that shared libraries are slower. Well, yes they are, but
not by much, and the pain static libraries introduce outweighs that by
much.

Note also that shared libraries are only slower on x86 hardware due to
the fact that they don't natively do PC-relative addressing, which needs
to be emulated; x86_64 has dealt with this, and most other architecture
(including m68k, for those following along at home) properly support it.

> 2) Runtime linking.  This is overhead at application startup time.
>    Something that embeds an SQL engine should not, I think, start up too
>    frequently.  Am I wrong?

Frankly, I'd hope not.

> So what is the real performance advantage of this -fPIC static library?
> To me it looks like a different, less desirable, way to implement the
> 'prelink' optimization.

Looks like it, indeed.

-- 
The biometric identification system at the gates of the CIA headquarters
works because there's a guard with a large gun making sure no one is
trying to fool the system.
  http://www.schneier.com/blog/archives/2009/01/biometrics.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/attachments/20090721/aef13397/attachment.pgp>


More information about the pkg-mysql-maint mailing list