--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
推荐阅读
- 常用的MySQL数据库管理工具有哪些
- 详解mysql数据库double write原理、性能影响及相关参数
- 月薪20K软件测试开发岗基础知识总结,揭开测试工程师的进阶之路
- mysql数据库基本增删改查操作总结
- Windows|微软偷师苹果 Windows 11测试新功能:无需打开快速预览文件
- 利用shell脚本运行MYSQL语句,并在mysql中执行shell脚本
- 一份非常完整、详细的MySQL规范
- MySQL和PostgreSQL在多表连接算法上的差异
- 白帽黑客常用的5大渗透测试系统测评
- 作为一名数据库管理员,应该知道MySQL和Oracle的区别
