List:Internals« Previous MessageNext Message »
From:Michael Widenius Date:September 24 2008 5:32pm
Subject:Re: why isn't libmysqld dynamically linked, was Re: why isn't mysqle
a shared library?
View as plain text  
Hi!

>>>>> "Ian" == Ian Monroe <ian@stripped> writes:

<cut>

>> After this also if you have any issues let me know. Because my shared
>> embedded library is working for me. But I have another issue. The
>> performance of
>> shared embedded library is poor than regular mysql and I am working on how
>> can I improve the performance of shared embedded library.

Ian> What do you mean by this? There is a difference in performance between
Ian> mysql embedded as a static library and mysql embedded as a shared
Ian> library? I find that hard to believe.

Last time I tested (agree it was some years ago), static code is in
some case notable faster than dynamic linked code.  After all in
dynamic code many memory references are indirect instead of direct and
you don't get that for free.

To quote from IBM's system information center:

"From a performance viewpoint, there is "glue code" that is required
in the executable program to access the shared segment. There is a
performance cost in references to shared library routines of about
eight machine cycles per reference. Programs that use shared libraries
are usually slower than those that use statically-linked libraries."

Here is a reference to the above article:

http://publib.boulder.ibm.com/infocenter/systems/index.jsp?topic=/com.ibm.aix.prftungd/doc/prftungd/when_dyn_linking_static_linking.htm

Regards,
Monty
Thread
why isn't libmysqld dynamically linked, was Re: why isn't mysqle a shared library?Ian Monroe23 Sep
  • why isn't libmysqld dynamically linked, was Re: why isn't mysqle ashared library?Michael Widenius24 Sep
  • Re: why isn't libmysqld dynamically linked, was Re: why isn't mysqle a shared library?Ian Monroe2 Oct
Re: why isn't libmysqld dynamically linked, was Re: why isn't mysqle a shared library?Ian Monroe24 Sep
  • Re: why isn't libmysqld dynamically linked, was Re: why isn't mysqlea shared library?Michael Widenius24 Sep
    • Re: why isn't libmysqld dynamically linked,was Re: why isn't mysqle a shared library?Antony T Curtis27 Sep
      • Re: why isn't libmysqld dynamically linked, was Re: why isn't mysqle a shared library?Ian Monroe27 Sep
        • Re: why isn't libmysqld dynamically linked, was Re: why isn't mysqlea shared library?Michael Widenius29 Sep
          • Re: why isn't libmysqld dynamically linked, was Re: why isn't mysqle a shared library?Ian Monroe29 Sep
            • Re: why isn't libmysqld dynamically linked, was Re: why isn't mysqlea shared library?Michael Widenius29 Sep
          • Re: why isn't libmysqld dynamically linked, was Re: why isn't mysqlea shared library?Shawn Green30 Sep
            • Re: why isn't libmysqld dynamically linked, was Re: why isn't mysqle a shared library?Ian Monroe30 Sep
      • Re: why isn't libmysqld dynamically linked,was Re: why isn't mysqle a shared library?Stewart Smith3 Oct
Re: why isn't libmysqld dynamically linked,was Re: why isn't mysqle a shared library?Antony Curtis2 Oct