爲了驗證MariaDB官網壓測結果,特找了三臺低配物理機作壓測mysql
https://mariadb.org/maria-10-1-mysql-5-7-commodity-hardware/sql
192.168.143.244 sysbench 192.168.143.245 MySQL 5.7.17 192.168.143.246 MariaDB 10.1.19 Enterprise
工具sysbench0.5 128併發 10張表100萬行bash
硬件配置R720 64G RAID10(SAS 15000轉)併發
分別壓測30分鐘
ide
sysbench --test=/root/soft/sysbench-0.5/sysbench/tests/db/oltp.lua --mysql-table-engine=innodb --oltp-table-size=1000000 --max-requests=0 --max-time=1800 --num-threads=128 --oltp-tables-count=10 --report-interval=10 --mysql-host=192.168.143.245 --mysql-port=3306 --mysql-user=admin --mysql-password=123456 --mysql-db=test run
壓測參數-參考官網:工具
https://mariadb.org/performance-evaluation-of-mariadb-10-1-and-mysql-5-7-4-labs-tplc/
oop
######### InnoDB ############# innodb_sort_buffer_size = 32M innodb_rollback_on_timeout = 1 innodb_data_file_path = ibdata1:10M:autoextend innodb_buffer_pool_dump_at_shutdown = 1 innodb_buffer_pool_load_at_startup = 1 innodb_buffer_pool_size = 30G innodb_buffer_pool_instances = 8 innodb_log_file_size = 128M innodb_log_buffer_size = 32M innodb_log_files_in_group = 3 innodb_flush_log_at_trx_commit = 2 innodb_lock_wait_timeout = 10 innodb_sync_spin_loops = 40 innodb_max_dirty_pages_pct = 95 innodb_support_xa = 1 innodb_thread_concurrency = 0 innodb_thread_sleep_delay = 500 innodb_concurrency_tickets = 1000 innodb_flush_method = O_DIRECT innodb_file_per_table = 1 innodb_read_io_threads = 12 innodb_write_io_threads = 12 innodb_io_capacity = 600 innodb_file_format = Barracuda innodb_purge_threads = 8 innodb_purge_batch_size = 32 innodb_old_blocks_time = 1000 innodb_change_buffering = all transaction_isolation = READ-COMMITTED innodb_stats_on_metadata = 0 performance_schema = 0
192.168.143.245(MySQL 5.7.17,Buffer_Pool_Size爲30G)lua
壓測結果spa
--------------------------------------------------
線程
192.168.143.246(MariaDB 10.1.19 Enterprise,Buffer_Pool_Size爲30G,未開啓Thread Pool線程池)
壓測結果
-------------------------------------------------
總結
在QPS相同的狀況下,MariaDB 10.1.19 Enterprise在CPU負載上利用率更低,基本符合MariaDB官網的壓測結果。