zoukankan      html  css  js  c++  java
  • 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
  • 相关阅读:
    Qual IPE中的Crop计算
    TinyCC安装
    C编译器(TCC)
    Macros之PRId64
    shell脚本学习 (10) 从结构化文本提取数据
    shell脚本学习 (9) 提取开头或结尾的几行
    shell脚本学习 (8) fmt 格式化段落
    接触python的第2天:了解变量和打印
    接触python的第1天:测试hello world
    shell脚本学习(7)sort
  • 原文地址:https://www.cnblogs.com/rongfengliang/p/7890370.html
Copyright © 2011-2022 走看看