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

  • blackbrrd - Wednesday, June 7, 2006 - link

    Finally Intel can give AMD some real competition in the two socket server market. This shows why Dell only wanted to go with AMD for 4S and not 2S server systems...

    245w vs 374w and a huge performance lead over the previous Intel generation is a huge leap for Intel.

    It will be interesting to see how much these systems are going to cost:
    1) is the fb-dimm's gonna be expensive?
    2) is the cpu's gonna be expensive?
    3) is the motherboards gonna be expensive?

    For AMD neither the ram nor the motherboards are expensive, so I am curious how this goes..

    If anybody thinks I am an Intel fanboy, I have bought in this sequence: intel amd intel intel, and I would have gotten and amd instead of an intel for the last computer, except I wanted a laptop ;)
  • JarredWalton - Wednesday, June 7, 2006 - link

    For enterprise servers, price isn't usually a critical concern. You often buy what runs your company best, though of course there are plenty of corporations that basically say "Buy the fastest Dell" and leave it at that.

    FB-DIMMs should cost slightly more than registered DDR2, but not a huge difference. The CPUs should actually be pretty reasonably priced, at least for the standard models. (There will certainly be models with lots of L3 cache that will cost an arm and a leg, but that's a different target market.)

    Motherboards for 2S/4S are always pretty expensive - especially 4S. I would guess Intel's boards will be a bit more expensive than equivalent AMD boards on average, but nothing critical. (Note the "equivalent" - comparing boards with integrated SCSI and 16 DIMM slots to boards that have 6 DIMM slots is not fair, right?)

    Most companies will just get complete systems anyway, so the individual component costs are only a factor for small businesses that want to take the time to build and support their own hardware.
  • blackbrrd - Wednesday, June 7, 2006 - link

    Registered DDR2 is dirt cheap, so if FB-DIMMs are only slightly more expensive thats really good.

    About compareing 6 DIMM slot and 16 DIMM slot motherboards, I agree, you can't do it. The number of banks is also important, we have a motherboard at work with 8 ranks and 6 DIMM slots, so only two of the slots can be filled with the cheapest 2gb dual rank memory. Currently 2gb single ranks modules are 50% more expensive than dual rank modules.

    Which brings another question.. Does FB-DIMM have the same "problem" with rank limit in addition to slot limit? Or does the FB part take care of that?
  • BaronMatrix - Wednesday, June 7, 2006 - link

    why are we running servers with only 4GB RAM. I have that in my desktop. Not ot nitpick but I think you shuld load up 16GB and rerun the tests. If not this is a low end test, not HPC. I saw the last Apache comparison and it seems like the benchmark is different. Opteron was winning by 200-400% in those tests. What happened?
  • JohanAnandtech - Wednesday, June 7, 2006 - link

    Feel free to send me 12 GB of FBDIMMs. And it sure isn't a HPC test, it is a server test.

    "I saw the last Apache comparison and it seems like the benchmark is different. Opteron was winning by 200-400% in those tests. What happened? "

    A new Intel architecture called "Core" was introduced :-)
  • BaronMatrix - Wednesday, June 7, 2006 - link

    I didn't say the scores, I said the units in the benchmark. I'm not attacking you. It just stuck out in my head that the units didn't seem to be the same as the last test with Paxville. By saying HPC, I mean apps that use 16GB RAM, like Apache/Linux/Solaris. I'm not saying you purposely couldn't get 12 more GB of RAM but all things being equal 16GB would be a better config for both systems.

    I've been looking for that article but couldn't find it.
  • JohanAnandtech - Wednesday, June 7, 2006 - link

    No problem. Point is your feedback is rather unclear. AFAIK, I haven't tested with Paxville. Maybe you are referring to my T2000 review, where we used a different LAMP test, as I explained in this article. In this article the LAMP server has a lot more PHP and MySQL work.

    http://www.anandtech.com/IT/showdoc.aspx?i=2772&am...">http://www.anandtech.com/IT/showdoc.aspx?i=2772&am...
    See the first paragraph

    And the 4 GB was simply a matter of the fact that Woodcrest had 4 GB of FB DIMM.
  • JarredWalton - Wednesday, June 7, 2006 - link

    Most HPC usage models don't depend on massive amounts of RAM, but rather on data that can be broken down into massively parallel chunks. IBM's BlueGene for example only has 256MB (maybe 512MB?) of RAM per node. When I think of HPC, that's what comes to mind, not 4-way to 16-way servers.

    The amount of memory used in these benchmarks is reasonable, since more RAM only really matters if you have data sets that are too large to fit with the memory. Since our server data sets are (I believe) around 1-2GB, having more than 4GB of RAM won't help matters. Database servers are generally designed to having enough RAM to fit the vast majority of the database into memory, at least where possible.

    If we had 10-14GB databases, we would likely get lower results (more RAM = higher latency among other things), but the fundamental differences between platforms shouldn't change by more than 10%, and probably closer to 5%. Running larger databases with less memory would alter the benchmarks to the point where they would largely be stressing the I/O of the system - meaning the HDD array. Since HDDs are so much slower than RAM (even 15K SCSI models), enterprise servers try to keep as much of the regularly accessed data in memory as possible.

    As for the Paxville article, click on the "IT Computing" link at the top of the website. Paxville is the second article in that list (and it was also linked once or twice within this article). Or http://www.anandtech.com/IT/showdoc.aspx?i=2745">here's the direct link.
  • BaronMatrix - Wednesday, June 7, 2006 - link

    Thx for the link, but the test I was looking at was Apache and showed concurrency tests. At any rate, just don't think I was attacking you. I was curious as to the change in units I noticed.
  • MrKaz - Wednesday, June 7, 2006 - link

    How much will it cost?

    If Conroe XE 2.9Ghz is 1000$.
    Then I assume that this will cost more.

    I think looks good, but it will depends a lot of the final price.

    Also does that FBdimm have a premium price over the regular ones?

Log in

Don't have an account? Sign up now