zoukankan      html  css  js  c++  java
  • 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]

  • 相关阅读:
    JSP第四周作业
    JSP第二次作业
    软件测试1
    2021web课程设计
    面向对象程序综合设计课程设计-大富翁(个人博客)
    对于《提问回顾与个人总结》评论的回复
    难遇伯乐,幸得钟期——提问回顾与个人总结
    黄衫女子,黄衫好.png
    当遇到点炒饭的顾客——结对项目总结
    山鸣谷应,相得益彰——杰对项目-第二阶段总结
  • 原文地址:https://www.cnblogs.com/h-gallop/p/11646140.html
Copyright © 2011-2022 走看看