FIO是测试IOPS的非常好的工具,用来对硬件进行压力测试和验证,支持13种不同的I/O引擎,包括:sync,mmap, libaio, posixaio, SG v3, splice, null, network, syslet, guasi, solarisaio 等等。 
fio 官网地址:http://freshmeat.net/projects/fio/ 
一,FIO安装 
wget http://brick.kernel.dk/snaps/fio-2.0.7.tar.gz 
yum install libaio-devel 
tar -zxvf fio-2.0.7.tar.gz 
cd fio-2.0.7 
make 
make install 
二,随机读测试: 
随机读: 
fio -filename=/dev/sdb1 -direct=1 -iodepth 1 -thread -rw=randread -ioengine=psync -bs=16k -size=200G -numjobs=10 -runtime=1000 -group_reporting -name=mytest 
说明: 
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=/dev/sdb1 -direct=1 -iodepth 1 -thread -rw=read -ioengine=psync -bs=16k -size=200G -numjobs=30 -runtime=1000 -group_reporting -name=mytest 
随机写: 
fio -filename=/dev/sdb1 -direct=1 -iodepth 1 -thread -rw=randwrite -ioengine=psync -bs=16k -size=200G -numjobs=30 -runtime=1000 -group_reporting -name=mytest 
顺序写: 
fio -filename=/dev/sdb1 -direct=1 -iodepth 1 -thread -rw=write -ioengine=psync -bs=16k -size=200G -numjobs=30 -runtime=1000 -group_reporting -name=mytest 
混合随机读写: 
fio -filename=/dev/sdb1 -direct=1 -iodepth 1 -thread -rw=randrw -rwmixread=70 -ioengine=psync -bs=16k -size=200G -numjobs=30 -runtime=100 -group_reporting -name=mytest -ioscheduler=noop 
三,实际测试范例: 
[root@localhost ~]# fio -filename=/dev/sdb1 -direct=1 -iodepth 1 -thread -rw=randrw -rwmixread=70 -ioengine=psync -bs=16k -size=200G -numjobs=30 -runtime=100 -group_reporting -name=mytest1 
mytest1: (g=0): rw=randrw, bs=16K-16K/16K-16K, ioengine=psync, iodepth=1 
... 
mytest1: (g=0): rw=randrw, bs=16K-16K/16K-16K, ioengine=psync, iodepth=1 
fio 2.0.7 
Starting 30 threads 
Jobs: 1 (f=1): [________________m_____________] [3.5% done] [6935K/3116K /s] [423 /190 iops] [eta 48m:20s] s] 
mytest1: (groupid=0, jobs=30): err= 0: pid=23802 
read : io=1853.4MB, bw=18967KB/s, iops=1185 , runt=100058msec 
clat (usec): min=60 , max=871116 , avg=25227.91, stdev=31653.46 
lat (usec): min=60 , max=871117 , avg=25228.08, stdev=31653.46 
clat percentiles (msec): 
| 1.00th=[ 3], 5.00th=[ 5], 10.00th=[ 6], 20.00th=[ 8], 
| 30.00th=[ 10], 40.00th=[ 12], 50.00th=[ 15], 60.00th=[ 19], 
| 70.00th=[ 26], 80.00th=[ 37], 90.00th=[ 57], 95.00th=[ 79], 
| 99.00th=[ 151], 99.50th=[ 202], 99.90th=[ 338], 99.95th=[ 383], 
| 99.99th=[ 523] 
bw (KB/s) : min= 26, max= 1944, per=3.36%, avg=636.84, stdev=189.15 
write: io=803600KB, bw=8031.4KB/s, iops=501 , runt=100058msec 
clat (usec): min=52 , max=9302 , avg=146.25, stdev=299.17 
lat (usec): min=52 , max=9303 , avg=147.19, stdev=299.17 
clat percentiles (usec): 
| 1.00th=[ 62], 5.00th=[ 65], 10.00th=[ 68], 20.00th=[ 74], 
| 30.00th=[ 84], 40.00th=[ 87], 50.00th=[ 89], 60.00th=[ 90], 
| 70.00th=[ 92], 80.00th=[ 97], 90.00th=[ 120], 95.00th=[ 370], 
| 99.00th=[ 1688], 99.50th=[ 2128], 99.90th=[ 3088], 99.95th=[ 3696], 
| 99.99th=[ 5216] 
bw (KB/s) : min= 20, max= 1117, per=3.37%, avg=270.27, stdev=133.27 
lat (usec) : 100=24.32%, 250=3.83%, 500=0.33%, 750=0.28%, 1000=0.27% 
lat (msec) : 2=0.64%, 4=3.08%, 10=20.67%, 20=19.90%, 50=17.91% 
lat (msec) : 100=6.87%, 250=1.70%, 500=0.19%, 750=0.01%, 1000=0.01% 
cpu : usr=1.70%, sys=2.41%, ctx=5237835, majf=0, minf=6344162 
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0% 
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.0%, >=64=0.0% 
issued : total=r=118612/w=50225/d=0, short=r=0/w=0/d=0 
Run status group 0 (all jobs): 
READ: io=1853.4MB, aggrb=18966KB/s, minb=18966KB/s, maxb=18966KB/s, mint=100058msec, maxt=100058msec 
WRITE: io=803600KB, aggrb=8031KB/s, minb=8031KB/s, maxb=8031KB/s, mint=100058msec, maxt=100058msec 
Disk stats (read/write): 
sdb: ios=118610/50224, merge=0/0, ticks=2991317/6860, in_queue=2998169, util=99.77% 
主要查看以上粗体部分的iops 

