• sysbench fileio 压力测试


    备注:
      使用的是yum 安装
     
    1. 安装
    yum install -y sysbench
    2. 命令
    fileio options:
      --file-num=N              number of files to create [128]
      --file-block-size=N       block size to use in all IO operations [16384]
      --file-total-size=SIZE    total size of files to create [2G]
      --file-test-mode=STRING   test mode {seqwr, seqrewr, seqrd, rndrd, rndwr, rndrw}
      --file-io-mode=STRING     file operations mode {sync,async,mmap} [sync]
      --file-async-backlog=N    number of asynchronous operatons to queue per thread [128]
      --file-extra-flags=STRING additional flags to use on opening files {sync,dsync,direct} []
      --file-fsync-freq=N       do fsync() after this number of requests (0 - don't use fsync()) [100]
      --file-fsync-all[=on|off] do fsync() after each write operation [off]
      --file-fsync-end[=on|off] do fsync() at the end of test [on]
      --file-fsync-mode=STRING  which method to use for synchronization {fsync, fdatasync} [fsync]
      --file-merged-requests=N  merge at most this number of IO requests if possible (0 - don't merge) [0]
      --file-rw-ratio=N         reads/writes ratio for combined test [1.5]
    3. 使用
    // 数据准备
    sysbench fileio  --file-num=1000  --file-test-mode=seqwr prepare
    // 运行
    sysbench fileio  --file-num=1000  --file-test-mode=seqwr run
    // 清理
    sysbench fileio  --file-num=1000  --file-test-mode=seqwr cleanup
    4. 问题
    a.FATAL: Too large position discovered in request!
    
    --file-num  --file-block-size   --file-total-size 参数必须能够整除
    
    b. ulimit 限制
       临时调整 ulimit 65535,同时也可以参考类似的文章进行修改
    c. 对于指定的 --file-test-mode prepare run 必须一致
    5. 参考资料
    https://github.com/akopytov/sysbench
  • 相关阅读:
    Node.js Net 模块+DNS 模块
    php程序报500错误
    Node.js 工具模块-OS模块+path模块
    Node.js GET/POST请求
    Canvas动画+canvas离屏技术
    Python OS 模块
    Python random 模块
    Python time 模块
    Python 迭代器
    Python 生成器
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/7890370.html
Copyright © 2020-2023  润新知