MySQL Results: Scaling

Back to our main subject, our astute readers have probably already noticed a weird anomaly. Let us analyze this further. If you look closely at both our measurements, Quad-core and Dual-core x86, you'll notice that the scaling is negative. To make it more clear, we made an average of all concurrency numbers from 5 and higher.

MySQL Linux (Queries/s)
Sun T1
4/8 cores 1 GHz
MSI K2-102A2M
Opteron 275
Xeon 5160
Woodcrest 3 GHz
MSI K2-102A2M
Opteron 280
Average Dual-core
(T1: quad-core)
362 749 996 805
Average Quad-core
(T1: octal-core)
433 590 904 622
Speedup Dual to Quad 20% -21% -9% -23%


This is nothing short of amazing. It seems like an anomaly, but this is not the case. These benchmarks have been checked, verified and checked again. They are accurate. The x86 cores running on Linux perform better with two cores than with four cores, but the T1 running Solaris actually improves performance going from 4 to 8 cores.

So who is guilty? Linux or the Opteron system? We had to test with Solaris on the Opteron to be sure. However, the Serverworks chipset of our MSI 1U server was not supported by x86 Solaris. So we went back to our homebuilt server, based on the MSI K8N Master2-FAR.

MySQL Solaris (Queries/s)
Sun T1 4/8 cores 1 GHz Opteron 280 Solaris Opteron 280 Linux
Average Dual-core
(T1: quad-core)
362 456 799
Average Quad-core
(T1: octal-core)
433 605 625
Speedup Dual to Quad 20% 33% -22%


And this puts the performance of our UltraSparc T1 in a whole different perspective. First of all, it is clear that while MySQL might not be the most scalable database, the current kernel of Linux is not helping matters. We did tweak the Linux kernel two ways: the 2.6.15 kernel was optimized for either Intel's or AMD's architecture and the AMD architecture also got NUMA support.

So what is going on here? After talking to our MySQL guru (P. Zaitsev), it turns out that in some circumstances, MySQL might cause trouble for the Linux mutex (mutual exclusion) implementation: "mutex ping-pong". The mutex implementation makes sure that two threads cannot access data in the main memory that is locked by another thread.

It seems however more a MySQL problem than a Linux one, as other databases like DB2 scale very well in Linux. For DB2 under the same load we noticed a performance increase of no less than 80-85% when going from two to four cores. Also, with some loads, the bad scaling kicks in later than our "Select dominated" load. Intel's performance labs told us that they also ran into the same problem.

These issues are not as severe as the problems we encountered with MySQL in Mac OSX. Note that Apple seems to have recognized the problem and seems to offer a workaround. We'll report back with other MySQL workloads to investigate the MySQL scaling problem further.

PostGreSQL Results

PostgreSQL 8.0.7, another open source database, uses processes and not threads to deal with connections. The consequence is that the benchmark numbers are a lot more stable: once each core is busy with it's process, you almost get maximum performance. In other words, the results didn't change much from 5, 10 or 25 concurrent users. To keep things simple, we only list the numbers with 20 users, which results in peak performance. The queries per second numbers at 5 and 25 were only a few percent lower. We did not include the T2000 Sun Server as the optimal PostGreSQL configuration is still under investigation.

PostgreSQL 8.0.7 (Queries/s)
DL385 1 x Opteron 280 517
Intel 2 x Xeon "Irwindale" 3.6 GHz 448
MSI 1U 1 x Opteron 275 490
MSI 1U 1 x Opteron 280 524
Intel 1 x Xeon 5160 WC 3 GHz 673


Another clear victory for Woodcrest. On the Opteron, every 10% in clockspeed increase seems to result in a 7% performance increase. So if we extrapolate, an Opteron 3 GHz would arrive at 616 queries per second.

MySQL Benchmarks Performance Analyses
Comments Locked

91 Comments

