mysql压力测试-sysbench安装及使用说明( 五 )


--mysql-socket=<mysql.sock path> --mysql-db=foo --range_size=100
--table_size=10000 --tables=2 --threads=2 --events=0 --time=60
--rand-type=uniform /usr/share/sysbench/oltp_read_only.lua cleanup
例如我的选项就是:
[root@VM_157_18_centos ~]# sysbench --db-driver=mysql --mysql-user=root --mysql-password=1qaz@WSX --mysql-db=foo --range_size=100 --table_size=10000 --tables=2 --threads=1 --events=0 --time=60 --rand-type=uniform /usr/share/sysbench/oltp_read_only.lua prepare
sysbench 1.0.9 (using system LuaJIT 2.0.4)
Creating table 'sbtest1'...
Inserting 10000 records into 'sbtest1'
Creating a secondary index on 'sbtest1'...
Creating table 'sbtest2'...
Inserting 10000 records into 'sbtest2'
Creating a secondary index on 'sbtest2'...
[root@VM_157_18_centos ~]# sysbench --db-driver=mysql --mysql-user=root --mysql-password=1qaz@WSX --mysql-db=foo --range_size=100 --table_size=10000 --tables=2 --threads=1 --events=0 --time=60 --rand-type=uniform /usr/share/sysbench/oltp_read_only.lua run
sysbench 1.0.9 (using system LuaJIT 2.0.4)
Running the test with following options:
Number of threads: 1
Initializing random number generator from current time
Initializing worker threads...
Threads started!
SQL statistics:
queries performed:
read: 645708
write: 0
other: 92244
total: 737952
transactions: 46122 (768.67 per sec.)
queries: 737952 (12298.73 per sec.)
ignored errors: 0 (0.00 per sec.)
reconnects: 0 (0.00 per sec.)
General statistics:
total time: 60.0003s
total number of events: 46122
Latency (ms):
min: 1.06
avg: 1.30
max: 34.08
95th percentile: 1.50
sum: 59896.08
Threads fairness:
events (avg/stddev): 46122.0000/0
[root@VM_157_18_centos ~]# sysbench --db-driver=mysql --mysql-user=root --mysql-password=1qaz@WSX --mysql-db=foo --range_size=100 --table_size=10000 --tables=2 --threads=1 --events=0 --time=60 --rand-type=uniform /usr/share/sysbench/oltp_read_only.lua cleanup
sysbench 1.0.9 (using system LuaJIT 2.0.4)
sysbench --file-total-size=10G --file-test-mode=rndrw --max-time=180 --max-requests=0 --seqrewr=fileio run




推荐阅读