Sysbench压力测试基准测试用例

Sysbench测试的种类非常多,测试的目的也非常多,
比如:
1、CPU运算性能
2、磁盘IO性能
3、调度程序性能
4、内存分配及传输速度
5、POSIX线程性能
6、数据库性能(OLTP基准测试)
目前sysbench主要支持 mysql,drizzle,pgsql,oracle 等几种数据库。

我这里主要的目的就两个

(1)测试MySQL的极限IO

(2)对比不同版本MySQL,不同参数, 不同硬件,不同系统对MySQL的性能影响

为什么选择sysbench?

因为MySQL官方的测试就是用sysbench哦
尽量选择最新版本的sysbench哦,大于0.4版本的sysbench有实时显示功能

如何下载sysbench

http://github.com/akopytov/sysbench

文档在哪里

http://github.com/akopytov/sysbench

如何安装

————–需要的软件包————–
automake
libtool

—————-安装步骤—————-
cd sysbench-1.0;
./autogen.sh;
./configure –with-mysql-includes=/usr/local/mysql/include –with-mysql-libs=/usr/local/mysql/lib/;
make;
make install;

  • 过程中可能会遇到的故障
    sysbench: error while loading shared libraries: libmysqlclient.so.20: cannot open shared object file: No such file or directory
  • 解决方案
    export LD_LIBRARY_PATH=/usr/local/mysql/lib/;

问题2:
sysbench 1.1.0 (using bundled LuaJIT 2.1.0-beta2)

Creating table ‘sbtest1’…
Unknown database driver:
Creating table ‘sbtest2’…
Unknown database driver:
Creating table ‘sbtest3’…

解决办法,–db-driver=
使用参数。

  • 测试是否安装成功
    shell> sysbench –version
    sysbench 1.0

————–查看帮助文档————–

– 查看总体帮助文档

sysbench –help

– 查测试cpu的帮助文档

sysbench –test=cpu help

– 查看IO测试的帮助文档

sysbench –test=fileio help

– 查看测试内存的帮助文档

sysbench –test=memory help

– 查看测试线程的帮助文档

sysbench –test=threads help

————–测试的步骤————–
prepare –生成测试需要的数据
run –进行性能测试
cleanup –清除测试数据

————–全局参数————–

sysbench

–一般选项(重要的)
–threads=N –指定测试使用多少线程数,默认为1
–max-requests –请求的最大数目。默认为10000,0代表不限制
–time=N   –最大执行时间,单位为秒。默认是0,不限制
–report-interval –指定每多少秒在屏幕上输出一次结果
STRING  –指定脚本路径。
fileio
cpu
memory
threads
mutex
–日志选项
–verbosity=N –日志级别,默认为3,5=debug,0=只包含重要信息

绍常用的选项

选项 描述 默认值
—num-threads 多少个线程 1
—max-requests 多少个请求,0意味着无限制 1000
—max-time 测试多长时间,0意味着无限制 0
—test 测试什么模块 必须要求
—report-interval 阶段性的汇报测试统计信息
—test=fileio 模块的选项

—file-test-mode 参数如下:

  • seqwr
    sequential write 顺序写
  • seqrewr
    sequential rewrite 顺序重写
  • seqrd
    sequential read 顺序读
  • rndrd
    random read 随机读
  • rndwr
    random write 随机写
  • rndrw
    combined random read/write 混合随机读写

test option for fileio
选项 描述 默认值
—file-num 创建文件的数量 128
—file-block-size IO操作的大小 16k
—file-total-size 所有文件的总大小 2G
—file-test-mode seqwr,seqrewr, seqrd, rndrd, rndwr, rndwr(上面已经介绍) 必须
—file-io-mode i/O 模式,sync, async, fastmmap, slowmmap sync
—file-extra-flags 以额外的标记(O_SYNC,O_DSYNC,O_DIRECT)打开 -
—file-fsync-freq 多少请求后使用fsync 100
—file-fsync-all 每次写IO都必须fsync no
—file-fsync-mode 用什么样的模式来同步文件fsync, fdatasync (see above) fsync
—file-rw-ratio 随机读写请求的比例

举例:

sysbenchnumthreads=16test=fileiofiletotalsize=3Gfiletestmode=rndrwprepare sysbench –num-threads=16 –test=fileio –file-total-size=3G –file-test-mode=rndrw run
$ sysbench –num-threads=16 –test=fileio –file-total-size=3G –file-test-mode=rndrw cleanup

OLTP-MySQL

此模式用于测试真实数据库性能。在prepare阶段创建表,sbtest默认

CREATE TABLE sbtest (
id int(10) unsigned NOT NULL auto_increment,
k int(10) unsigned NOT NULL default ‘0’,
c char(120) NOT NULL default ”,
pad char(60) NOT NULL default ”,
PRIMARY KEY (id),
KEY k (k));

在run阶段执行模式情况:

simple模式
SELECT c FROM sbtest WHERE id=N

Point queries
SELECT c FROM sbtest WHERE id=N

Range queries:
SELECT c FROM sbtest WHERE id BETWEEN N AND M

Range SUM() queries
SELECT SUM(K) FROM sbtest WHERE id BETWEEN N and M

Range ORDER BY queries
SELECT c FROM sbtest WHERE id between N and M ORDER BY c

Range DISTINCT queries
SELECT DISTINCT c FROM sbtest WHERE id BETWEEN N and M ORDER BY c

UPDATEs on index column
UPDATE sbtest SET k=k+1 WHERE id=N

UPDATEs on non-index column:
UPDATE sbtest SET c=N WHERE id=M

DELETE queries
DELETE FROM sbtest WHERE id=N

INSERT queries
INSERT INTO sbtest VALUES (…)

oltp test模式通用参数
选项 描述 默认值
—oltp-table-name 表的名字 sbtest
—oltp-table-size 表的行数 10000
—oltp-tables-count 表的个数 1
—oltp-dist-type 热点数据分布{uniform(均匀分布),Gaussian(高斯分布),special(空间分布)}。默认是special
—oltp-dist-pct special:热点数据产生的比例 1
—oltp-dist-res special:热点数据的访问频率 75
—oltp-test-mode simple,complex(以上介绍) complex
—oltp-read-only 只有select 请求 off
—oltp-skip-trx 不用事务 off
—oltp-point-selects 一个事务中简单select查询数量 10
—oltp-simple-ranges 一个事务中简单range查询的数量 1
—oltp-sum-ranges sum range的数量 1
—oltp-order=ranges order range的数量 1

mysql test 参数
–mysql-host=[LIST,…] MySQL server host [localhost]
–mysql-port=[LIST,…] MySQL server port [3306]
–mysql-socket=[LIST,…] MySQL socket
–mysql-user=STRING MySQL user [sbtest]
–mysql-password=STRING MySQL password []
–mysql-db=STRING MySQL database name [sbtest]
–mysql-table-engine=STRING storage engine to use for the test table {myisam,innodb,bdb,heap,ndbcluster,federated} [innodb]
–mysql-engine-trx=STRING whether storage engine used is transactional or not {yes,no,auto} [auto]
–mysql-ssl=[on|off] use SSL connections, if available in the client library [off]
–mysql-ssl-cipher=STRING use specific cipher for SSL connections []
–mysql-compression=[on|off] use compression, if available in the client library [off]
–myisam-max-rows=N max-rows parameter for MyISAM tables [1000000]
–mysql-debug=[on|off] dump all client library calls [off]
–mysql-ignore-errors=[LIST,…]list of errors to ignore, or “all” [1213,1020,1205]
–mysql-dry-run=[on|off] Dry run, pretent that all MySQL client API calls are successful without executing them [off]
以上0.4版本的语法介绍完毕。

