MariaDB 10.1 can do 1 million queries per second

来源:互联网 时间:1970-01-01

MariaDB 10.1 not only contains tons of new features, it has also been polished to deliver top performance. The biggest improvement has been achieved for scalability on massively multithreaded hardware.

The following numbers show the throughput for a simplified sysbench OLTP benchmark on MariaDB-10.1.8 compared to MariaDB-10.0.21:

queries per second in simplified OLTP OLTP clients MariaDB-10.0.21 MariaDB-10.1.8 increase 160 398124 930778 135% 200 397102 1024311 159% 240 395661 1108756 181% 320 396285 1142464 190% Benchmark Details

The benchmark is sysbench-mariadb(sysbench trunk with a fix for a more scalable random number generator) OLTP simplified to do 1000 point selects per transaction. The data set is 1 million rows in 20 tables. Fewer tables can be used, but below 4 tables the performance drops somewhat due to a hot spot in the table definition cache.

This is the my.cnf used for this test:

[mysqld] max_connections = 400 table_open_cache = 800 query_cache_type = 0 innodb_buffer_pool_size = 512M innodb_buffer_pool_instances = 10 innodb_adaptive_hash_index_partitions = 20

And this the sysbench command line:

sysbench-mariadb --test=lua/oltp.lua --oltp-tables-count=20 / --oltp-table-size=50000 --num-threads=... --oltp-read-only=on / --oltp-point-selects=1000 --oltp-distinct-ranges=0 / --oltp-simple-ranges=0 --oltp-sum-ranges=0 --oltp-order-ranges=0 / --max-time=100 --max-requests=0 run Hardware / Software Details

The benchmark was run on an IBM “Firestone” S822LCPower8 server with 2 sockets, 20 cores and 8-way SMT (160 hardware threads). The machine runs PowerKVM 3.1 and inside KVM an Ubuntu 14.04.3 LTS (ppc64le) guest.MariaDB-10.1.8 and sysbench-mariadbwere compiled locally with IBM’s Advance Tool Chain 8.0compiler.


The changes in the MariaDB source code leading to those impressive performance improvements are part of porting MariaDB to Power8. Some of the major changes shall be listed here:

MDEV-6089MySQL WL#7305 “Improve MDL scalability by using lock-free hash”

MDEV-7004Merge scalability fixes from 10.0-power

MDEV-7324Lock-free hash for table definition cache

IBM has published a number of white paperson MariaDB and how it performs on Power8 compared to Intel hardware.