sysbench --with-mysql-libs_sysbench使用笔记

文件IO基准测试 / File I/O test

测试系统在不同IO负载下的IOPS性能

准备工作(创建测试文件)

sysbench --test=fileio --num-threads=2 --file-total-size=4G --file-test-mode=rndrw prepare

测试

sysbench --test=fileio --num-threads=2 --file-total-size=4G --file-test-mode=rndrw run

清理测试文件

sysbench --test=fileio --num-threads=2 --file-total-size=4G --file-test-mode=rndrw cleanup

./sysbench --test=fileio --num-threads=2 --file-total-size=4G --file-test-mode=rndrw run

sysbench 0.5:  multi-threaded system evaluation benchmark

Running the test with following options:

Number of threads: 2

Random number generator seed is 0 and will be ignored

Extra file open flags: 0

128 files, 32Mb each

4Gb total file size

Block size 16Kb

Number of IO requests: 10000

Read/Write ratio for combined random IO test: 1.50

Periodic FSYNC enabled, calling fsync() each 100 requests.

Calling fsync() at the end of test, Enabled.

Using synchronous I/O mode

Doing random r/w test

Threads started!

Operations performed:  5999 reads, 4001 writes, 12800 Other = 22800 Total

Read 93.734Mb  Written 62.516Mb  Total transferred 156.25Mb  (9.1877Mb/sec)

588.01 Requests/sec executed

General statistics:

total time:                          17.0064s

total number of events:              10000

total time taken by event execution: 0.6489s

response time:

min:                                  0.00ms

avg:                                  0.06ms

max:                                 97.59ms

approx.  95 percentile:               0.03ms

Threads fairness:

events (avg/stddev):           5000.0000/618.00

execution time (avg/stddev):   0.3245/0.06

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}

seqwr 顺序写入 seqrewr 顺序重写 seqrd 顺序读取 rndrd 随机读取 rndwr 随机写入 rndrw 混合随机读/写

--file-io-mode=STRING         file operations mode {sync,async,mmap} [sync]

--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]

引用网上的一段总结

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值