Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 22 May 2004 00:05:31 -0400 (EDT)
From:      Daniel Eischen <eischen@vigrid.com>
To:        JG <amd64list@jpgsworld.com>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: Why is MySQL nearly twice as fast on Linux? 
Message-ID:  <Pine.GSO.4.10.10405212355001.18976-100000@pcnet5.pcnet.com>
In-Reply-To: <5.2.0.9.2.20040521154458.01627688@127.0.0.1>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 21 May 2004, JG wrote:

> 
> We have a rather long discussion brewing over at the freebsd-amd64 mailing 
> list:
> 
> Subj: 
> <http://lists.freebsd.org/pipermail/freebsd-amd64/2004-May/001272.html>Why 
> is MySQL nearly twice as fast on Linux/AMD64 Vs. FreeBSD/AMD64?
> 
> @ http://lists.freebsd.org/pipermail/freebsd-amd64/2004-May/thread.html
> 
> 
> Chris Elsworth also just posted a similar message on the MySQL general 
> users list:
> http://lists.mysql.com/mysql/165908
> 
> 
> 
> I have been benchmarking many different configurations for several days now,
> and MySQL under Linux consistently SIGNIFICANTLY outperforms FreeBSD on the 
> same hardware.
> Most of the time handling twice as many queries or more.

We are more concerned about correctness right now than speed.
There are some optimizations that can be made WRT low-level
locking (for instance using cmpxchg when possible).  The
kernel also still has some more work WRT locking.

Also, the default kernel configuration with WITNESS and
INVARIANTS adds overhead.

Yet another also, MySQL uses scope system threads by default
instead of scope process threads.  Scope process threads seem
to perform better.

  http://people.freebsd.org/~deischen/mysql40-server.diffs

You can also build mysql with LinuxThreads under FreeBSD
and see if it performs any better.  If it is comparable,
that would tend to point to the kernel as the limiting
factor.

-- 
Dan Eischen



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.10.10405212355001.18976-100000>