FIO参数

filename=/export/.txt 支持文件系统或者裸设备,-filename=/dev/sda2或-filename=/dev/sdb
direct= 测试过程绕过机器自带的buffer,使测试结果更真实
rw=randwread 测试随机读的I/O
rw=randwrite 测试随机写的I/O
rw=randrw 测试随机混合写和读的I/O
rw=read 测试顺序读的I/O
rw=write 测试顺序写的I/O
rw=rw 测试顺序混合写和读的I/O
bs=4k 单次io的块文件大小为4k
bsrange=- 同上,提定数据块的大小范围
size=5g 本次的测试文件大小为5g,以每次4k的io进行测试
numjobs= 本次的测试线程为30
runtime= 测试时间为1000秒,如果不写则一直将5g文件分4k每次写完为止
ioengine=psync io引擎使用pync方式,如果要使用libaio引擎,需要yum install libaio-devel包
rwmixwrite= 在混合读写的模式下,写占30%
group_reporting 关于显示结果的,汇总每个进程的信息
lockmem=1g 只使用1g内存进行测试
zero_buffers 用0初始化系统buffer
nrfiles= 每个进程生成文件的数量

ioengine参数

sync:Basic read(2) or write(2) I/O. fseek(2) is used to position the I/O location.

psync:Basic pread(2) or pwrite(2) I/O.

vsync: Basic readv(2) or writev(2) I/O. Will emulate queuing by coalescing adjacents IOs into a single submission.

libaio: Linux native asynchronous I/O.

posixaio: glibc POSIX asynchronous I/O using aio_read(3) and aio_write(3).

mmap: File is memory mapped with mmap(2) and data copied using memcpy(3).

splice: splice(2) is used to transfer the data and vmsplice(2) to transfer data from user-space to the kernel.

syslet-rw: Use the syslet system calls to make regular read/write asynchronous.

sg:SCSI generic sg v3 I/O.

