Why is MySQL nearly twice as fast on Linux/AMD64 Vs. FreeBSD/AMD64?

John-Mark Gurney gurney_j at efn.org
Wed May 19 10:29:15 PDT 2004


JG wrote this message on Wed, May 19, 2004 at 06:07 -0700:
> At 04:53 PM 5/19/2004 +0400, you wrote:
> >In first time you built MySQL statically.
> >Now - dinamically.
> >
> >What results with statical linked MySQL ?
> >
> >JG wrote:
> 
> Those results are in earlier posts of this thread.
> 
> I compiled it dynamically to be sure that libpthreads was used.
> (so I could use ldd against mysqld)

There is a patch to make use of _SYSTEM scoped threads instead of
process scoped threads for mysql mentioned ealier..  Also, if you
use libmap to remap libpthread to libthr, you'll have similar
results...

libpthread (aka libkse) is a design for M:N threads, and requires
the user of pthreads to create new system scoped threads to make
use of multiple cpu's...

libthr is a design of 1:1 threads where each thread has it's own
process, and will automaticly use multiple cpu's w/o regard to the
scope of the thread that is set...

Also, when running the tests, make sure that you run vmstat -w 1 or
something similar, and make sure that the id drops to 20 or less...
If it doesn't, you're probably still using a single execution thread
for it...

-- 
  John-Mark Gurney				Voice: +1 415 225 5579

     "All that I will do, has been done, All that I have, has not."


More information about the freebsd-amd64 mailing list