Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 05 Dec 2004 10:44:15 -0700
From:      Scott Long <scottl@freebsd.org>
To:        Dimitry Andric <dimitry@andric.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: FreeBSD mysql and threading
Message-ID:  <41B348EF.8000903@freebsd.org>
In-Reply-To: <587369907.20041205175744@andric.com>
References:  <64353.192.168.0.200.1102263448.squirrel@192.168.0.200> <587369907.20041205175744@andric.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Dimitry Andric wrote:
> On 2004-12-05 at 17:17:28 alex bustamante wrote:
> 
> 
>>Read somewhere that FreeBSD has some problems with threading and mysql.
>>Has this been fixed in 5.x?
> 
> 
> Somewhere, some problems might sometimes be fixed, so maybe this could
> be the case.  Unless someone gives exact specifications, someone can
> never expect to get exact answers, don't you think? :)

I did some extensive tests with mysql over the late summer to
investigate domain socket performance and test scheduler bugs.  I also
wound up testing threading performance as a consequence.  The result was
that compiling mysqld with the default threading options yields fairly
good results and I could run large stress tests for quite a while
without problems.  The good news is that default option of using KSE
(i.e. libpthread) system scope threads performs about as well as
Linuxthreads, on an SMP system.  Compiling it for KSE process scope
threads should have yielded even better performance, but would up being
barely half.  This could well be due to scheduling bugs since the
results were similar to what I got from using libc_r.

The only stability issues I encountered were from using SCHED_ULE and
PREEMPTION (both together and separately).  I haven't run the tests in
quite a while, so I can't say whether 6-CURRENT behaves any better now
with those options.

As for comparing performance to Linux, it's a lot closer now that it was
in 5.2, but it hasn't quite caught up yet.  There is speculation that
Linux might be cheating with filesystem sync operations on the data
files and thus avoiding a significant amount of overhead at the cost of
safety, but I haven't had a chance to verify this.  But I was still able
to get 11,000-12,000 local queries per second on a reasonable SMP
system, and that's pretty decent.

Scott



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