接下来是大于0.4版本的新语法,尤其是—test=oltp模块
用—test=xx.lua (完整路径来传递)来代替

FileIO实战

磁盘:S3610 * 6 raid10, 内存128G
测试出相关场景下的极限IOPS

随机读写(3:2 oltp场景)

  • sysbench –num-threads=16 –report-interval=3 –max-requests=0 –max-time=300 –test=fileio –file-num=200 –file-total-size=200G –file-test-mode=rndrw –file-block-size=16384 –file-extra-flags=direct run
    fileio_oltp_32

随机读写(5:1 oltp场景)

  • sysbench –num-threads=16 –report-interval=3 –max-requests=0 –max-time=300 –test=fileio –file-num=200 –file-total-size=200G –file-test-mode=rndrw –file-block-size=16384 –file-extra-flags=direct –file-rw-ratio=5 run
    fileio_oltp_51

随机写

  • sysbench –num-threads=16 –report-interval=3 –max-requests=0 –max-time=300 –test=fileio –file-num=200 –file-total-size=200G –file-test-mode=rndwr –file-block-size=16384 –file-extra-flags=direct run
    fileio_rndwr

随机读

  • sysbench –num-threads=16 –report-interval=3 –max-requests=0 –max-time=300 –test=fileio –file-num=200 –file-total-size=200G –file-test-mode=rndrd –file-block-size=16384 –file-extra-flags=direct run
    fileio_rndrd

MySQL5.6 vs MySQL5.7 测试

磁盘:S3610 * 6 raid10, 内存128G

Point select

  • 产生数据
    sysbench –num-threads=128 –report-interval=3 –max-requests=0 –max-time=300 –test=/root/sysbench-1.0/sysbench/tests/db/select.lua –mysql-table-engine=innodb –oltp-table-size=50000000 –mysql-user=sysbench –mysql-password=sysbench –oltp-tables-count=2 –mysql-host=xx –mysql-port=3306 prepare
  • 执行
    sysbench –num-threads=128 –report-interval=3 –max-requests=0 –max-time=300 –test=/root/sysbench-1.0/sysbench/tests/db/select.lua –mysql-table-engine=innodb –oltp-table-size=50000000 –mysql-user=sysbench –mysql-password=sysbench –oltp-tables-count=2 –mysql-host=xx –mysql-port=3306 run
    select_sysbench

Point oltp

  • 产生数据
    sysbench –num-threads=128 –report-interval=3 –max-requests=0 –max-time=300 –test=/root/sysbench-1.0/sysbench/tests/db/oltp.lua –mysql-table-engine=innodb –oltp-table-size=50000000 –mysql-user=sysbench –mysql-password=sysbench –oltp-tables-count=2 –mysql-host=xx –mysql-port=3306 prepare
  • 执行
    sysbench –num-threads=128 –report-interval=3 –max-requests=0 –max-time=300 –test=/root/sysbench-1.0/sysbench/tests/db/oltp.lua –mysql-table-engine=innodb –oltp-table-size=50000000 –mysql-user=sysbench –mysql-password=sysbench –oltp-tables-count=2 –mysql-host=xx –mysql-port=3306 run
    oltp_sysbench

结论
在性能方面,虽然官方号称5.7性能比5.6快3倍,但是在实际测试中5.7比5.6却稍微差一点点
是否会选择5.7生产环境?当然,因为5.7的新特性太诱人了

=========================================================================

基准压力测试记录

环境:
MySQL版本:MySQL 5.6.35-log
系统:CentOS Linux release 7.3.1611 (Core)
cpu:Intel(R) Xeon(R) CPU E5-2620 v3 @ 2.40GHz 12核心
内存:23G
使用的百度云主机,未知raid信息。

使用DD测试:
读测试

time dd if=/dev/vdb5 f=/dev/null bs=16k count=8388608

写测试

time dd if=/dev/zero f=/data0/iotest bs=16k count=8388608

读写测试

time dd if=/dev/vdb5 f=/data0/iotests bs=16k count=8388608

使用sysbench进行IO测试:
sysbenchthreads=16fileiofiletotalsize=3Gfiletestmode=rndrwprepare sysbench –threads=16 fileio –file-total-size=3G –file-test-mode=rndrw run
$ sysbench –threads=16 fileio –file-total-size=3G –file-test-mode=rndrw cleanup

Running the test with following options:
Number of threads: 16
Initializing random number generator from current time

Extra file open flags: 0
128 files, 24MiB each
3GiB total file size
Block size 16KiB
Number of IO requests: 0
Read/Write ratio for combined random IO test: 1.50
Periodic FSYNC enabled, calling fsync() each 100 requests.
Calling fsync() at the end of test, Enabled.
Using synchronous I/O mode
Doing random r/w test
Initializing worker threads…

Threads started!

File operations:
reads/s: 279.46
writes/s: 186.30
fsyncs/s: 588.74

Throughput:
read, MiB/s: 4.37
written, MiB/s: 2.91

General statistics:
total time: 10.0911s
total number of events: 10641

Latency (ms):
min: 0.00
avg: 15.16
max: 218.74
95th percentile: 121.08
sum: 161329.08

Threads fairness:
events (avg/stddev): 665.0625/149.10
execution time (avg/stddev): 10.0831/0.02

准备阶段:(并行加载)

sysbench –threads=32 –report-interval=3 –max-requests=0 –time=300 /usr/local/share/sysbench/tests/include/oltp_legacy/parallel_prepare.lua –mysql-table-engine=innodb –oltp-table-size=800000 –oltp-tables-count=5 –rand-int=on –mysql-socket=/data0/mysql/bin/mysql.sock –mysql-user=root –mysql-password=’ch89^4bnK*O2U7,E’ –db-driver=mysql prepare

my.cnf:
=enter description here

关键参数:
connect-timeout = 20
transaction_isolation = READ-COMMITTED
innodb_use_native_aio = 1
innodb_checksum_algorithm = crc32
key_buffer_size = 16M
bulk_insert_buffer_size=16M
max_heap_table_size = 32M
myisam_sort_buffer_size = 16M
join_buffer_size = 16m
tmp_table_size = 64m
max_allowed_packet = 16m
sql_mode = “STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION,NO_AUTO_CREATE_USER”
interactive_timeout = 1800
wait_timeout = 1800
read_buffer_size = 16m
read_rnd_buffer_size = 16m
sort_buffer_size = 32m

back_log=500
open_files_limit = 65535
table_open_cache = 2048

thread_cache_size = 24
query_cache_size = 0
innodb_thread_concurrency = 64
binlog_format = row
max_binlog_size=1G
sync_binlog = 0

innodb_buffer_pool_size = 18G
innodb_buffer_pool_instances = 8
innodb_file_per_table=1
innodb_lru_scan_depth = 2000
innodb_lock_wait_timeout = 60
innodb_io_capacity = 3000
innodb_io_capacity_max = 4200
innodb_flush_method = O_DIRECT
innodb_write_io_threads = 8
innodb_read_io_threads = 8
innodb_max_dirty_pages_pct = 50

