更新时间:2022-10-07 11:02:08
下载
1
|
# bzr branch lp:sysbench |
安装依赖库
1
|
# apt-get install libtool.* |
安装
1
2
3
4
5
|
# cd sysbench # ./autogen.sh # ./configure --with-mysql-includes=/usr/local/mysql/include --with-mysql-libs=/usr/local/mysql/lib # make # make install |
使用
1
2
3
4
5
6
7
8
9
10
11
|
sysbench -- test = /root/sysbench0 .5 /sysbench/tests/db/oltp .lua
--mysql-table-engine=innodb --oltp-table-size=1000000 --max-requests=0--max- time =300
--num-threads=16 --oltp-tables-count=10 --report-interval=10 --mysql-host=10.8.8.100 --mysql-port=3312 --mysql-user=admin --mysql-password=123456 --mysql-db= test run |
新版本加入了多张表,--oltp-tables-count=参数指定有几张表。
--report-interval=10参数表示每隔10分钟,显示一下TPS信息。
新版本效果
并且还包含了更多的测试脚本,如只插入、删除、更新。