Performance Test: MySQL 5.6 vs. MariaDB 10.0

      Oracle has just released MySQL 5.6.10 GA, so it is time to refresh the previous performance benchmark data. This round of testing includes the following versions: 
    MySQL-5.5.29 
    MySQL-5.6.10 
    MariaDB-5.5.28a 
    MariaDB-10.0.1 

The 5.5 version is retained in this test for regression testing purposes. We have often observed that new versions can sometimes lag behind in performance. 

This test was conducted under different conditions. The main difference is that instead of SSDs, we used high-performance RAID-5 storage with 512 MB battery-backed cache. Additionally, the test machine has 16 cores: 12 cores run mysqld, and the remaining 4 cores run sysbench. 

The test uses sysbench-0.5 OLTP, with 8 tables and 10G of data. The InnoDB buffer pool size is 16G, and the log is 4G. Different disk systems require different InnoDB configurations: 
    innodb_io_capacity = 1000 (was 20000 for SSD) 
    innodb_flush_neighbors = 1 (was 0 for SSD) 

Below are the test results, starting with OLTP read-only: 

wKiom1NgdM2TAu96AAFraESQlC4458.jpg

Curiously, MySQL 5.6 performed abnormally in this round. At 8 threads, the difference was negligible, and it performed best at 16 threads. However, at higher concurrency levels, performance declined rapidly, becoming even worse than MySQL 5.5. MariaDB 10.0 fared a bit worse than MariaDB 5.5, but the drop was not as pronounced.

The response time chart, however, looks relatively good and smooth: 
wKioL1NgdUeB5Jy3AAEm-Jf1N9o221.jpg

 

MySQL-5.6 and MariaDB-10.0 seem slightly better here, suggesting they can allocate CPU cycles more efficiently.

 

Disclaimer: The thread pool was not used in this test. Oracle’s thread pool implementation is now closed source, so it could not be tested, and it would have been unfair to use MariaDB’s thread pool.

 

If you want to understand the impact of thread pool on performance, you can refer to two earlier posts:

 

 

Second test: OLTP read-write test 

wKiom1Ngdg6gVu0GAAGm4XvRqYI540.jpg

This chart is similar to the previous test. Both MySQL 5.6 and MariaDB 10.0 show a notable performance decline compared to their 5.5 counterparts, dropping by about 10% under high load.

It is a well-known fact that MySQL 5.5 suffered from performance degradation under high load due to synchronous flush operations.

The response time chart is relatively better: 

wKiom1Ngdl3xkVeKAAFhTkwFNIA431.jpg

This is good news. The 5.5 version had significantly worse response times at 64 threads and beyond. The adaptive flush algorithms in MySQL 5.6 and MariaDB 10.0 seem to work well.

There is another issue: if you use multiple buffer pool instances, you will see worse write latency. In the results above, the read-only test used 16 buffer pool instances, while the read-write test used only 1.

Conclusion:
   MySQL-5.6 performs worse than its predecessor, especially under high concurrency. This contradicts Oracle’s published test results. I can only speculate why the results differ so much; I suspect it is due to Oracle’s closed-source thread pool and the fact that Oracle tests on larger machines.
   When using a single buffer pool, you do not need to worry about write latency issues. Also, MySQL 5.6 allows up to 512G of redo log, which can reduce synchronous flush operations.

 

The scripts used for this test are available at:
http://bazaar.launchpad.net/~ahel/maria/mariadb-benchmarks/revision/20

 

Everyone is welcome to rerun this test and share your results with us.


Article source: http://www.oschina.net/question/12_90065

http://blog.mariadb.org/sysbench-oltp-mysql-5-6-vs-mariadb-10-0/

Leave a Comment

Your email address will not be published.