innodb_flush_neighbors = 0
innodb_sort_buffer_size = 64m
innodb_autoinc_lock_mode = 2

innodb_log_buffer_size=16M
innodb_log_file_size = 4500M
innodb_log_files_in_group = 3
binlog_cache_size = 8M
innodb_purge_threads = 4
innodb_flush_log_at_trx_commit = 2

slave-parallel-workers=4
innodb_rollback_on_timeout = 1

innodb_buffer_pool_load_at_startup = 1
innodb_buffer_pool_dump_at_shutdown = 1
innodb_numa_interleave=off

测试1:
select
sysbench –threads=32 –report-interval=3 –max-requests=0 –time=300 /usr/local/share/sysbench/tests/include/oltp_legacy/select.lua –mysql-table-engine=innodb –oltp-table-size=800000 –oltp-tables-count=5 –rand-int=on –mysql-socket=/data0/mysql/bin/mysql.sock –mysql-user=root –mysql-password=’ch89^4bnK*O2U7,E’ –db-driver=mysql run >/data0/select.log &

3s输出一次,
一次输出:线程数,tps,       qps,            (读写数),                          95%以上的平均延迟,错误数,重连数
[ 3s ] thds: 32 tps: 86347.86 qps: 86347.86 (r/w/o: 86347.86/0.00/0.00) lat (ms,95%): 0.56 err/s: 0.00 reconn/s: 0.00
[ 6s ] thds: 32 tps: 84803.11 qps: 84803.44 (r/w/o: 84803.44/0.00/0.00) lat (ms,95%): 0.58 err/s: 0.00 reconn/s: 0.00
[ 9s ] thds: 32 tps: 86676.07 qps: 86676.07 (r/w/o: 86676.07/0.00/0.00) lat (ms,95%): 0.56 err/s: 0.00 reconn/s: 0.00
[ 12s ] thds: 32 tps: 85540.01 qps: 85541.34 (r/w/o: 85541.34/0.00/0.00) lat (ms,95%): 0.57 err/s: 0.00 reconn/s: 0.00
[ 15s ] thds: 32 tps: 87080.50 qps: 87078.83 (r/w/o: 87078.83/0.00/0.00) lat (ms,95%): 0.56 err/s: 0.00 reconn/s: 0.00
[ 18s ] thds: 32 tps: 87289.56 qps: 87289.56 (r/w/o: 87289.56/0.00/0.00) lat (ms,95%): 0.53 err/s: 0.00 reconn/s: 0.00
[ 21s ] thds: 32 tps: 89001.78 qps: 89002.45 (r/w/o: 89002.45/0.00/0.00) lat (ms,95%): 0.57 err/s: 0.00 reconn/s: 0.00
[ 24s ] thds: 32 tps: 89542.12 qps: 89541.45 (r/w/o: 89541.45/0.00/0.00) lat (ms,95%): 0.55 err/s: 0.00 reconn/s: 0.00
.....
.....
[ 282s ] thds: 32 tps: 94492.04 qps: 94492.04 (r/w/o: 94492.04/0.00/0.00) lat (ms,95%): 0.51 err/s: 0.00 reconn/s: 0.00
[ 285s ] thds: 32 tps: 88670.62 qps: 88670.62 (r/w/o: 88670.62/0.00/0.00) lat (ms,95%): 0.56 err/s: 0.00 reconn/s: 0.00
[ 288s ] thds: 32 tps: 88334.59 qps: 88334.59 (r/w/o: 88334.59/0.00/0.00) lat (ms,95%): 0.55 err/s: 0.00 reconn/s: 0.00
[ 291s ] thds: 32 tps: 85734.21 qps: 85734.21 (r/w/o: 85734.21/0.00/0.00) lat (ms,95%): 0.56 err/s: 0.00 reconn/s: 0.00
[ 294s ] thds: 32 tps: 92297.02 qps: 92297.02 (r/w/o: 92297.02/0.00/0.00) lat (ms,95%): 0.55 err/s: 0.00 reconn/s: 0.00
[ 297s ] thds: 32 tps: 91830.33 qps: 91830.33 (r/w/o: 91830.33/0.00/0.00) lat (ms,95%): 0.54 err/s: 0.00 reconn/s: 0.00
[ 300s ] thds: 32 tps: 89469.78 qps: 89470.11 (r/w/o: 89470.11/0.00/0.00) lat (ms,95%): 0.55 err/s: 0.00 reconn/s: 0.00

SQL statistics:(SQL 统计)
    queries performed:
        read:                            26549771           执行读次数
        write:                           0                         执行写次数
        other:                           0                        执行写次数
        total:                           26549771           总执行次数
    transactions:                        26549771 (88497.44 per sec.)       总事务数,因为只读测试,所以等于read数。
    queries:                             26549771 (88497.44 per sec.)       平均每秒88497次。
    ignored errors:                      0      (0.00 per sec.)         忽略错误数
    reconnects:                          0      (0.00 per sec.)         重连数

General statistics:
    total time:                          300.0061s               总时长。
    total number of events:              26549771events个数

Latency (ms):           延迟,单位毫秒。
         min:                                  0.08
         avg:                                  0.36             平均延迟0.36毫秒。
         max:                                496.96
         95th percentile:                      0.55
         sum:                            9521283.89

Threads fairness:
    events (avg/stddev):           829680.3438/11348.54
    execution time (avg/stddev):   297.5401/0.03

select_random_points
sysbench –threads=32 –report-interval=3 –max-requests=0 –time=300 /usr/local/share/sysbench/tests/include/oltp_legacy/select_random_points.lua –mysql-table-engine=innodb –oltp-table-size=800000 –oltp-tables-count=5 –rand-int=on –mysql-socket=/data0/mysql/bin/mysql.sock –mysql-user=root –mysql-password=’ch89^4bnK*O2U7,E’ –db-driver=mysql run >/data0/select_random_points.log &

