MySQL 5.5.17 "Percona Server"

Many readers asked us why we only tested MySQL in a virtualized environment and not on "native" Linux. Indeed, it has been years since we tested MySQL "natively". The reason is simple: MySQL 5.1 and earlier versions scaled pretty badly beyond 4-8 cores, so there is no incentive to run them on modern dual socket servers. However, starting in December 2010, MySQL 5.5 has been available and it should feature much improved scalability. Even better, the people at Percona released their version of MySQL and the Innodb Storage Engine, Percona Server with XtraDB. This MySQL/Innodb combination is engineered for even better scalability.

To test this, we installed Percona Server 5.5.17-55 (Release 22.1, November 2011) on top of a Ubuntu 11.10 x86-64 linux with the 3.0.0-14 kernel. This kernel was the latest stable version at the time and is "Bulldozer/Interlagos aware".

We migrated the "Nieuws.be" database to MySQL to have a test similar to our SQL server test. That migration is not perfect as not all stored procedures were successfully converted, so you should not use the benchmark results below to compare SQL Server and MySQL. However, the profile of the test is the same: it is 99% complex selects that scan large parts of the database. The database is several tens of gigabytes instead of one.

MySQL Sysbench

The results are abysmal for the latest Interlagos Opteron. The best Xeon score is 84% better than the best Opteron score. The results indicate what went wrong: the 8 thread Opteron 6220 at 3GHz scores better than the 16 thread Opteron 6276 at 2.3GHz. A clockspeed advantage of 30% has prevailed over twice as many threads. So we can suspect that the scaling problems are not gone, at least in this test.

Let us take a closer look by performing the same test on a different number of threads and cores. The BIOS of the SuperMicro H8DGU-F allowed us to disable the second integer unit or one or more modules of the new Opterons. (Disabling both at the same time was not possible.) The Asus Z8PS-D12-1U was more flexible: we could disable Hyper-Threading and/or several cores of the Xeon. Here are the scaling results.

MySQL

First, we focus on the results with few cores and threads. Two Bulldozer Modules are capable of slightly outperforming four cores of the Opteron Magny-Cours. The ideas behind Bulldozer are sound: two modules are smaller (157 mm²) and more power efficient than four K10 cores (231 mm²). At the same time they perform equal to the Xeon X5650—which is clocked higher—with the same amount of threads. At eight threads this is still the case, and the gap between the newer and older Opteron widens in favor of the former.

Beyond eight threads, the new Opteron starts to scale badly. Doubling the number of modules to eight delivers a very small 5% performance advantage. Double the number of modules again and you end up with negative scaling. To make matters worse, the Xeon doesn't have this problem. From eight to 16 threads we get a 76% performance boost. The end result is that a quad-core Xeon beats the best Opteron by a large margin. Let us investigate the matter further.

MS SQL Server 2008 Power Analysis MySQL OLAP Analyzed
Comments Locked

46 Comments

View All Comments

  • sonofgodfrey - Thursday, February 9, 2012 - link

    Have you explicitly tested one socket vs. two sockets? We've found an immense increase in contention once a cache-line has to be shared between sockets on some systems.
  • JohanAnandtech - Friday, February 10, 2012 - link

    That is one suggestion I will try out next week. Thanks!
  • Klimax - Thursday, February 9, 2012 - link

    Hello.

    Nice tests.

    However I would like to see MySQL tested on Windows Server 2008 R2
    Would be interesting comparsion.

    (Especially due to http://channel9.msdn.com/shows/Going+Deep/Arun-Kis... )
  • Klimax - Thursday, February 9, 2012 - link

    Title of post is wrong... (I have deleted second thing and forgot to fix title)
  • Scali - Thursday, February 9, 2012 - link

    Unless I'm mistaken, the Xeon 5650 is a 1.17B transistor chip, where the Interlagos 6276 is a 2.4B transistor chip.
    In that light, doesn't that make Intel's SMT implementation a lot better than CMT?
    I mean, yes CMT may give more of a performance boost when you increase the threadcount. But considering the fact that AMD spends more than twice the number of transistors on the chip... well, that's pretty obvious.
    AMD might as well just have used conventional cores.
    The true strength of SMT is not so much that it improves performance in multithreaded scenarios, but that it does so at virtually no extra cost in terms of transistors (and with little or no impact on the single-threaded performance either).
  • JohanAnandtech - Friday, February 10, 2012 - link

    Interlagos is 1.2 billion chip (maybe 1.3 but anyway). Most of those transistors are spend on the L3 cache: about 0.5 billion. Only 213 million transistors are in a module and each module contains a 2 MB L2-cache, probably good for 120 million transistors. That leaves 90 million transistors to the core, and it has been stated that the second cluster added 12%. So that second cluster costs about 12 million transistors, or 48 million on the total 4 module die. That is less than 5% of the total transistor count but you get a 30-90% performance boost!

    So for AMD, this was clearly a great choice.

    SMT is perfect for Intel, as the Intel architecture puts all instructions in one big ROB.

    For very low IPC serverworkloads, I think the CMT approach gives better results. Unfortunately AMD lowered some of the CMT benefits by keeping the datacache so small and the low associativity of the Icache.
  • Scali - Friday, February 10, 2012 - link

    Uhhh, I think you're wrong here... the 4-module Bulldozer is a 1.2B chip (Zambezi). But you tested the 8-module Interlagos (16 threads), which is TWO Zambezi dies in one package.
    Hence 2*1.2 = 2.4B transistors.
  • JohanAnandtech - Friday, February 10, 2012 - link

    Ok, it is two chips of 1.2 billion. That doesn't change anything about our analyses of CMT.
  • Scali - Friday, February 10, 2012 - link

    Not in the article, because you did not factor in transistor count (which is the flaw I tried to point out in the first place... comparing two chips, where once is twice the transistor count of the other, is quite the apples-to-oranges comparison. One would expect a chip with twice the transistorcount to be considerably better in multithreading scenarios, not 'catching up' to the smaller chip).

    But in your above post, I think it changes everything about your analysis. All your figures have to be done times two.
    Which makes it a very poor comparison, not only to Intel, but also to AMD's own previous line of CPUs.
    The 6174 Magny Cours is actually beating Interlagos, with 'only' 12 threads, no kind of CMT/SMT, and 'only' 1.8B transistors.

    How does that make CMT look like a great choice for AMD?
  • slycer.tech - Friday, February 10, 2012 - link

    What i read on benchmark configuration page, Anand used 2x Intel Xeon X5650. So 2x 1.17B = 2.34B. I think it is comparable to AMD CPU used in this test. Am I right?

Log in

Don't have an account? Sign up now