https://github.com/akopytov/sysbench#linux
centos 安装
curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.rpm.sh | sudo bash
sudo yum -y install sysbench
sysbench --help 查看帮助
git 下载sysbench项目
git clone git clone https://github.com/akopytov/sysbench.git
进入lua目录执行命令
cd /root/sysbench/src/lua
先执行prepare,再执行run
sysbench oltp_read_write.lua --mysql-host=127.0.0.1 --mysql-port=3306 --mysql-db=test --mysql-user=root --mysql-password=**** --table_size=20000 --tables=1 --threads=500 --events=500000 --report-interval=10 --time=0 prepare
sysbench oltp_read_write.lua --mysql-host=127.0.0.1 --mysql-port=3306 --mysql-db=test --mysql-user=root --mysql-password=**** --table_size=20000 --tables=1 --threads=500 --events=500000 --report-interval=10 --time=0 run
来源:https://blog.csdn.net/gs80140/article/details/100541139