[ 237s ] thds: 32 tps: 57382.04 qps: 57382.04 (r/w/o: 57382.04/0.00/0.00) lat (ms,95%): 0.81 err/s: 0.00 reconn/s: 0.00
[ 240s ] thds: 32 tps: 56903.36 qps: 56903.36 (r/w/o: 56903.36/0.00/0.00) lat (ms,95%): 0.81 err/s: 0.00 reconn/s: 0.00
[ 243s ] thds: 32 tps: 56937.31 qps: 56937.98 (r/w/o: 56937.98/0.00/0.00) lat (ms,95%): 0.84 err/s: 0.00 reconn/s: 0.00
[ 246s ] thds: 32 tps: 52708.66 qps: 52708.00 (r/w/o: 52708.00/0.00/0.00) lat (ms,95%): 0.84 err/s: 0.00 reconn/s: 0.00
[ 249s ] thds: 32 tps: 52588.30 qps: 52588.30 (r/w/o: 52588.30/0.00/0.00) lat (ms,95%): 0.84 err/s: 0.00 reconn/s: 0.00
[ 252s ] thds: 32 tps: 53905.81 qps: 53905.81 (r/w/o: 53905.81/0.00/0.00) lat (ms,95%): 0.86 err/s: 0.00 reconn/s: 0.00
[ 255s ] thds: 32 tps: 55477.35 qps: 55477.68 (r/w/o: 55477.68/0.00/0.00) lat (ms,95%): 0.81 err/s: 0.00 reconn/s: 0.00
[ 258s ] thds: 32 tps: 54204.00 qps: 54203.67 (r/w/o: 54203.67/0.00/0.00) lat (ms,95%): 0.84 err/s: 0.00 reconn/s: 0.00
[ 261s ] thds: 32 tps: 59877.85 qps: 59878.19 (r/w/o: 59878.19/0.00/0.00) lat (ms,95%): 0.81 err/s: 0.00 reconn/s: 0.00
[ 264s ] thds: 32 tps: 52527.07 qps: 52526.74 (r/w/o: 52526.74/0.00/0.00) lat (ms,95%): 0.83 err/s: 0.00 reconn/s: 0.00
[ 267s ] thds: 32 tps: 59544.87 qps: 59544.87 (r/w/o: 59544.87/0.00/0.00) lat (ms,95%): 0.81 err/s: 0.00 reconn/s: 0.00
[ 270s ] thds: 32 tps: 56860.17 qps: 56860.17 (r/w/o: 56860.17/0.00/0.00) lat (ms,95%): 0.78 err/s: 0.00 reconn/s: 0.00
[ 273s ] thds: 32 tps: 57416.14 qps: 57416.14 (r/w/o: 57416.14/0.00/0.00) lat (ms,95%): 0.80 err/s: 0.00 reconn/s: 0.00
[ 276s ] thds: 32 tps: 56722.16 qps: 56722.16 (r/w/o: 56722.16/0.00/0.00) lat (ms,95%): 0.83 err/s: 0.00 reconn/s: 0.00
[ 279s ] thds: 32 tps: 59104.09 qps: 59104.42 (r/w/o: 59104.42/0.00/0.00) lat (ms,95%): 0.83 err/s: 0.00 reconn/s: 0.00
[ 282s ] thds: 32 tps: 53485.00 qps: 53485.00 (r/w/o: 53485.00/0.00/0.00) lat (ms,95%): 0.84 err/s: 0.00 reconn/s: 0.00
[ 285s ] thds: 32 tps: 47930.12 qps: 47929.79 (r/w/o: 47929.79/0.00/0.00) lat (ms,95%): 0.95 err/s: 0.00 reconn/s: 0.00
[ 288s ] thds: 32 tps: 52010.53 qps: 52010.86 (r/w/o: 52010.86/0.00/0.00) lat (ms,95%): 0.86 err/s: 0.00 reconn/s: 0.00
[ 291s ] thds: 32 tps: 55226.86 qps: 55226.52 (r/w/o: 55226.52/0.00/0.00) lat (ms,95%): 0.84 err/s: 0.00 reconn/s: 0.00
[ 294s ] thds: 32 tps: 51032.08 qps: 51032.75 (r/w/o: 51032.75/0.00/0.00) lat (ms,95%): 0.87 err/s: 0.00 reconn/s: 0.00
[ 297s ] thds: 32 tps: 53817.18 qps: 53816.85 (r/w/o: 53816.85/0.00/0.00) lat (ms,95%): 0.83 err/s: 0.00 reconn/s: 0.00
SQL statistics:
    queries performed:
        read:                            16348978
        write:                           0
        other:                           0
        total:                           16348978
    transactions:                        16348978 (54495.23 per sec.)
    queries:                             16348978 (54495.23 per sec.)
    ignored errors:                      0      (0.00 per sec.)
    reconnects:                          0      (0.00 per sec.)

General statistics:
    total time:                          300.0075s
    total number of events:              16348978

Latency (ms):
         min:                                  0.11
         avg:                                  0.58
         max:                                241.69
         95th percentile:                      0.83
         sum:                            9551211.48

Threads fairness:
    events (avg/stddev):           510905.5625/87922.41
    execution time (avg/stddev):   298.4754/0.26

select_random_ranges
sysbench –threads=32 –report-interval=3 –max-requests=0 –time=300 /usr/local/share/sysbench/tests/include/oltp_legacy/select_random_ranges.lua –mysql-table-engine=innodb –oltp-table-size=800000 –oltp-tables-count=5 –rand-int=on –mysql-socket=/data0/mysql/bin/mysql.sock –mysql-user=root –mysql-password=’ch89^4bnK*O2U7,E’ –db-driver=mysql run >/data0/select_random_ranges.log &

[ 246s ] thds: 32 tps: 35759.87 qps: 35759.87 (r/w/o: 35759.87/0.00/0.00) lat (ms,95%): 1.44 err/s: 0.00 reconn/s: 0.00
[ 249s ] thds: 32 tps: 35372.19 qps: 35372.53 (r/w/o: 35372.53/0.00/0.00) lat (ms,95%): 1.47 err/s: 0.00 reconn/s: 0.00
[ 252s ] thds: 32 tps: 35397.08 qps: 35396.74 (r/w/o: 35396.74/0.00/0.00) lat (ms,95%): 1.44 err/s: 0.00 reconn/s: 0.00
[ 255s ] thds: 32 tps: 34580.38 qps: 34580.38 (r/w/o: 34580.38/0.00/0.00) lat (ms,95%): 1.44 err/s: 0.00 reconn/s: 0.00
[ 258s ] thds: 32 tps: 35667.25 qps: 35667.25 (r/w/o: 35667.25/0.00/0.00) lat (ms,95%): 1.47 err/s: 0.00 reconn/s: 0.00
[ 261s ] thds: 32 tps: 36840.13 qps: 36840.13 (r/w/o: 36840.13/0.00/0.00) lat (ms,95%): 1.39 err/s: 0.00 reconn/s: 0.00
[ 264s ] thds: 32 tps: 35374.66 qps: 35374.99 (r/w/o: 35374.99/0.00/0.00) lat (ms,95%): 1.47 err/s: 0.00 reconn/s: 0.00
[ 267s ] thds: 32 tps: 33776.33 qps: 33776.00 (r/w/o: 33776.00/0.00/0.00) lat (ms,95%): 1.47 err/s: 0.00 reconn/s: 0.00
[ 270s ] thds: 32 tps: 33850.07 qps: 33850.40 (r/w/o: 33850.40/0.00/0.00) lat (ms,95%): 1.47 err/s: 0.00 reconn/s: 0.00
[ 273s ] thds: 32 tps: 34575.46 qps: 34575.46 (r/w/o: 34575.46/0.00/0.00) lat (ms,95%): 1.47 err/s: 0.00 reconn/s: 0.00
[ 276s ] thds: 32 tps: 34252.38 qps: 34252.05 (r/w/o: 34252.05/0.00/0.00) lat (ms,95%): 1.47 err/s: 0.00 reconn/s: 0.00
[ 279s ] thds: 32 tps: 35647.63 qps: 35647.63 (r/w/o: 35647.63/0.00/0.00) lat (ms,95%): 1.47 err/s: 0.00 reconn/s: 0.00
[ 282s ] thds: 32 tps: 35853.31 qps: 35853.31 (r/w/o: 35853.31/0.00/0.00) lat (ms,95%): 1.50 err/s: 0.00 reconn/s: 0.00
[ 285s ] thds: 32 tps: 35732.21 qps: 35732.21 (r/w/o: 35732.21/0.00/0.00) lat (ms,95%): 1.47 err/s: 0.00 reconn/s: 0.00
[ 288s ] thds: 32 tps: 36694.37 qps: 36694.37 (r/w/o: 36694.37/0.00/0.00) lat (ms,95%): 1.47 err/s: 0.00 reconn/s: 0.00
[ 291s ] thds: 32 tps: 36914.35 qps: 36914.69 (r/w/o: 36914.69/0.00/0.00) lat (ms,95%): 1.50 err/s: 0.00 reconn/s: 0.00
[ 294s ] thds: 32 tps: 36591.38 qps: 36591.05 (r/w/o: 36591.05/0.00/0.00) lat (ms,95%): 1.50 err/s: 0.00 reconn/s: 0.00
[ 297s ] thds: 32 tps: 35680.53 qps: 35680.53 (r/w/o: 35680.53/0.00/0.00) lat (ms,95%): 1.47 err/s: 0.00 reconn/s: 0.00
[ 300s ] thds: 32 tps: 33450.49 qps: 33450.49 (r/w/o: 33450.49/0.00/0.00) lat (ms,95%): 1.47 err/s: 0.00 reconn/s: 0.00
SQL statistics:
    queries performed:
        read:                            10627127
        write:                           0
        other:                           0
        total:                           10627127
    transactions:                        10627127 (35422.90 per sec.)
    queries:                             10627127 (35422.90 per sec.)
    ignored errors:                      0      (0.00 per sec.)
    reconnects:                          0      (0.00 per sec.)

