sysbench mysqlj基准测试

1.安装 部分省略 

2.sysbench --version  1.0.20

cd /usr/share/sysbench

2.1.数据准备
#sysbench --test=/usr/local/share/sysbench/oltp_write_only.lua --mysql-host=xx --mysql-port=3306 --mysql-user=xxx--mysql-password=xxx --mysql-db=test --report-interval=10 --max-requests=0 --time=120 --threads=4500 --tables=10 --table-size=100000 prepare

sysbench oltp_common.lua --time=300 --mysql-host=xxx --mysql-port=3306 --mysql-user=xxx --mysql-password=xxx --mysql-db=test --table-size=1000000 --tables=10 --threads=32 --events=999999999 prepare

2.2.运行测试
#sysbench --test=/usr/local/share/sysbench/oltp_write_only.lua --mysql-host=xxx --mysql-port=3306 --mysql-user=xxx--mysql-password=xxx --mysql-db=test --report-interval=10 --max-requests=0 --time=120 --threads=20 --tables=10 --table-size=100000 run

sysbench oltp_read_write.lua --time=300 --mysql-host=127.0.0.1 --mysql-port=3306 --mysql-user=root --mysql-password=MyNewPass4! --mysql-db=sbtest --table-size=1000000 --tables=10 --threads=16 --events=999999999  --report-interval=10  run
 

2.3.清理数据:
#sysbench --test=/usr/local/share/sysbench/oltp_write_only.lua --mysql-host=xx --mysql-port=3306 --mysql-user=xxx--mysql-password=xxx--mysql-db=test --report-interval=10 --max-requests=0 --time=120 --threads=20 --tables=10 --table-size=100000 cleanup

sysbench oltp_read_write.lua --time=300 --mysql-host=127.0.0.1 --mysql-port=3306 --mysql-user=root --mysql-password=MyNewPass4! --mysql-db=sbtest --table-size=1000000 --tables=10 --threads=16 --events=999999999  --report-interval=10  cleanup
 

 

3.注意:

数据库名称为test 需要真实存在新建

生成报告:

tps(事务/s)   qps:read/requests

posted @   小美丫  阅读(39)  评论(1编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 【译】Visual Studio 中新的强大生产力特性
· 【设计模式】告别冗长if-else语句:使用策略模式优化代码结构
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
点击右上角即可分享
微信分享提示