Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 May 2004 13:59:18 -0700
From:      Peter Wemm <peter@wemm.org>
To:        freebsd-amd64@freebsd.org
Subject:   Re: Why is MySQL nearly twice as fast on Linux/AMD64 Vs. FreeBSD/AMD64?
Message-ID:  <200405181359.18291.peter@wemm.org>
In-Reply-To: <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com>
References:  <5.2.0.9.2.20040518103357.04c6cbb8@mail.ojoink.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 18 May 2004 10:36 am, JG wrote:

> MySQL Statically compiled with libc_r
                                                             ^^^^^
That's your killer.  You're using the the single-process polling loop 
based threads and comparing it to linux's parallel process based 
threads.  The moment one thread blocks on disk IO, everything stops.

You want -lpthread instead, but this isn't going to be happy on 
5.2.1-RELEASE.  I've fixed a lot of bugs in 5-current that would mean 
the difference between it working versus crashing.

Also, there are patches to change MySQL to use PTHREAD_SCOPE_PROCESS 
threads with -lpthread.  This works out a little better on benchmarks 
since it can make better use of the ligher weight context switches.

-- 
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?200405181359.18291.peter>