View All Comments

  • JohanAnandtech - Thursday, June 8, 2006 - link

    I should have mentioned this: most of the tests have also been done on SUSE linux SLES9. The reason why we use Gentoo is that we are able to use the latest kernel and to tune the kernel specifically for the AMD or Intel architecture.

    With SUSE Enterprise you need to wait for SUSE to use a new kernel. Your suggestion is noted, and from now on I will include the SUSE SLES numbers too.

    But to call our numbers useless, well that is a heavy exageration. There was about 1-2% difference between running on Gentoo than on SUSE. It is only natural: they both use more or less the same kernel, only the tools are different.
  • ashyanbhog - Thursday, June 8, 2006 - link

    "Two months of testing and tweaking"

    so thats the time you took to make sure you could say

    "In one word: Woodcrest rocks!"

    and suprisingly your emotions were quite tepid when AMD processors where showing similar performance advantages over Intel processors earlier!

    http://www.anandtech.com/IT/showdoc.aspx?i=2447&am...">http://www.anandtech.com/IT/showdoc.aspx?i=2447&am...
  • ashyanbhog - Thursday, June 8, 2006 - link

    What 1-2% difference b/w SLES and Gentoo are you talking about? Anand's own earlier benchmarks show SLES performance as 9-17% better than than Gentoo!

    http://www.anandtech.com/IT/showdoc.aspx?i=2447&am...">http://www.anandtech.com/IT/showdoc.aspx?i=2447&am...

    If you have specifically used Gentoo for the optimization options that it provides, why didn't you list the specific compile time optimizations for Intel and AMD that were finally used to run the benchmarks? The purpose of a independent benchmark is to ensure a setup that is neutral and verifiable by any third party using similar hardware and software. Does your review report provide the info necessary for the same?

    Your earlier benchmarks using Linux + DB2 show dual dual core opterons gaining 50% - 80% improvement over dual single core opteron when more than 5 threads come into picture, and a mere 1% to 2% gain in case of one or two threads. Okay, I know DB2 was not part of this benchmarks this around, but shoudn't these figures have setoff enough alarm bells to force inclusion of something other than MySQL for database benchmarks?

    Even MySQL on gentoo shows a modest 10% to 17% gain with concurrency numbers from 5 and higher in Sinle Core + Dual CPU vs Dual Core + Dual CPU. Strange that Linux and MySQL misbehave on Opteron this time and show a 10% performance degradation! You deserve a award for this! How can somebody contradict their own earlier benchmarks?

    http://www.anandtech.com/IT/showdoc.aspx?i=2447&am...">http://www.anandtech.com/IT/showdoc.aspx?i=2447&am...

    The MSI motherboard you used for the benchmarks has only a single channel to the memory bank for both the processors, a comprise made to cut its price and compete in the lowest market segment for 2P Opteron boards. A major design feature of the Opteron is its ability to use seperate memory channels for each procesor giving it NUMA capabilities, and dedicated memory lanes also cut lantencies when accessing the memory. Did you specifically choose this motherboard to negate opterons advantage? The Intel board used for "Irwindale" retails for around $500, the price for one used for woodcrest is not known, the MSI board is available for $250, so even the price range is different! "relatively cheap workstation board" as you noted in your earlier benchmarks. Were Tyan K8WE, ASUS K8N-DL, Supermicro H8DCi or the Iwill DK8EW that are more popular, so hard to come by? Also you dont specify which of the three opteron systems was used for which benchmark, or was it a average of three. The extreme attention to details usually found at Anand is suprisingly lacking for this review

    http://www.ocforums.com/showthread.php?t=459111">http://www.ocforums.com/showthread.php?t=459111

    http://forums.amd.com/lofiversion/index.php/t56855...">http://forums.amd.com/lofiversion/index.php/t56855...

    http://geek.pricegrabber.com/search_getprod.php/ma...">http://geek.pricegrabber.com/search_getprod.php/ma...

    http://geek.pricegrabber.com/search_getprod.php/ma...">http://geek.pricegrabber.com/search_get...php/mast...

    Arent temprature readings also important, specially for a new xeon chip, as earlier ones had forced admins to double their AC capacities and discard covers of rack cabinets for better cooling.

    Its good to know Intel is back on track, but this review seems to have only one purpose - Show woodcrest in favorable light against opterons.
  • rayl - Wednesday, June 7, 2006 - link

    It doesn't take a server to compute that "Woodcrest rocks" = 2 words. :p
  • merlinm - Wednesday, June 7, 2006 - link

    where are the postgresql quad core benchmarks? My experience is that 2-4 cores on postgresql gives you 1.7x the power on non i/o constrained databases. This would have been a huge upset to have PostgreSQL blow out mysql in a quad core configuration.

    also a postgresql.conf containing non-default values would have been nice.
  • blackbrrd - Wednesday, June 7, 2006 - link

    Where does it say they are using the default postgresql.conf? Actually I can't find any information on what kind of tweaking that has been done here at all?

    Is there any special reason for only running postgresql on a single cpu instead of a dual dual core setup like you did for the rest of the tests? There are no commends about it on http://www.anandtech.com/IT/showdoc.aspx?i=2772&am...">page 9 atleast...
  • merlinm - Wednesday, June 7, 2006 - link

    right...what I meant was, could you please supply .conf entries which where edited and changed from the stock configuration. Actually, for this type of benchmark (90% read), there's not a whole lot to change in postgresql.conf...generally the more writes there are the more you have to tweak.

    the major tweak in postgresql is to use prepared statements over the parameterized interface...
  • merlinm - Wednesday, June 7, 2006 - link

    oh, and postgresql 8.1 is about 20+% faster than 8.0 in most read operations involving very small (one statement) transactions.
  • squash - Wednesday, June 7, 2006 - link

    Hello,

    With the recent "official" support in Ubuntu for that Niagra server, would it be possible to also include performance numbers for that server running Linux?

    I have seen other benchmarks showing Linux to have improved performance on the same hardware compared to Solaris. Filesystem performance is typically much higher in ext2 vs ufs+logging, and if you scan Sun's issue tracking database, there are many entries for libc and kernel operations which are much slower than Linux.

    Maybe as a seperate article....

    Squash
  • OddTSi - Wednesday, June 7, 2006 - link

    The Verify/s graph (the last one on the page) doesn't have a line for the Dual Opteron yet the author still claims "Again, the Opteron takes the lead." Does the Dual Opteron take the lead and there was just an error in showing up on the graph?

    Also in the signs/s chart the Dual Woodcrest tops out at just over 6,000 and the Dual Opteron tops out at just over 5,000, which is a 20% lead, yet the author writes "The Opteron at 2.4 GHz has no trouble keeping up with the 3 GHz Woodcrest." I'm not trying to be a nitpicky fanboy here but being beaten by 20% isn't "keeping up," at least not in my defition of the expression.

    Finally, I have a question. Why are there no Windows-based tests? I know that LAMP is very popular in the webserving part of the server world but in most other server/enterprise areas it's mostly Windows, SQL Server, Visual Studio, .NET, etc. I'd like to see some benchmarks that use software that those of us in the non-webserving community are most likely to use. I know there's no chance of running the UltraSPARC in a Windows configuration but quite frankly who cares. I would like to see which of the x86 offerings (which is FAR more likely to be used) is better.

Log in

Don't have an account? Sign up now