mysql的压力测试工具_mysql 压力测试工具sysbench

2.1 只读示例

修改配置文件,参数调优后,查询性能几乎没有变化

./bin/sysbench --test=/usr/share/sysbench/tests/include/oltp_legacy/oltp.lua

--mysql-host=192.168.80.134 --mysql-port=3306 --mysql-user=root --mysql-password=root123

--mysql-db=sbtest --oltp-tables-count=10 --oltp-table-size=1000000

--report-interval=10 --oltp-dist-type=uniform --rand-init=on --max-requests=0

--oltp-test-mode=nontrx --oltp-nontrx-mode=select

--oltp-read-only=on --oltp-skip-trx=on

--time=120 --threads=128 \

[prepare|run|cleanup]

生成数据|运行测试|清除数据

2.2混合读写

性能调优后,变化明显

.bin/sysbench --test=/usr/share/sysbench/tests/include/oltp_legacy/oltp.lua

--mysql-host=192.168.80.134 --mysql-port=3306 --mysql-user=root --mysql-password=root123

--mysql-db=sbtest --oltp-tables-count=10 --oltp-table-size=100000

--report-interval=10 --rand-init=on --max-requests=0 --oltp-test-mode=nontrx

--oltp-nontrx-mode=select

--oltp-read-only=off

--time=120 --threads=128 prepare

[prepare|run|cleanup]

2.3修改数据只写测试

性能调优后,变化明显

.bin/sysbench --test=/usr/share/sysbench/tests/include/oltp_legacy/update_index.lua

--mysql-host=192.168.80.134 --mysql-port=3306 --mysql-user=root --mysql-password=root123

--mysql-db=sbtest --oltp-tables-count=10 --oltp-table-size=100000

--report-interval=10 --rand-init=on --max-requests=0 --oltp-test-mode=nontrx

--oltp-nontrx-mode=select

--oltp-read-only=off

--time=120 --threads=128 prepare

[prepare|run|cleanup]

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值