General statistics:
    total time:                          300.0073s
    total number of events:              10627127

Latency (ms):
         min:                                  0.17
         avg:                                  0.90
         max:                                874.53
         95th percentile:                      1.47
         sum:                            9568083.27

Threads fairness:
    events (avg/stddev):           332097.7188/53939.07
    execution time (avg/stddev):   299.0026/0.16

update_index
sysbench –threads=32 –report-interval=3 –max-requests=0 –time=300 /usr/local/share/sysbench/tests/include/oltp_legacy/update_index.lua –mysql-table-engine=innodb –oltp-table-size=800000 –oltp-tables-count=5 –rand-int=on –mysql-socket=/data0/mysql/bin/mysql.sock –mysql-user=root –mysql-password=’ch89^4bnK*O2U7,E’ –db-driver=mysql run >/data0/update_index.log &

[ 240s ] thds: 32 tps: 250.68 qps: 250.68 (r/w/o: 0.00/250.68/0.00) lat (ms,95%): 411.96 err/s: 0.00 reconn/s: 0.00
[ 243s ] thds: 32 tps: 262.33 qps: 262.33 (r/w/o: 0.00/262.33/0.00) lat (ms,95%): 442.73 err/s: 0.00 reconn/s: 0.00
[ 246s ] thds: 32 tps: 273.00 qps: 273.00 (r/w/o: 0.00/273.00/0.00) lat (ms,95%): 356.70 err/s: 0.00 reconn/s: 0.00
[ 249s ] thds: 32 tps: 257.67 qps: 257.67 (r/w/o: 0.00/257.67/0.00) lat (ms,95%): 419.45 err/s: 0.00 reconn/s: 0.00
[ 252s ] thds: 32 tps: 281.67 qps: 281.67 (r/w/o: 0.00/281.67/0.00) lat (ms,95%): 356.70 err/s: 0.00 reconn/s: 0.00
[ 255s ] thds: 32 tps: 276.33 qps: 276.33 (r/w/o: 0.00/276.33/0.00) lat (ms,95%): 427.07 err/s: 0.00 reconn/s: 0.00
[ 258s ] thds: 32 tps: 250.00 qps: 250.00 (r/w/o: 0.00/250.00/0.00) lat (ms,95%): 511.33 err/s: 0.00 reconn/s: 0.00
[ 261s ] thds: 32 tps: 261.33 qps: 261.33 (r/w/o: 0.00/261.33/0.00) lat (ms,95%): 442.73 err/s: 0.00 reconn/s: 0.00
[ 264s ] thds: 32 tps: 267.65 qps: 267.65 (r/w/o: 0.00/267.65/0.00) lat (ms,95%): 458.96 err/s: 0.00 reconn/s: 0.00
[ 267s ] thds: 32 tps: 272.35 qps: 272.35 (r/w/o: 0.00/272.35/0.00) lat (ms,95%): 397.39 err/s: 0.00 reconn/s: 0.00
[ 270s ] thds: 32 tps: 261.33 qps: 261.33 (r/w/o: 0.00/261.33/0.00) lat (ms,95%): 411.96 err/s: 0.00 reconn/s: 0.00
[ 273s ] thds: 32 tps: 256.66 qps: 256.66 (r/w/o: 0.00/256.66/0.00) lat (ms,95%): 442.73 err/s: 0.00 reconn/s: 0.00
[ 276s ] thds: 32 tps: 260.34 qps: 260.34 (r/w/o: 0.00/260.34/0.00) lat (ms,95%): 404.61 err/s: 0.00 reconn/s: 0.00
[ 279s ] thds: 32 tps: 259.67 qps: 259.67 (r/w/o: 0.00/259.67/0.00) lat (ms,95%): 397.39 err/s: 0.00 reconn/s: 0.00
[ 282s ] thds: 32 tps: 262.00 qps: 262.00 (r/w/o: 0.00/262.00/0.00) lat (ms,95%): 475.79 err/s: 0.00 reconn/s: 0.00
[ 285s ] thds: 32 tps: 255.34 qps: 255.34 (r/w/o: 0.00/255.34/0.00) lat (ms,95%): 442.73 err/s: 0.00 reconn/s: 0.00
[ 288s ] thds: 32 tps: 296.99 qps: 296.99 (r/w/o: 0.00/296.99/0.00) lat (ms,95%): 344.08 err/s: 0.00 reconn/s: 0.00
[ 291s ] thds: 32 tps: 261.01 qps: 261.01 (r/w/o: 0.00/261.01/0.00) lat (ms,95%): 458.96 err/s: 0.00 reconn/s: 0.00
[ 294s ] thds: 32 tps: 258.66 qps: 258.66 (r/w/o: 0.00/258.66/0.00) lat (ms,95%): 484.44 err/s: 0.00 reconn/s: 0.00
[ 297s ] thds: 32 tps: 259.00 qps: 259.00 (r/w/o: 0.00/259.00/0.00) lat (ms,95%): 475.79 err/s: 0.00 reconn/s: 0.00
[ 300s ] thds: 32 tps: 267.67 qps: 267.67 (r/w/o: 0.00/267.67/0.00) lat (ms,95%): 427.07 err/s: 0.00 reconn/s: 0.00
SQL statistics:
    queries performed:
        read:                            0
        write:                           65584
        other:                           0
        total:                           65584
    transactions:                        65584  (218.53 per sec.)
    queries:                             65584  (218.53 per sec.)
    ignored errors:                      0      (0.00 per sec.)
    reconnects:                          0      (0.00 per sec.)

General statistics:
    total time:                          300.1090s
    total number of events:              65584

Latency (ms):
         min:                                  0.16
         avg:                                146.40
         max:                               4593.82
         95th percentile:                    475.79
         sum:                            9601757.48

Threads fairness:
    events (avg/stddev):           2049.5000/56.07
    execution time (avg/stddev):   300.0549/0.03

