Archive 1997–2024

Quad Core Intel Xeon 53xx Clovertown

MySQL Configuration

To avoid the scaling problems of MySQL, we compiled version 5.0.26 with Peter Zaitsev's Mutex patch. This Patch gives much better scaling and performance using up to four cores. Eight cores and more give variable results. All testing was done with InnoDB as our storage engine in MySQL 5.0.26. Here is our MySQL configuration:

MySQL Configuration
default-storage-engine InnoDB
skip-external-locking  
skip-locking  
key_buffer 256M
.
table_cache 64
max_allowed_packet 1M
thread_stack 128K
.
sort_buffer_size 2M
read_buffer_size 2M
innodb_buffer_pool_size 1G
.
thread_concurrency 16
innodb_thread_concurrency 16
innodb_additional_mem_pool_size 8MB
read_rnd_buffer_size 8MB
thread_cache 64
max_heap_table 256MB
tmp_table 128MB
.
innodb_log_file_size 250MB
innodb_table_locks 0
innodb_flush_log_at_trx_commit 0
max_user_connections 2000
max_connections 2000

The "query cache" was off, as we wanted to test worst case performance. Our test database is still the same ~1GB database. The workload consists of more than 90% selects, mostly a "read intensive" workload.

MySQL results

All numbers are expressed in queries per second (Y-axis), and the X-axis shows the number of concurrent accesses.


While the Opteron's performance decreases when we add another 4 cores, a second Xeon E5345 pushes the number of queries/s slightly higher. Clearly, MySQL is not ready for more than four cores right now, and it serves as a great reminder for all those with wild "Tens of cores on one die" dreams: making software scale with massive multi-core systems is and will never be easy. Below you can see the scaling of MySQL running on one Xeon 5160 (one core disabled), two (one CPU) and four (Dual CPU configuration).

MySQL Core Scaling
Concurrency 1 core 2 cores 4 cores
5 735 900 1082
10 826 1082 1267
25 823 1105 1323
50 780 1109 1319
100 689 1075 1196

For those running MySQL, clock speed still rules. One 3GHz Xeon 5160 is already capable of no less than 1000-1100 queries/s. Compare this with the clock speed scaling (1 core):

MySQL Clock Scaling
Concurrency 2.33 GHz 3 GHz
5 568 735
10 647 826
25 619 823
50 579 780
100 531 689

You can see that a 28% higher clock speed results in 28% higher performance. We can conclude that clock speed still matters, and that it is often much harder to get more performance out of multiple cores, even in applications that are relatively easy split up into threads.

Although our current DB2 results are "beta" and not ready for publication, we can already say now that DB2 is slower than MySQL but scales much better. We get an 80% increase from 2 to 4 cores.

Originally published at https://www.anandtech.com/show/2143 (Wayback Machine).