FIO测试磁盘的iops的更多相关文章

  1. linux使用FIO测试磁盘的iops 【转载】

     linux使用FIO测试磁盘的iops 2013-09-23 10:59:21 分类: LINUX FIO是测试IOPS的非常好的工具,用来对硬件进行压力测试和验证,支持13种不同的I/O引擎,包括 ...

  2. linux使用FIO测试磁盘的iops

    FIO是测试IOPS的非常好的工具,用来对硬件进行压力测试和验证,支持13种不同的I/O引擎,包括:sync,mmap, libaio, posixaio, SG v3, splice, null, ...

  3. Linux下使用FIO测试磁盘的IOPS

    FIO是测试IOPS的非常好的工具,用来对硬件进行压力测试和验证,支持13种不同的I/O引擎,包括:sync,mmap, libaio, posixaio, SG v3, splice, null, ...

  4. linux 使用 FIO 测试磁盘的iops

    原文链接:https://www.iteye.com/blog/elf8848-2168876 一,FIO安装wget http://brick.kernel.dk/snaps/fio-2.2.5.t ...

  5. [记录]FIO测试磁盘iops性能

    FIO测试磁盘iops性能 1.SATA和SAS盘原生IOPS如下: 2.RAID磁盘阵列对应的写惩罚级别: 3.计算功能性IOPS公式如下: 功能性 IOPS=(((总原生 IOPS×写 %))/( ...

  6. 使用FIO测试磁盘iops

    我们如何衡量一个存储的性能呢?IOPS(Input/Output OperationsPer Second),即每秒进行读写(I/O)操作的次数是国际上通用的存储性能衡量标准,IOPS越高意味着在同一 ...

  7. linux 使用FIO测试磁盘iops 方法详解

    FIO是测试IOPS的非常好的工具,用来对硬件进行压力测试和验证,支持13种不同的I/O引擎, 包括:sync,mmap, libaio, posixaio, SG v3, splice, null, ...

  8. fio 测试磁盘

    root@rook-test:/# ceph osd status+----+-----------------------------+-------+-------+--------+------ ...

  9. CentOS中使用FIO测试磁盘IO性能

    $ yum install fio 0x02 命令 随机读: $ fio -filename=/dev/sda1 -direct=1 -iodepth 1 -thread -rw=randread - ...

随机推荐

  1. FunDA(4)- 数据流内容控制:Stream data element control

    上节我们探讨了通过scalaz-stream-fs2来驱动一套数据处理流程,用fs2的Pipe类型来实现对数据流的逐行操作.本篇讨论准备在上节讨论的基础上对数据流的流动和元素操作进行优化完善.如数据流 ...

  2. about BFC

    https://www.cnblogs.com/lhb25/p/inside-block-formatting-ontext.html Box.Formatting Context(BFC)

  3. javascript浅拷贝深拷贝理解记录

    javascript的深拷贝和浅拷贝问题几乎是面试必问的问题.好记性不如烂笔头,特此来记录一下自己对深拷贝浅拷贝的理解. 顾名思义,拷贝就是copy复制,在js中可以浅而理解为对一个对象或者数组的复制 ...

  4. css字体中英速查表

    例1(小米米官网):font-family: "Arial","Microsoft YaHei","黑体","宋体",s ...

  5. POJ 1018

    #include<iostream> #define MAXN 105 #define inf 10000000 #include<vector> #include<io ...

  6. 服务器集群的session管理

    应用服务器的高可用架构设计主要基于服务无状态这一特性,但是事实上,业务总是有状态的,单机情况下,Session可由部署在服务器上的web容器(如Jboss)管理.在使用负载均衡的集群环境中,由于负载均 ...

  7. 社区发现的3个评估指标:标准化互信息NMI,ARI指标,以及模块度(modularity)

    转载请注明出处:http://www.cnblogs.com/bethansy/p/6890972.html 一.已知真实社区划分结果 1.NMI指数,互信息和标准化互信息 具体公式和matlab代码 ...

  8. Vue-Router路由Vue-CLI脚手架和模块化开发 之 使用props替代路由对象的方式获取参数

    在上一章博文中使用路由对象$route获取参数时,组件和路由对象耦合,在这篇博文中就可以使用props来进行解耦: 1.在组件中使用props选项定义数据,接收参数: 2.在路由中,使用props选项 ...

  9. 剑指offer四十一之和为S的连续正数序列

    一.题目   题目描述:小明很喜欢数学,有一天他在做数学作业时,要求计算出9~16的和,他马上就写出了正确答案是100.但是他并不满足于此,他在想究竟有多少种连续的正数序列的和为100(至少包括两个数 ...

  10. Linux的文件的打包(tar方法)

    Linux的文件的打包(tar方法) tar -c: 建立压缩档案 -x:解压 -t:查看内容 -r:向压缩归档文件末尾追加文件 -u:更新原压缩包中的文件 这五个是独立的命令,压缩解压都要用到其中一 ...