update_non_index
sysbench –threads=32 –report-interval=3 –max-requests=0 –time=300 /usr/local/share/sysbench/tests/include/oltp_legacy/update_non_index.lua –mysql-table-engine=innodb –oltp-table-size=800000 –oltp-tables-count=5 –rand-int=on –mysql-socket=/data0/mysql/bin/mysql.sock –mysql-user=root –mysql-password=’ch89^4bnK*O2U7,E’ –db-driver=mysql run >/data0/update_non_index.log &

[ 246s ] thds: 32 tps: 606.00 qps: 606.00 (r/w/o: 0.00/606.00/0.00) lat (ms,95%): 173.58 err/s: 0.00 reconn/s: 0.00
[ 249s ] thds: 32 tps: 591.34 qps: 591.34 (r/w/o: 0.00/591.34/0.00) lat (ms,95%): 211.60 err/s: 0.00 reconn/s: 0.00
[ 252s ] thds: 32 tps: 597.66 qps: 597.66 (r/w/o: 0.00/597.66/0.00) lat (ms,95%): 189.93 err/s: 0.00 reconn/s: 0.00
[ 255s ] thds: 32 tps: 591.34 qps: 591.34 (r/w/o: 0.00/591.34/0.00) lat (ms,95%): 204.11 err/s: 0.00 reconn/s: 0.00
[ 258s ] thds: 32 tps: 584.66 qps: 584.66 (r/w/o: 0.00/584.66/0.00) lat (ms,95%): 189.93 err/s: 0.00 reconn/s: 0.00
[ 261s ] thds: 32 tps: 601.99 qps: 601.99 (r/w/o: 0.00/601.99/0.00) lat (ms,95%): 189.93 err/s: 0.00 reconn/s: 0.00
[ 264s ] thds: 32 tps: 611.35 qps: 611.35 (r/w/o: 0.00/611.35/0.00) lat (ms,95%): 176.73 err/s: 0.00 reconn/s: 0.00
[ 267s ] thds: 32 tps: 581.32 qps: 581.32 (r/w/o: 0.00/581.32/0.00) lat (ms,95%): 196.89 err/s: 0.00 reconn/s: 0.00
[ 270s ] thds: 32 tps: 612.34 qps: 612.34 (r/w/o: 0.00/612.34/0.00) lat (ms,95%): 200.47 err/s: 0.00 reconn/s: 0.00
[ 273s ] thds: 32 tps: 608.01 qps: 608.01 (r/w/o: 0.00/608.01/0.00) lat (ms,95%): 215.44 err/s: 0.00 reconn/s: 0.00
[ 276s ] thds: 32 tps: 600.33 qps: 600.33 (r/w/o: 0.00/600.33/0.00) lat (ms,95%): 186.54 err/s: 0.00 reconn/s: 0.00
[ 279s ] thds: 32 tps: 588.66 qps: 588.66 (r/w/o: 0.00/588.66/0.00) lat (ms,95%): 215.44 err/s: 0.00 reconn/s: 0.00
[ 282s ] thds: 32 tps: 608.68 qps: 608.68 (r/w/o: 0.00/608.68/0.00) lat (ms,95%): 179.94 err/s: 0.00 reconn/s: 0.00
[ 285s ] thds: 32 tps: 591.63 qps: 591.63 (r/w/o: 0.00/591.63/0.00) lat (ms,95%): 219.36 err/s: 0.00 reconn/s: 0.00
[ 288s ] thds: 32 tps: 599.03 qps: 599.03 (r/w/o: 0.00/599.03/0.00) lat (ms,95%): 204.11 err/s: 0.00 reconn/s: 0.00
[ 291s ] thds: 32 tps: 605.67 qps: 605.67 (r/w/o: 0.00/605.67/0.00) lat (ms,95%): 207.82 err/s: 0.00 reconn/s: 0.00
[ 294s ] thds: 32 tps: 610.33 qps: 610.33 (r/w/o: 0.00/610.33/0.00) lat (ms,95%): 189.93 err/s: 0.00 reconn/s: 0.00
[ 297s ] thds: 32 tps: 587.33 qps: 587.33 (r/w/o: 0.00/587.33/0.00) lat (ms,95%): 207.82 err/s: 0.00 reconn/s: 0.00
[ 300s ] thds: 32 tps: 595.33 qps: 595.33 (r/w/o: 0.00/595.33/0.00) lat (ms,95%): 189.93 err/s: 0.00 reconn/s: 0.00
SQL statistics:
    queries performed:
        read:                            0
        write:                           179940
        other:                           0
        total:                           179940
    transactions:                        179940 (599.74 per sec.)
    queries:                             179940 (599.74 per sec.)
    ignored errors:                      0      (0.00 per sec.)
    reconnects:                          0      (0.00 per sec.)

General statistics:
    total time:                          300.0318s
    total number of events:              179940

Latency (ms):
         min:                                  0.14
         avg:                                 53.35
         max:                                576.32
         95th percentile:                    193.38
         sum:                            9599891.86

Threads fairness:
    events (avg/stddev):           5623.1250/110.69
    execution time (avg/stddev):   299.9966/0.01

delete
sysbench –threads=32 –report-interval=3 –max-requests=0 –time=300 /usr/local/share/sysbench/tests/include/oltp_legacy/delete.lua –mysql-table-engine=innodb –oltp-table-size=800000 –oltp-tables-count=5 –rand-int=on –mysql-socket=/data0/mysql/bin/mysql.sock –mysql-user=root –mysql-password=’ch89^4bnK*O2U7,E’ –db-driver=mysql run >/data0/delete.log &

