Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 May 2004 12:11:25 -0700
From:      Peter Wemm <peter@wemm.org>
To:        freebsd-amd64@freebsd.org, John-Mark Gurney <gurney_j@efn.org>
Subject:   Re: Why is MySQL nearly twice as fast on Linux/AMD64 Vs. FreeBSD/AMD64?
Message-ID:  <200405191211.25786.peter@wemm.org>
In-Reply-To: <20040519172913.GU601@funkthat.com>
References:  <5.2.0.9.2.20040519052743.04365f78@mail.ojoink.com> <5.2.0.9.2.20040519060611.0435f750@mail.ojoink.com> <20040519172913.GU601@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday 19 May 2004 10:29 am, John-Mark Gurney wrote:
> 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...

Actually, the patch was the other way around.  mysqld was running into 
limits of system scope threads, so the port has patches to turn it into 
process scope.  It might be worth deleting the file from the port and 
rebuilding, just to see what happens.  However....

> 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...

Not quite.  The default N in the M:N case for libpthread 'ncpu'.  
pthread_getconcurrency()/pthread_setconcurrency() can check and change 
this.  Of course, this is fine in theory - libpthread *should* be 
scheduling threads on all cpus at once.  But the numbers earlier in the 
email thread suggest otherwise.  So much for theory...

BTW:   your suggestion to try libthr isn't really helpful here.
peter@daintree[12:01pm]~lib/libpthread/thread-255> ls /usr/lib/libthr*
ls: No match.

Somebody mentioned MD patches for libthr at one point, but I haven't 
seen them.

-- 
Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com
"All of this is for nothing if we don't go to the stars" - JMS/B5



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405191211.25786.peter>