Comparing MySQL Performance
An anonymous reader writes "With the introduction of the 2.6 Linux kernel, FreeBSD 5-STABLE, Solaris 10, and now NetBSD 2.0, you might be wondering which of them offers superior database performance.
These two articles will show you how to benchmark operating system performance using MySQL on these operating systems so you can find out for yourself if you're missing out. While this may not necessarily be indicative of overall system performance or overall database application performance, it will tell you specifically how well MySQL performs on your platform."
what about postgresql?
- Tuple calculus
- Transaction journaling
- Operator space/system call overhead
- Disk cache timings
And much more... in essence, you can't be certain these benchmarks hold true for the performance of all databases and it may even be a mute argument -- the same operating system may be tweaked differently if you're fileserving or mailserving or networkserving or if you're only dataserving. A useful tool, but one that must be run on each server.Try not. Do or do not, there is no try.
-- Dr. Spock, stardate 2822-3.
Slightly off topic, but if it's really performance you want, why don't people just use Postgres? It's had a much better feature set for years, and is starting to get enterprise level features. It seems like MySQL is somehow the default choice for open source projects, but as far as I can tell it offers no advantages and many disadvantages over postgres.
Is it just MySQL is slightly easier to setup?
AccountKiller
I might just be naive, but doesn't database performance depend a lot more on filesystem than OS?
There are 11 types of people in the world: those who can count in binary, and those who can't.
because everyone else does.
___
If you think big enough, you'll never have to do it.
Too bad he could not test on Mac OS X.
Of course in order to do that he would have to install the OSes on a PPC machine and I don't think freebsd on PPC is ready for prime time yet.
Get a free Mac Mini
Does anyone go: "OK, I need the OS for my mySQL project. I'll benchmark BSD, Linux, Windows, and choose the fastest OS."
Difference among OS should be pretty much unimportant unless one's an ISP or big enterprise. I would choose the OS based on completely different criteria:
1) Existing skillset (advantage to existing skills)
2) Existing deployed OS (advantage to OS already deployed)
3) My company's OS strategy (advantage to the OS and the CPU platform we chose to standardize on)
4) Existing software (if I already have X vendor's backup agent for mySQL on Linux or database tuning tools, I wouldn't use BSD just to (potentially) gain an extra 5% in some ludicrous benchmark result).
Today's hardware (and operating systems) are so cheap that it's almost irrelevant what OS and hardware goes into many a project.
Look at the new HP's 25p and 35p blades (Opteron-based) - a 2 processor 1GB RAM version is just some $1,700 more expensive than a 1 processor 512MB RAM version.
It's easy to lose that $1,700 in downtime, spend it on a Windows engineer's new RHCE or such...
Entirely right, and some user-space optimization could have gotten the final few percent in too. He installed stock BSDs and recompiled their kernels straight, didn't tweak any options that weren't necessary to run the suite, and compared to a Linux optimized from the ground up (Gentoo + his knowledge of Linux itself). Real clever benchmark.
That NetBSD performed worse than FreeBSD for disk IO is really strange. I have never seen this happen in any of the machines I've tried both on (hint: a lot), so either he has a very exotic disk controller which isn't supported properly (weird) or there's a disturbance in the force. Members of the mailing lists are talking it over with him now, and a follow-up should arrive eventually.
I would have liked to see results of FreeBSD 5-STABLE too, because he compared a refined Linux and a solid NetBSD to a FreeBSD release that was deemed not-ready-for-benching-let-alone-production on day 0, which gave it little chance. It's interesting to see if the claims 5.4 will be much better hold water.
Sam ty sig.
it's because NetBSD insist on N:M threading, and there's no sane way to do that (which is why the people behind NPTL gave up trying on Linux and just made threads so lightweight you could afford a few thousand running at once)
So NetBSD is really asking the user for a hint: How many _real_ threads should we use to emulate the threads you've asked for ?
Needless to say providing performance hints could always help a threading implementation, but as we saw here, it also means the administrator must painfully figure out which settings are optimal.
Somebody posts a comparison of an application running on different OS's as a system benchmark, and what do people do? Attack MySQL.
God guys get over it, MySQL is here and it has actually proven itself to be usefull. Yes its missing features and has issues, but it fills the niche it is aimed at.
(1) 9 GB SCSI-160 (7200 RPM)
Okay, this guy is not a database person. Now, the choice of database product to benchmark with might have been a dead giveaway, but so is the choice of configuration. If you're not going to test with a real database configuration (which the author of the article has probably never seen) why bother? Funny that he'd test on a machine with two CPUs and one drive, though. Great judgement in hardware selection.
Releasing the results against an old build of Solaris x86 a few days after the general release of Solaris 10 is pretty funny, too.
Compiling his own versions of the software without even looking at the patches the maintainers of the FreeBSD and OpenBSD ports of MySQL use was really good judgemenet. I mean, heck, they might know something about how to make that software perform properly on their platforms, and we wouldn't want that skewing the results! "After all, I'm testing the operating systems, not their pre-packaged MySQL distributions or source builds."
What... a... loser...
Now before I get modded down, I be to remind whoever might read this that what I am saying is FACT. - bogaboga
well, i've been having some interesting ODBC issues passing the same SQL queries to Access and to Oracle, so let's not pretend that the ANSI SQL compatible world is that compatible ...
-- Tigger warning: This post may contain tiggers! --
After reading the benchmarks, I noticed that the Linux distribution chosen was Gentoo. I like Gentoo (and use it myself). The author of the newsforge article does not really state if the all of the kernel, libraries and applications were built completely from scratch or did he use a stage 2 or 3 install.
If the box was built from source, I would expect that Linux benchmarks would be higher simply because the kernel, libraries, and applications were most likely tuned to the hardware. Otherwise, I would like to see RedHat, or SUSE, or other "out of the box" distros in addition to the others.
Just my $0.02
Coderz 4 Life