FIO是测试IOPS
FIO是测试IOPS的非常好的工具,用来对硬件进行压力测试和验证,支持13种不同的I/O引擎,包括:sync,mmap, libaio, posixaio, SG v3, splice, null, network, syslet, guasi, solarisaio 等等。
安装
- 下载地址
wget http://brick.kernel.dk/snaps/fio-2.1.10.tar.gz - centos
- yun install libaio-devel -y
- debian
- apt-get install libaio-dev -y
- 编译安装
tar zxf fio-2.1.10.tar.gzcd fio-2.1.10make && make install
用法、说明
filename=/dev/sdb1 测试文件名称,通常选择需要测试的盘的data目录。
direct=1 测试过程绕过机器自带的buffer。使测试结果更真实。
rw=randwrite 测试随机写的I/O
rw=randrw 测试随机写和读的I/O
bs=16k 单次io的块文件大小为16k
bsrange=512-2048 同上,提定数据块的大小范围
size=5g 本次的测试文件大小为5g,以每次4k的io进行测试。
numjobs=30 本次的测试线程为30.
runtime=1000 测试时间为1000秒,如果不写则一直将5g文件分4k每次写完为止。
ioengine=psync io引擎使用pync方式
rwmixwrite=30 在混合读写的模式下,写占30%
group_reporting 关于显示结果的,汇总每个进程的信息。
此外
lockmem=1g 只使用1g内存进行测试。
zero_buffers 用0初始化系统buffer。
nrfiles=8 每个进程生成文件的数量。
顺序写性能
fio --filename=/data/test --iodepth=64 --ioengine=libaio --direct=1 --rw=write --bs=4k --size=500m --numjobs=4 --runtime=10 --group_reporting --name=test-write顺序读性能
fio --filename=/data/test --iodepth=64 --ioengine=libaio --direct=1 --rw=read --bs=4k --size=500m --numjobs=4 --runtime=10 --group_reporting --name=test-read随机读性能
fio --filename=/data/test -iodepth=64 --ioengine=libaio --direct=1 --rw=randread --bs=4k --size=500M --numjobs=64 --runtime=20 --group_reporting --name=test-rand-read随机写性能
fio --filename=/data/test --iodepth=64 --ioengine=libaio --direct=1 --rw=randwrite --bs=4k --size=500M --numjobs=64 --runtime=20 --group_reporting --name=test-rand-write随机读写
fio --filename=/data/test --iodepth=64 --ioengine=libaio --direct=1 --rw=randrw --bs=4k --size=500M --numjobs=64 --runtime=20 --group_reporting --name=test-rand-readwrite
ucloud实际测试样例
[root@leoieo # fio --filename=/data/test --iodepth=64 --ioengine=libaio --direct=1 --rw=randrw --bs=4k --size=500M --numjobs=64 --runtime=20 --group_reporting --name=test-rand-readwrite
test-rand-readwrite: (g=0): rw=randrw, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=64
...
test-rand-readwrite: (g=0): rw=randrw, bs=4K-4K/4K-4K, ioengine=libaio, iodepth=64
fio 2.0.7
Starting 64 processes
test-rand-readwrite: Laying out IO file(s) (1 file(s) / 500MB)
Jobs: 64 (f=64):
.....
test-rand-readwrite: (groupid=0, jobs=64): err= 0: pid=27106
read : io=1254.7MB, bw=63827KB/s, iops=15956 , runt= 20128msec
slat (usec): min=2 , max=362246 , avg=1939.96, stdev=20054.83
clat (usec): min=11 , max=822072 , avg=114432.56, stdev=116574.10
lat (usec): min=41 , max=822081 , avg=116375.98, stdev=117044.89
clat percentiles (usec):
| 1.00th=[ 418], 5.00th=[ 604], 10.00th=[ 692], 20.00th=[ 828],
| 30.00th=[ 1048], 40.00th=[ 3120], 50.00th=[98816], 60.00th=[115200],
| 70.00th=[205824], 80.00th=[246784], 90.00th=[288768], 95.00th=[296960],
| 99.00th=[317440], 99.50th=[411648], 99.90th=[528384], 99.95th=[577536],
| 99.99th=[618496]
bw (KB/s) : min= 149, max= 2782, per=1.58%, avg=1011.31, stdev=501.25
write: io=1253.0MB, bw=63746KB/s, iops=15936 , runt= 20128msec
slat (usec): min=3 , max=370177 , avg=1946.49, stdev=20060.74
clat (usec): min=10 , max=822032 , avg=136414.77, stdev=118302.48
lat (usec): min=346 , max=894660 , avg=138365.58, stdev=119001.95
clat percentiles (usec):
| 1.00th=[ 636], 5.00th=[ 748], 10.00th=[ 836], 20.00th=[ 1048],
| 30.00th=[ 2864], 40.00th=[96768], 50.00th=[111104], 60.00th=[162816],
| 70.00th=[222208], 80.00th=[276480], 90.00th=[292864], 95.00th=[301056],
| 99.00th=[378880], 99.50th=[501760], 99.90th=[577536], 99.95th=[593920],
| 99.99th=[692224]
bw (KB/s) : min= 30, max= 2778, per=1.58%, avg=1007.37, stdev=499.86
lat (usec) : 20=0.01%, 50=0.01%, 100=0.01%, 250=0.12%, 500=0.76%
lat (usec) : 750=8.93%, 1000=13.61%
lat (msec) : 2=10.84%, 4=1.15%, 10=0.84%, 20=0.42%, 50=0.26%
lat (msec) : 100=9.27%, 250=31.68%, 500=21.65%, 750=0.44%, 1000=0.01%
cpu : usr=0.17%, sys=0.62%, ctx=18901, majf=0, minf=1896
IO depths : 1=0.1%, 2=0.1%, 4=0.1%, 8=0.1%, 16=0.2%, 32=0.3%, >=64=99.4%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.1%, >=64=0.0%
issued : total=r=321176/w=320768/d=0, short=r=0/w=0/d=0 Run status group 0 (all jobs):
READ: io=1254.7MB, aggrb=63826KB/s, minb=63826KB/s, maxb=63826KB/s, mint=20128msec, maxt=20128msec
WRITE: io=1253.0MB, aggrb=63745KB/s, minb=63745KB/s, maxb=63745KB/s, mint=20128msec, maxt=20128msec Disk stats (read/write):
vdb: ios=320605/320220, merge=2/27, ticks=437742/1156547, in_queue=1593987, util=98.64%
关于使用dd进行读写测试
- 4k 10万次写
dd if=/dev/zero of=/data/test bs=4k count=100000
100000+0 records in
100000+0 records out
409600000 bytes (410 MB) copied, 0.87704 s, 467 MB/s - 4k 10万次读
dd if=/data/test of=/dev/null bs=4k count=100000
100000+0 records in
100000+0 records out
409600000 bytes (410 MB) copied, 0.111689 s, 3.7 GB/s - 4k 10万次读写
dd if=/data/test of=/data/test.txt bs=4k count=100000
100000+0 records in
100000+0 records out
409600000 bytes (410 MB) copied, 0.776348 s, 528 MB/s
FIO是测试IOPS的更多相关文章
- 使用FIO工具测试块存储性能
Linux实例和Windows实例都推荐使用FIO工具测试块存储性能. 说明 您也可以使用其他工具测试块存储性能,但不同工具测试出来的硬盘基准性能会有差异,如dd.sysbench.iometer ...
- FIO read测试结果偏离
工作中发现一个fio问题,测试组测试出来的数据read速度一个是17.0G/s,一个是13.2G/s.要知道我后台只有24块7.2k RPM的机械硬盘啊!怎么也不可能有这样的速度. 回家之后我模拟了实 ...
- fio 硬盘测试工具
一.windows环境 1. 安装fio:http://www.bluestop.org/fio/ 可以选择不同版本的安装,安装后在C:\Program Files\fio目录中可以找到fio的执行程 ...
- FIO 测试磁盘iops 以及读写
最近在做mariadb的性能,感觉io 有瓶颈,就使用fio 来测试一下磁盘.下文为转载文章(温馨提示:此命令很伤硬盘,测试前请备份数据,- -我就写坏了一个.) FIO 是测试IOPS的非常好的工具 ...
- linux使用FIO测试磁盘的iops 【转载】
linux使用FIO测试磁盘的iops 2013-09-23 10:59:21 分类: LINUX FIO是测试IOPS的非常好的工具,用来对硬件进行压力测试和验证,支持13种不同的I/O引擎,包括 ...
- linux使用FIO测试磁盘的iops
FIO是测试IOPS的非常好的工具,用来对硬件进行压力测试和验证,支持13种不同的I/O引擎,包括:sync,mmap, libaio, posixaio, SG v3, splice, null, ...
- 使用FIO测试磁盘iops
我们如何衡量一个存储的性能呢?IOPS(Input/Output OperationsPer Second),即每秒进行读写(I/O)操作的次数是国际上通用的存储性能衡量标准,IOPS越高意味着在同一 ...
- FIO测试磁盘的iops
FIO是测试IOPS的非常好的工具,用来对硬件进行压力测试和验证,支持13种不同的I/O引擎,包括:sync,mmap, libaio, posixaio, SG v3, splice, null, ...
- Linux下使用FIO测试磁盘的IOPS
FIO是测试IOPS的非常好的工具,用来对硬件进行压力测试和验证,支持13种不同的I/O引擎,包括:sync,mmap, libaio, posixaio, SG v3, splice, null, ...
随机推荐
- Windows7下安装MongoDB
1.下载地址:http://www.mongodb.org/downloads(32位还是64位自行选择).我下载的是:mongodb-win32-x86_64-2.4.5.zip 2.解压把mong ...
- 在Web应用中接入微信支付的流程之极简清晰版 (转)
在Web应用中接入微信支付的流程之极简清晰版 背景: 在Web应用中接入微信支付,我以为只是调用几个API稍作调试即可. 没想到微信的API和官方文档里隐坑无数,致我抱着怀疑人生的心情悲愤踩遍了丫们布 ...
- 让mysql有直接写redis能力
1.文件包下载 http://pan.baidu.com/s/1qW9DHYc 2.安装 gcc -fPIC -Wall -I/usr/local/mysql/include/mysql -I. -s ...
- 通过/etc/rc.local实现开机自动拉起服务
添加服务到/etc/rc.local 如自动拉起apache服务: /etc/rc.local: #!/bin/sh # # This script will be executed *after* ...
- spring源码学习之路---深入AOP(终)
作者:zuoxiaolong8810(左潇龙),转载请注明出处,特别说明:本博文来自博主原博客,为保证新博客中博文的完整性,特复制到此留存,如需转载请注明新博客地址即可. 上一章和各位一起看了一下sp ...
- php关于金额比较引发的问题(转)
做电子商务的时候一般会涉及到金额的比较,按正常的思路来看用><=这些个符号就可以了.可是要是到程序上来搞这个的话就出大事了.现在看下这段代码: $f = 0.07; var_dump($f ...
- 黑马程序员----java基础笔记上(毕向东)
------Java培训.Android培训.iOS培训..Net培训.期待与您交流! ------- 笔记一共记录了毕向东的java基础的25天课程,分上.中.下 本片为上篇,涵盖前10天课程 1. ...
- Oracle函数解析
一:大小写控制函数 lower()函数:(此函数将全部的大写字母都可以变为小写字母) upper()函数:(将输入的字符串变为大写字母) initcap()函数:(将每个字符串的首字母大写) 二:字 ...
- [LintCode] Happy Number 快乐数
Write an algorithm to determine if a number is happy. A happy number is a number defined by the foll ...
- [LintCode] Paint Fence 粉刷篱笆
There is a fence with n posts, each post can be painted with one of the k colors.You have to paint a ...