Linux Database Server CPU Comparisonby Johan De Gelas on June 17, 2005 12:05 AM EST
- Posted in
- IT Computing
Benchmarks MySQL 4.0.18: Intel versus AMD
A Linux database server report would not be complete without the open source database MySQL. Many of our readers requested that we test with both MyISAM (default storage engine in MySQL 3.x) and InnoDB (default storage engine in MySQL 4.x), so we performed many more tests than last time.
It must be said that the MySQL results had a large margin of error (3% - 4%) compared to DB2, especially at high levels of concurrency.
Here is our MySQL configuration:
socket = /var/lib/mysql/mysql.sock
set-variable = max_user_connections= 2000
set-variable = max_connections= 2000
read_rnd_buffer = 64M
The " query cache" was off, as we wanted to test worst case performance. In some cases, the query cache was able to push a single Xeon to 1000 queries per second, and the CPU was still capable of doing more, as the CPU load was at 50% - 70%. At 1000 queries/s and more, other bottlenecks started to kick in, such as the latency of the network driver, the operating system and so on.
All numbers are expressed in queries per second. All concurrency tests below 5 are not reliable enough to make any firm conclusion as the margin of error is much higher.
|Concurrency|| Dual Xeon (Gallatin)
with L3 cache
| Single Xeon (Gallatin)
with L3 cache
| Dual Xeon (Nocona)
| Single Xeon (Nocona)
| Dual Xeon (Irwindale)
3.6GHz with HT
| Dual Core Intel
| Dual Opteron 250
| Single Opteron 250
| Single Opteron 252
Those were the raw numbers. Let us now analyse this...
|Concurrency||Dual versus Single Xeon Galatin||Dual versus Single Xeon Nocona/ Irwindale||Dual Opteron 250 vs Single|
MySQL ISAM is an incredibly fast database engine in our benchmark situation: it handles the same workload about twice as fast as DB2. I have to emphasize "our benchmark situation" because we cannot forget that our workload is mainly about reading the database and not writing. And of course, it must be said that the MySQL ISAM engine does less work on each query than DB2; it does not support transaction-safe (ACID compliant) commit, rollback, and crash recovery capabilities.
MySQL, as we have also noticed 6 months ago, doesn't seem to scale as well as DB2. At best, you get a 40% - 45% performance increase when the concurrency level is high enough. When we move to quad CPUs, we only get a 20% - 30% increase while DB2 still offers a 70% increase. The better scaling of DB2 means that with enough CPUs, it runs almost as fast as the MySQL ISAM engine, and offers all the transaction-safe capabilities as a bonus.
Let us check if the architectural differences between the CPUs make a difference . Again, don't pay too much attention to the results of the lower concurrency levels.
|Concurrency||Dual Xeon Irwindale versus Nocona (3,6 GHz)||Xeon Nocona (3,6 GHz) vs Galatin (3,06)||Opteron 2.6 vs Nocona 3.6||Opteron 2.6 vs Pentium-D||Xeon Nocona 3,6 GHz vs Pentium-D|
The bigger L2-cache of the Xeon Irwindale did nothing more than compensate for the slightly higher latency of the L2-cache. The Xeon Irwindale and Nocona perform alike.
MySQL, unless you get the special Intel Compiler optimized version, remains the stronghold of the Opteron. The fastest (single core) Opteron outperforms the best Intel CPU by a 35% margin. We didn't use the Intel compiler version as we have reason to believe that this version is not used a lot in the real world. We might try it out in a future article.
The relatively limited scaling also means that high clocked single CPUs can be an interesting option. This is illustrated by the Opteron 252 2.6 GHz, which outperforms the dual core Pentium-D 3.2 GHz by a small margin.