Why is MySQL nearly twice as fast on Linux?

JG amd64list at jpgsworld.com
Sun May 23 09:03:33 PDT 2004


>
> > Tell me all the FreeBSD tests you want to see & I'll do them if I can.
>
>I think the tests you ran are fine, but just run them with
>the same version of the OS and mysql.  Try to use -current
>if possible, there were a couple of bugs in libpthread (libkse
>as it was installed in 5.2-release) that affected its mysql
>performance.


MOST HAVE BEEN ON THE SAME VERSION OF MYSQL

MOST HAVE BEEN USING FREEBSD-CURRENT.

MOST HAVE BEEN ON THE SAME OS.

There are about 20 different benchmark results out there that
I have posted - with more on the way.

Find the ones you want to compare and compare them.

You'll see that with using even bleeding edge development
code, as well as standard production code, with all the my.cnf
tweaks you can muster -- that LINUX out of the box will beat
it down without any tweaking.

You'll also see that MULTI CPU FreeBSD systems don't do
much better, and in some cases do WORSE than single CPU's
when it comes to MySQL.


>Another thing to try is to change the my-huge.cnf settings
>one by one and see how they affect FreeBSD local performance.

No.

Everyone here wants to say "But you're comparing apples to oranges!"
and now you're telling me to do just that.

The Linux install uses default MySQL configuration settings.

If you want me to start tweaking with the my.cnf, I'll have to do it on the
linux machine as well, and then of course the performance gap between
the OS's will be even worse.

Why don't we compare apples to apples and use stock my.cnf settings
for both?

Anyway regarding various FreeBSD tweaking attempts....

Here is Chris Elsworth's recent post from the  MySQL-General list:
---------------------------------------------------------------------------------
"Since I'm a numbers freak, I've been running super-smack on it for the
last few days to see how it stacks up.

Tweaking various configs and kernel options, on any OS, obviously wins
a few hundred/thousand queries per second, but I'm really quite
surprised at one major difference.

Optimisations and tweaking aside, FreeBSD 5.2.1-p6 on this hardware
did well to achieve 17,000 queries per second, using super-smack's
select-key.smack with the query cache turned on. Nothing I could do,
and I spent days trying, got it much higher.

Once I wiped this and tried Linux (both gentoo, with their
patched-to-the-hilt 2.6.5 kernel, and Debian, with a stock 2.6.6 which
had just been released by the time I installed) this figure jumped to
35,000 queries per second.

Is FreeBSD really this crap for MySQL? I was quite horrified. FreeBSD
5 has a number of threading libraries, and I tried them all.
LinuxThreads won (slightly, there wasn't much in it). I'm very much a
FreeBSD fan and I'd quite like to keep FreeBSD on this machine before
it goes live, but the performance pales in comparison to Linux.

I had to do absolutely no tweaking to achieve 35,000 queries/sec in
Linux.

Has anyone else observed similar behaviour? Does anyone else have
similar hardware with FreeBSD on? Have you fared any better?"
---------------------------------------------------------------------------------




More information about the freebsd-threads mailing list