net : Transfer over the network. filename must be set appropriately to `host/port’ regardless of data direction. If receiving,only the port argument is used.

netsplice: Like net, but uses splice(2) and vmsplice(2) to map data and send/receive.

guasi:  The GUASI I/O engine is the Generic Userspace Asynchronous Syscall Interface approach to asycnronous I/O.

测试结果解读

4k随机读写,70%读+30%写,30个并发

fio -filename=/export/1.txt -direct=1 -iodepth 1 -thread -rw=randrw -rwmixread=70 -ioengine=psync -bs=4k -size=10G -numjobs=30 -runtime=60 -group_reporting -name=randrw_70read_4k

输出结果:

Jobs:  (f=): [mmmmmmmmmmmmmmmmmmmmmmmmmmmmmm] [100.0% done] [99648K/42236K/0K /s] [.1K/.6K/  iops] [eta 00m:00s]
randrw_70read_4k: (groupid=, jobs=): err= : pid=: Sun May ::
read : io=.2MB, bw=100232KB/s, iops= , runt= 60002msec
clat (usec): min= , max= , avg=872.95, stdev=884.86
lat (usec): min= , max= , avg=873.04, stdev=884.86
clat percentiles (usec):
| .00th=[ ], .00th=[ ], .00th=[ ], .00th=[ ],
| .00th=[ ], .00th=[ ], .00th=[ ], .00th=[ ],
| .00th=[ ], .00th=[ ], .00th=[ ], .00th=[ ],
| .00th=[ ], .50th=[ ], .90th=[ ], .95th=[ ],
| .99th=[]
bw (KB/s) : min= , max= , per=3.34%, avg=3342.81, stdev=180.17
write: io=.1MB, bw=43005KB/s, iops= , runt= 60002msec
clat (usec): min= , max= , avg=750.66, stdev=874.94
lat (usec): min= , max= , avg=750.85, stdev=874.94
clat percentiles (usec):
| .00th=[ ], .00th=[ ], .00th=[ ], .00th=[ ],
| .00th=[ ], .00th=[ ], .00th=[ ], .00th=[ ],
| .00th=[ ], .00th=[ ], .00th=[ ], .00th=[ ],
| .00th=[ ], .50th=[ ], .90th=[ ], .95th=[ ],
| .99th=[ ]
bw (KB/s) : min= , max= , per=3.34%, avg=1434.25, stdev=131.77
lat (usec) : =0.06%, =11.02%, =26.21%, =0.67%, =2.40%
lat (usec) : =13.91%
lat (msec) : =44.51%, =0.41%, =0.79%, =0.01%, =0.01%
cpu : usr=0.19%, sys=2.19%, ctx=, majf=, minf=
IO depths : =100.0%, =0.0%, =0.0%, =0.0%, =0.0%, =0.0%, >==0.0%
submit : =0.0%, =100.0%, =0.0%, =0.0%, =0.0%, =0.0%, >==0.0%
complete : =0.0%, =100.0%, =0.0%, =0.0%, =0.0%, =0.0%, >==0.0%
issued : total=r=/w=/d=, short=r=/w=/d= Run status group (all jobs):
READ: io=.2MB, aggrb=100231KB/s, minb=100231KB/s, maxb=100231KB/s, mint=60002msec, maxt=60002msec
WRITE: io=.1MB, aggrb=43005KB/s, minb=43005KB/s, maxb=43005KB/s, mint=60002msec, maxt=60002msec Disk stats (read/write):
sda: ios=/, merge=/, ticks=/, in_queue=, util=98.88%

缩写解释:

io=执行了多少M的IO

bw=平均IO带宽
iops=IOPS
runt=线程运行时间
slat=提交延迟
clat=完成延迟
lat=响应时间
bw=带宽
cpu=利用率
IO depths=io队列
IO submit=单个IO提交要提交的IO数
IO complete=Like the above submit number, but for completions instead.
IO issued=The number of read/write requests issued, and how many of them were short.
IO latencies=IO完延迟的分布 io=总共执行了多少size的IO
aggrb=group总带宽
minb=最小.平均带宽.
maxb=最大平均带宽.
mint=group中线程的最短运行时间.
maxt=group中线程的最长运行时间. ios=所有group总共执行的IO数.
merge=总共发生的IO合并数.
ticks=Number of ticks we kept the disk busy.
io_queue=花费在队列上的总共时间.
util=磁盘利用率

在8块800GB的SSD做RAID 10的存储上使用psync引擎进行测试,测试结果:

4k+%随机读+%随机写: .1K+.6K
4k+%随机读: 127K
4k+%随机写: .2K 1k+%随机读+%随机写: .4K+.4K
1k+%随机读: 131K
1k+%随机写: .8K

上面跑的时间较短,测试误差较大!

抄自:

https://www.cnblogs.com/raykuan/p/6914748.html

http://blog.yufeng.info/archives/1497

http://blog.yufeng.info/archives/677

MySQL Hardware--FIO压测的更多相关文章

  1. 【MySQL】sysbench压测服务器及结果解读

    主要压测范围包括CPU测试.磁盘IO测试.线程测试.OLTP测试等,那么sysbench就可以满足我们的压测需求.下面我们简单来看下sysbench的安装使用以及压测结果的解读. 一.sysbench ...

  2. mysql集群压测

    mysql压测 mysql自带就有一个叫mysqlslap的压力测试工具,通过模拟多个并发客户端访问MySQL来执行压力测试,并且能很好的对比多个存储引擎在相同环境下的并发压力性能差别.通过mysql ...

  3. fio压测

    目录 fio工具介绍 参数介绍 测试举例 模板如下: 四路服务器测试的小tips fio工具介绍 用于测试存储设备IO性能. 当存储设备中存在用户数据时,严谨使用fio进行写操作!!! 参数介绍 rw ...

  4. mysql自带压测工具--mysqlslap

    mysqlslap  压测 mysql 5.7.20 目前版本,打印不出内存.cpu使用信息 mysqlslap -h192.168.9.60 -P4406 -uroot -p --create-sc ...

  5. 一、Jmeter进行Mysql数据库的压测

    1.首先需要安装配置mysql数据库连接驱动:mysql-connector-java-5.1.28.jar 1.1 网上很多资源,可自行下载: 1.2 下载完成后,分别将该jra包,存放到:jmet ...

  6. mysql每秒最多能插入多少条数据 ? 死磕性能压测

    前段时间搞优化,最后瓶颈发现都在数据库单点上. 问DBA,给我的写入答案是在1W(机械硬盘)左右. 联想起前几天infoQ上一篇文章说他们最好的硬件写入速度在2W后也无法提高(SSD硬盘) 但这东西感 ...

  7. fio硬盘测速windows+linux

    一.FIO工具简介 Fio工具的介绍网上有很多,都是可以通用的,这里就不做太多个人描述了,直接借鉴一下 fio是一种I / O工具,用于基准测试和压力/硬件验证.它支持19种不同类型的I / O引擎( ...

  8. 使用mysqlslap对mysql进行压测,观察Azure虚拟机cpu使用率

    一直想做这个测试,原因很简单,很多人一直比较怀疑Azure的虚拟机性能,说相同的配置凭啥比阿里的虚拟机贵那么多,其实,我自己以前也怀疑过,但是接触Azure的几个月,确实发现Azure的虚拟机性能真的 ...

  9. MySQL mysqlslap压测

    200 ? "200px" : this.width)!important;} --> 介绍 mysqlslap是mysql自带的一个性能压测工具:mysqlslap用于和其 ...

  10. 【JMeter】(3)---MySQL压测

    JMeter---MySQL压测 一.添加MySQL驱动jar包 在测试计划(Test Plan)页面添加jar包 二.添加MySQL连接配置 添加线程组右击-->添加(add)-->配置 ...

随机推荐

  1. 阿里云服务器 nginx 公网 IP 无法访问 浏览器

    配置完成 nginx 后, 在浏览器输入:http://ip,正常的话,会有页面,welcome to nginx但是浏览器显示访问失败 主要从两个方面找原因,一个是阿里云的安全组和服务器的防火墙是否 ...

  2. 改进初学者的PID-测量的比例编码

    最近看到了Brett Beauregard发表的有关PID的系列文章,感觉对于理解PID算法很有帮助,于是将系列文章翻译过来!在自我提高的过程中,也希望对同道中人有所帮助.作者Brett Beaure ...

  3. preg_match 第三个参数,

    //请修改变量p的正则表达式,使他能够匹配str中的姓名 $p = '/name:([\w\s]+)/'; $str = "name:steven jobs"; preg_matc ...

  4. 【神经网络与深度学习】【计算机视觉】Fast R-CNN

    转自:https://zhuanlan.zhihu.com/p/24780395?refer=xiaoleimlnote 首先声明:本文很多内容来自两个博客: RCNN, Fast-RCNN, Fas ...

  5. 机器学习技法实现(一):AdaBoost- Decision Stump (AdaBoost - 决策树的基于Matlab的实现)

    经过前面对AdaBoost的总结,下面要基于Matlab实现AdaBoost-Stump进行二维平面数据点的分类的实验. 一. 实验原理 参看 http://blog.csdn.net/lg12591 ...

  6. python断点

    pycharm怎么debug单步调试 1.打开一个Pycharm的界面,需要选中编辑器中的左侧. 2.点击Run---->Debug运行 3.点击箭头,向下运行 4.可以看到代码运行到下一条 5 ...

  7. Redhat7.6Linux本地的yum源配置

    安装好虚拟机,配置Ip地址,见博客https://www.cnblogs.com/xuzhaoyang/p/11264573.html 我是使用的Xshell在外部链接进行的操作,比较简单,见博客ht ...

  8. 关于TI公司DSP工程调用DELAY_US()进入非法中断问题的解决

    最近笔者在调试一个DSP程序时,发现在ad外设初始化时无法正常执行,单步检查,发现当执行到调用 DELAY_US(1000);语句时,就跳入非法. 进一步追查,DELAY_US()是宏定义函数,在笔者 ...

  9. 不一样的go语言-athens源码概览

    前言   上一篇文章介绍了athens私服的安装以及vgo download protocol的简要介绍.本文着重介绍go proxy sever的实现原理以及athens是如何实现的. go get ...

  10. 【C#】上机实验二

    实验1: 求解 1/1 + 1 / 2  + 1 / 3  + 1 / 4 …… + 1 / i = ? 确保精度在 1e-6内. using System; using System.Collect ...