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

posted on 2017-11-24 14:13  荣锋亮  阅读(308)  评论(0编辑  收藏  举报

导航