[ 162s ] thds: 32 tps: 4097.29 qps: 4097.29 (r/w/o: 0.00/896.66/3200.63) lat (ms,95%): 50.11 err/s: 0.00 reconn/s: 0.00
[ 165s ] thds: 32 tps: 3856.72 qps: 3856.72 (r/w/o: 0.00/844.01/3012.71) lat (ms,95%): 57.87 err/s: 0.00 reconn/s: 0.00
[ 168s ] thds: 32 tps: 3897.60 qps: 3897.60 (r/w/o: 0.00/846.65/3050.95) lat (ms,95%): 51.02 err/s: 0.00 reconn/s: 0.00
[ 171s ] thds: 32 tps: 3808.38 qps: 3808.38 (r/w/o: 0.00/839.34/2969.04) lat (ms,95%): 57.87 err/s: 0.00 reconn/s: 0.00
[ 174s ] thds: 32 tps: 4065.99 qps: 4065.99 (r/w/o: 0.00/878.00/3187.99) lat (ms,95%): 50.11 err/s: 0.00 reconn/s: 0.00
[ 177s ] thds: 32 tps: 3924.67 qps: 3924.67 (r/w/o: 0.00/858.00/3066.67) lat (ms,95%): 51.02 err/s: 0.00 reconn/s: 0.00
[ 180s ] thds: 32 tps: 3925.68 qps: 3925.68 (r/w/o: 0.00/857.34/3068.34) lat (ms,95%): 50.11 err/s: 0.00 reconn/s: 0.00
[ 183s ] thds: 32 tps: 3962.33 qps: 3962.33 (r/w/o: 0.00/850.33/3112.00) lat (ms,95%): 50.11 err/s: 0.00 reconn/s: 0.00
[ 186s ] thds: 32 tps: 3961.65 qps: 3961.65 (r/w/o: 0.00/848.00/3113.65) lat (ms,95%): 50.11 err/s: 0.00 reconn/s: 0.00
[ 189s ] thds: 32 tps: 4295.34 qps: 4295.34 (r/w/o: 0.00/888.33/3407.00) lat (ms,95%): 50.11 err/s: 0.00 reconn/s: 0.00
[ 192s ] thds: 32 tps: 3965.16 qps: 3965.16 (r/w/o: 0.00/851.30/3113.87) lat (ms,95%): 50.11 err/s: 0.00 reconn/s: 0.00
[ 195s ] thds: 32 tps: 3963.20 qps: 3963.20 (r/w/o: 0.00/850.71/3112.49) lat (ms,95%): 51.02 err/s: 0.00 reconn/s: 0.00
[ 198s ] thds: 32 tps: 3952.78 qps: 3952.78 (r/w/o: 0.00/834.62/3118.16) lat (ms,95%): 51.02 err/s: 0.00 reconn/s: 0.00
[ 201s ] thds: 32 tps: 3948.19 qps: 3948.19 (r/w/o: 0.00/848.37/3099.81) lat (ms,95%): 51.02 err/s: 0.00 reconn/s: 0.00
[ 204s ] thds: 32 tps: 4125.63 qps: 4125.63 (r/w/o: 0.00/864.33/3261.31) lat (ms,95%): 50.11 err/s: 0.00 reconn/s: 0.00
[ 207s ] thds: 32 tps: 4060.71 qps: 4060.71 (r/w/o: 0.00/857.01/3203.70) lat (ms,95%): 50.11 err/s: 0.00 reconn/s: 0.00
[ 210s ] thds: 32 tps: 4282.01 qps: 4282.01 (r/w/o: 0.00/900.34/3381.68) lat (ms,95%): 49.21 err/s: 0.00 reconn/s: 0.00
[ 213s ] thds: 32 tps: 4000.36 qps: 4000.36 (r/w/o: 0.00/856.01/3144.35) lat (ms,95%): 51.02 err/s: 0.00 reconn/s: 0.00
[ 216s ] thds: 32 tps: 4120.15 qps: 4120.15 (r/w/o: 0.00/869.30/3250.86) lat (ms,95%): 50.11 err/s: 0.00 reconn/s: 0.00
[ 219s ] thds: 32 tps: 4111.45 qps: 4111.45 (r/w/o: 0.00/869.69/3241.76) lat (ms,95%): 50.11 err/s: 0.00 reconn/s: 0.00
[ 222s ] thds: 32 tps: 4256.36 qps: 4256.36 (r/w/o: 0.00/862.34/3394.03) lat (ms,95%): 50.11 err/s: 0.00 reconn/s: 0.00
[ 225s ] thds: 32 tps: 4468.96 qps: 4468.96 (r/w/o: 0.00/913.66/3555.30) lat (ms,95%): 48.34 err/s: 0.00 reconn/s: 0.00
[ 228s ] thds: 32 tps: 4486.38 qps: 4486.38 (r/w/o: 0.00/915.01/3571.37) lat (ms,95%): 49.21 err/s: 0.00 reconn/s: 0.00

SQL statistics:
    queries performed:
        read:                            0
        write:                           260398
        other:                           803378
        total:                           1063776
    transactions:                        1063776 (3545.43 per sec.)
    queries:                             1063776 (3545.43 per sec.)
    ignored errors:                      0      (0.00 per sec.)
    reconnects:                          0      (0.00 per sec.)

General statistics:
    total time:                          300.0418s
    total number of events:              1063776

Latency (ms):
         min:                                  0.05
         avg:                                  9.02
         max:                                401.15
         95th percentile:                     51.94
         sum:                            9597316.08

Threads fairness:
    events (avg/stddev):           33243.0000/394.56
    execution time (avg/stddev):   299.9161/0.01

insert
sysbench –threads=32 –report-interval=3 –max-requests=0 –time=300 /usr/local/share/sysbench/tests/include/oltp_legacy/insert.lua –mysql-table-engine=innodb –oltp-table-size=800000 –oltp-tables-count=5 –rand-int=on –mysql-socket=/data0/mysql/bin/mysql.sock –mysql-user=root –mysql-password=’ch89^4bnK*O2U7,E’ –db-driver=mysql run >/data0/insert.log &

[ 252s ] thds: 32 tps: 767.34 qps: 767.34 (r/w/o: 0.00/767.34/0.00) lat (ms,95%): 92.42 err/s: 0.00 reconn/s: 0.00
[ 255s ] thds: 32 tps: 761.32 qps: 761.32 (r/w/o: 0.00/761.32/0.00) lat (ms,95%): 94.10 err/s: 0.00 reconn/s: 0.00
[ 258s ] thds: 32 tps: 784.34 qps: 784.34 (r/w/o: 0.00/784.34/0.00) lat (ms,95%): 89.16 err/s: 0.00 reconn/s: 0.00
[ 261s ] thds: 32 tps: 778.66 qps: 778.66 (r/w/o: 0.00/778.66/0.00) lat (ms,95%): 90.78 err/s: 0.00 reconn/s: 0.00
[ 264s ] thds: 32 tps: 777.34 qps: 777.34 (r/w/o: 0.00/777.34/0.00) lat (ms,95%): 89.16 err/s: 0.00 reconn/s: 0.00
[ 267s ] thds: 32 tps: 769.33 qps: 769.33 (r/w/o: 0.00/769.33/0.00) lat (ms,95%): 90.78 err/s: 0.00 reconn/s: 0.00
[ 270s ] thds: 32 tps: 780.66 qps: 780.66 (r/w/o: 0.00/780.66/0.00) lat (ms,95%): 90.78 err/s: 0.00 reconn/s: 0.00
[ 273s ] thds: 32 tps: 784.00 qps: 784.00 (r/w/o: 0.00/784.00/0.00) lat (ms,95%): 94.10 err/s: 0.00 reconn/s: 0.00
[ 276s ] thds: 32 tps: 789.00 qps: 789.00 (r/w/o: 0.00/789.00/0.00) lat (ms,95%): 102.97 err/s: 0.00 reconn/s: 0.00
[ 279s ] thds: 32 tps: 767.00 qps: 767.00 (r/w/o: 0.00/767.00/0.00) lat (ms,95%): 99.33 err/s: 0.00 reconn/s: 0.00
[ 282s ] thds: 32 tps: 773.00 qps: 773.00 (r/w/o: 0.00/773.00/0.00) lat (ms,95%): 102.97 err/s: 0.00 reconn/s: 0.00
[ 285s ] thds: 32 tps: 767.63 qps: 767.63 (r/w/o: 0.00/767.63/0.00) lat (ms,95%): 101.13 err/s: 0.00 reconn/s: 0.00
[ 288s ] thds: 32 tps: 783.37 qps: 783.37 (r/w/o: 0.00/783.37/0.00) lat (ms,95%): 90.78 err/s: 0.00 reconn/s: 0.00
[ 291s ] thds: 32 tps: 763.67 qps: 763.67 (r/w/o: 0.00/763.67/0.00) lat (ms,95%): 90.78 err/s: 0.00 reconn/s: 0.00
[ 294s ] thds: 32 tps: 791.65 qps: 791.65 (r/w/o: 0.00/791.65/0.00) lat (ms,95%): 90.78 err/s: 0.00 reconn/s: 0.00
[ 297s ] thds: 32 tps: 784.34 qps: 784.34 (r/w/o: 0.00/784.34/0.00) lat (ms,95%): 94.10 err/s: 0.00 reconn/s: 0.00
[ 300s ] thds: 32 tps: 783.01 qps: 783.01 (r/w/o: 0.00/783.01/0.00) lat (ms,95%): 89.16 err/s: 0.00 reconn/s: 0.00
SQL statistics:
    queries performed:
        read:                            0
        write:                           221743
        other:                           0
        total:                           221743
    transactions:                        221743 (739.06 per sec.)
    queries:                             221743 (739.06 per sec.)
    ignored errors:                      0      (0.00 per sec.)
    reconnects:                          0      (0.00 per sec.)

