最近尝试对mariadb 10.0
进行sysbench 的 OLTP 的 RW complex 测试,
测试的机器配置如下:
cpu : 80核
内存 : 64G
硬盘 : SAS RAID1
测试工具:
sysbench-0.4.12
操作系统调优:
echo deadline >/sys/block/sda/queue/scheduler
ulimit -n 10240
数据生成语句为:
./sysbench --test=oltp --oltp-table-size=20000000 --mysql-host=127.0.0.1 --mysql-port=3306 --mysql-user=root --mysql-db=test --db-driver=mysql prepare
调优之后的配置文件如下:
[client]
port
= 3306
socket
= /tmp/mysql.sock
[mysqld]
port
= 3306
socket
= /tmp/mysql.sock
basedir = /usr/local/mysql
datadir = /usr/local/mysql/data
skip-external-locking
skip-name-resolve
key_buffer_size = 512M
thread_cache_size = 3000
max_connections = 20480
lower_case_table_names = 1
server-id
= 1
thread_handling=pool-of-threads
thread_pool_max_threads=1500
innodb_log_file_size = 4G
innodb_log_buffer_size = 256M
innodb_buffer_pool_size = 30G
innodb_buffer_pool_instances = 1
innodb_flush_log_at_trx_commit = 0
innodb_file_per_table=1
innodb_locks_unsafe_for_binlog = 1
innodb_thread_concurrency = 28
innodb_flush_method= O_DIRECT
innodb_io_capacity=600
innodb_log_block_size=2048
innodb_read_io_threads=16
innodb_write_io_threads=16
innodb_support_xa=0
innodb_change_buffering=all
innodb_checksum_algorithm=none
innodb_doublewrite = false
#innodb_adaptive_hash_index = 0
max_prepared_stmt_count=1048576
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
测试结果为:
并发
total time
transaction
8
11.2411s
1779.19 per sec.
16
4.3096s
4641.32 per sec.
32
2.5201s
7937.14 per sec.
64
2.5204s
7936.49 per sec.
128
3.0844s
6485.61 per sec.
256
3.2569s
6141.08 per sec.
512
4.8043s
4163.54 per sec.
1024
6.8200s
2934.31 per sec.
2048
8.7394s
2289.29 per sec.
转载请注明转自高孝鑫的博客
测试的机器配置如下:
cpu : 80核
内存 : 64G
硬盘 : SAS RAID1
测试工具:
sysbench-0.4.12
操作系统调优:
echo deadline >/sys/block/sda/queue/scheduler
ulimit -n 10240
数据生成语句为:
./sysbench --test=oltp --oltp-table-size=20000000 --mysql-host=127.0.0.1 --mysql-port=3306 --mysql-user=root --mysql-db=test --db-driver=mysql prepare
调优之后的配置文件如下:
[client]
port
socket
[mysqld]
port
socket
basedir = /usr/local/mysql
datadir = /usr/local/mysql/data
skip-external-locking
skip-name-resolve
key_buffer_size = 512M
thread_cache_size = 3000
max_connections = 20480
lower_case_table_names = 1
server-id
thread_handling=pool-of-threads
thread_pool_max_threads=1500
innodb_log_file_size = 4G
innodb_log_buffer_size = 256M
innodb_buffer_pool_size = 30G
innodb_buffer_pool_instances = 1
innodb_flush_log_at_trx_commit = 0
innodb_file_per_table=1
innodb_locks_unsafe_for_binlog = 1
innodb_thread_concurrency = 28
innodb_flush_method= O_DIRECT
innodb_io_capacity=600
innodb_log_block_size=2048
innodb_read_io_threads=16
innodb_write_io_threads=16
innodb_support_xa=0
innodb_change_buffering=all
innodb_checksum_algorithm=none
innodb_doublewrite = false
#innodb_adaptive_hash_index = 0
max_prepared_stmt_count=1048576
[mysqldump]
quick
max_allowed_packet = 16M
[mysql]
no-auto-rehash
测试结果为:
并发
8
16
32
64
128
256
512
1024
2048
转载请注明转自高孝鑫的博客