General statistics:
    total time:                          300.0331s
    total number of events:              221743

Latency (ms):
         min:                                  0.14
         avg:                                 43.29
         max:                                501.81
         95th percentile:                    101.13
         sum:                            9599835.54

Threads fairness:
    events (avg/stddev):           6929.4688/53.50
    execution time (avg/stddev):   299.9949/0.00

bulk_insert
sysbench –threads=32 –report-interval=3 –max-requests=0 –time=300 /usr/local/share/sysbench/tests/include/oltp_legacy/bulk_insert.lua –mysql-table-engine=innodb –oltp-table-size=800000 –oltp-tables-count=5 –rand-int=on –mysql-socket=/data0/mysql/bin/mysql.sock –mysql-user=root –mysql-password=’ch89^4bnK*O2U7,E’ –db-driver=mysql run >/data0/bulk_insert.log &

测试报错:Error in my_thread_global_end(): 1 threads didn’t exit

oltp
sysbench –threads=32 –report-interval=3 –max-requests=0 –time=300 /usr/local/share/sysbench/tests/include/oltp_legacy/oltp.lua –mysql-table-engine=innodb –oltp-table-size=800000 –oltp-tables-count=5 –rand-int=on –mysql-socket=/data0/mysql/bin/mysql.sock –mysql-user=root –mysql-password=’ch89^4bnK*O2U7,E’ –db-driver=mysql run >/data0/oltp.log &

[ 243s ] thds: 32 tps: 293.67 qps: 5872.64 (r/w/o: 4115.65/1030.00/727.00) lat (ms,95%): 219.36 err/s: 0.00 reconn/s: 0.00
[ 246s ] thds: 32 tps: 281.67 qps: 5629.38 (r/w/o: 3936.70/1007.68/685.01) lat (ms,95%): 219.36 err/s: 0.00 reconn/s: 0.00
[ 249s ] thds: 32 tps: 269.66 qps: 5405.92 (r/w/o: 3780.94/968.99/655.99) lat (ms,95%): 231.53 err/s: 0.00 reconn/s: 0.00
[ 252s ] thds: 32 tps: 277.00 qps: 5535.74 (r/w/o: 3877.05/972.68/686.01) lat (ms,95%): 211.60 err/s: 0.00 reconn/s: 0.00
[ 255s ] thds: 32 tps: 280.99 qps: 5614.83 (r/w/o: 3931.88/1006.97/675.98) lat (ms,95%): 227.40 err/s: 0.00 reconn/s: 0.00
[ 258s ] thds: 32 tps: 286.67 qps: 5739.44 (r/w/o: 4017.74/1031.02/690.68) lat (ms,95%): 211.60 err/s: 0.00 reconn/s: 0.00
[ 261s ] thds: 32 tps: 278.67 qps: 5569.39 (r/w/o: 3899.04/985.01/685.34) lat (ms,95%): 223.34 err/s: 0.00 reconn/s: 0.00
[ 264s ] thds: 32 tps: 293.99 qps: 5871.22 (r/w/o: 4107.26/1053.98/709.99) lat (ms,95%): 204.11 err/s: 0.00 reconn/s: 0.00
[ 267s ] thds: 32 tps: 277.34 qps: 5574.44 (r/w/o: 3901.07/996.69/676.68) lat (ms,95%): 227.40 err/s: 0.00 reconn/s: 0.00
[ 270s ] thds: 32 tps: 277.00 qps: 5530.00 (r/w/o: 3875.33/978.33/676.33) lat (ms,95%): 231.53 err/s: 0.00 reconn/s: 0.00
[ 273s ] thds: 32 tps: 251.33 qps: 5064.01 (r/w/o: 3522.34/933.67/608.00) lat (ms,95%): 231.53 err/s: 0.00 reconn/s: 0.00
[ 276s ] thds: 32 tps: 282.99 qps: 5633.80 (r/w/o: 3959.20/989.63/684.98) lat (ms,95%): 227.40 err/s: 0.00 reconn/s: 0.00
[ 279s ] thds: 32 tps: 275.68 qps: 5502.90 (r/w/o: 3861.50/985.71/655.69) lat (ms,95%): 231.53 err/s: 0.00 reconn/s: 0.00
[ 282s ] thds: 32 tps: 279.66 qps: 5602.18 (r/w/o: 3901.56/1037.30/663.31) lat (ms,95%): 219.36 err/s: 0.00 reconn/s: 0.00
[ 285s ] thds: 32 tps: 281.34 qps: 5611.10 (r/w/o: 3945.40/991.68/674.01) lat (ms,95%): 215.44 err/s: 0.00 reconn/s: 0.00
[ 288s ] thds: 32 tps: 292.98 qps: 5867.66 (r/w/o: 4104.43/1067.27/695.96) lat (ms,95%): 211.60 err/s: 0.00 reconn/s: 0.00
[ 291s ] thds: 32 tps: 272.02 qps: 5430.32 (r/w/o: 3802.89/985.72/641.70) lat (ms,95%): 235.74 err/s: 0.00 reconn/s: 0.00
[ 294s ] thds: 32 tps: 269.00 qps: 5377.29 (r/w/o: 3762.97/976.66/637.66) lat (ms,95%): 244.38 err/s: 0.00 reconn/s: 0.00
[ 297s ] thds: 32 tps: 278.00 qps: 5564.75 (r/w/o: 3896.73/1014.68/653.34) lat (ms,95%): 227.40 err/s: 0.00 reconn/s: 0.00
[ 300s ] thds: 32 tps: 288.33 qps: 5771.99 (r/w/o: 4040.66/1052.66/678.66) lat (ms,95%): 223.34 err/s: 0.00 reconn/s: 0.00
SQL statistics:
    queries performed:
        read:                            1287468
        write:                           273807
        other:                           277965
        total:                           1839240
    transactions:                        91962  (306.43 per sec.)
    queries:                             1839240 (6128.59 per sec.)
    ignored errors:                      0      (0.00 per sec.)
    reconnects:                          0      (0.00 per sec.)

General statistics:
    total time:                          300.1083s
    total number of events:              91962

Latency (ms):
         min:                                  2.14
         avg:                                104.41
         max:                                516.60
         95th percentile:                    204.11
         sum:                            9601345.99

Threads fairness:
    events (avg/stddev):           2873.8125/20.75
    execution time (avg/stddev):   300.0421/0.03

你可能感兴趣的:(MySQL压力测试)