一. Wikepedia上有关IOPS 的说明

链接如下:http://en.wikipedia.org/wiki/IOPS

IOPS (Input/Output OperationsPer Second, pronounced i-ops) is a common performance measurement used to benchmark computer storage devices like harddisk drives (HDD), solid state drives (SSD), and storage area networks (SAN). As with anybenchmark, IOPS numbers published by storage device manufacturers do notguarantee real-world application performance.

IOPS can bemeasured with applications such as Iometer (originallydeveloped by Intel),as well as IOzone and FIO[3] and isprimarily used with servers to find the best storageconfiguration.

The specificnumber of IOPS possible in any system configuration will vary greatly dependingupon the variables the tester enters into the program, including the balance ofread and write operations, the mix of sequential and random accesspatterns, the number of worker threads and queue depth, as well asthe data block sizes.[1] Thereare other factors which can also affect the IOPS results including the systemsetup, storage drivers, OS background operations, etc. Also, when testing SSDsin particular, there are preconditioning considerations that must be taken intoaccount.[4]

1.1 Performance characteristics

The most commonperformance characteristics measured are sequential and random operations.

Random access compared tosequential access:

Sequential operations access locations on the storage device in a contiguous manner and are generally associated withlarge data transfer sizes, e.g., 128 KB.

Random operations access locations on the storage device in a non-contiguous mannerand are generally associated with small data transfer sizes, e.g., 4 KB.

The most commonperformance characteristics are as follows:

Measurement

Description

Total IOPS

Total number of I/O operations per second (when performing a mix of read and write tests)

Random Read IOPS

Average number of random read I/O operations per second

Random Write IOPS

Average number of random write I/O operations per second

Sequential Read IOPS

Average number of sequential read I/O operations per second

Sequential Write IOPS

Average number of sequential write I/O operations per second

For HDDs and similar electromechanical storage devices, the random IOPS numbers are primarily dependent upon the storagedevice's random seek time, whereas for SSDs and similar solid statestorage devices, the random IOPS numbers are primarily dependent upon thestorage device's internal controller and memory interface speeds.

On both types ofstorage devices the sequential IOPS numbers (especially when using a largeblock size) typically indicate the maximum sustained bandwidth that the storagedevice can handle.[1]

Often sequential IOPS arereported as a simple MB/s number asfollows:

IOPS * TransferSizeInBytes = BytesPerSec (withthe answer typically converted to MegabytesPerSec)

Some HDDs willimprove in performance as the number of outstanding IO's (i.e. queue depth)increases. This is usually the result of more advanced controller logic on thedrive performing command queuing and reordering commonly called either Tagged Command Queuing (TCQ) or Native Command Queuing (NCQ).

Mostcommodity SATA driveseither cannot do this, or their implementation is so poor that no performancebenefit can be seen. Enterprise class SATA drives, such as the Western Digital Raptor and SeagateBarracuda NL will improve by nearly 100% with deep queues.[5] High-end SCSI drives morecommonly found in servers, generally show much greater improvement, withthe Seagate Savvio exceeding 400 IOPS—more thandoubling its performance.[citation needed]

While traditional HDDs have about the same IOPS for read and write operations,most NAND flash-based SSDs are much slower writingthan reading due to the inability to rewrite directly into a previously writtenlocation forcing a procedure called garbage collection.[6][7][8] This hascaused hardware test sites to start to do IOPS testing, providing independentlymeasured results.

Newerflash SSD drives such as the Intel X25-E have much higher IOPS than traditionalhard disk drives. In a test done by Xssist, using IOmeter, 4 KB randomtransfers, 70/30 read/write ratio, queue depth 4, the IOPS delivered by theIntel X25-E 64 GB G1 started around 10000 IOPs, and dropped sharply after8 minutes to 4000 IOPS, and continued to decrease gradually for the next 42minutes. IOPS vary between 3000 to 4000 from around the 50th minutes onwardsfor the rest of the 8+ hours test run.[9] Even with thedrop in random IOPS after the 50th minute, the X25-E still has much higher IOPScompared to traditional hard disk drives. Some SSDs, including the OCZ RevoDrive 3 x2PCIe using the SandForce controller, have shown much higher sustainedwrite performance that more closely matches the read speed.[10]

1.2 示例

Device

Type

IOPS

Interface

Notes

7,200 rpm SATA drives

HDD

~75-100 IOPS[2]

SATA 3 Gb/s

10,000 rpm SATA drives

HDD

~125-150 IOPS[2]

SATA 3 Gb/s

15,000 rpm SAS drives

HDD

~175-210 IOPS [2]

SAS

二. IOPS 说明

2.1 IOPS (Input/Output Per Second)

IOPS 即每秒的输入输出量(或读写次数),是衡量磁盘性能的主要指标之一。IOPS是指单位时间内系统能处理的I/O请求数量,一般以每秒处理的I/O请求数量为单位,I/O请求通常为读或写数据操作请求。例如,主机写入一个最小的数据块,也要经过“发送写入请求、写入数据、收到写入确认”等三个步骤,也就是3个存储端访问。

随机读写频繁的应用,如OLTP(OnlineTransaction Processing),IOPS是关键衡量指标。

另一个重要指标是数据吞吐量(Throughput),指单位时间内可以成功传输的数据数量。对于大量顺序读写的应用,如VOD(Video On Demand),则更关注吞吐量指标。

传统磁盘本质上一种机械装置,如FC, SAS, SATA磁盘,转速通常为5400/7200/10K/15K rpm不等。影响磁盘的关键因素是磁盘服务时间,即磁盘完成一个I/O请求所花费的时间,它由寻道时间、旋转延迟和数据传输时间三部分构成。

(1)寻道时间

Tseek是指将读写磁头移动至正确的磁道上所需要的时间。寻道时间越短,I/O操作越快,目前磁盘的平均寻道时间一般在3-15ms。

(2)旋转延迟

Trotation是指盘片旋转将请求数据所在扇区移至读写磁头下方所需要的时间。旋转延迟取决于磁盘转速,通常使用磁盘旋转一周所需时间的1/2表示。比如,7200 rpm的磁盘平均旋转延迟大约为60*1000/7200/2 = 4.17ms,而转速为15000 rpm的磁盘其平均旋转延迟约为2ms。

(3)数据传输时间

Ttransfer是指完成传输所请求的数据所需要的时间,它取决于数据传输率,其值等于数据大小除以数据传输率。目前IDE/ATA能达到133MB/s(MBPS),SATA II可达到300MB/s的接口数据传输率,数据传输时间通常远小于前两部分时间。

IOPS(每秒IO次数) = 1s/(寻道时间+旋转延迟+数据传输时间)

因此,理论上可以计算出磁盘的最大IOPS,即IOPS = 1000ms/ (Tseek + Troatation),忽略数据传输时间。假设磁盘平均物理寻道时间为3ms, 磁盘转速为7200,10K,15Krpm,则磁盘IOPS理论最大值分别为:

IOPS = 1000 / (3 + 60000/7200/2)  = 140
IOPS = 1000 / (3 + 60000/10000/2) = 167
IOPS = 1000 / (3 + 60000/15000/2) = 200

下面列一下不同的硬盘所能支撑的流量大小:

10 K rpm 15 K rpm ATA
———      ———      ———
10M/s       13M/s       8M/s
每个物理硬盘能处理的IOPS是有限制的,如
10 K rpm 15 K rpm ATA
———      ———     ———
100          150           50

IOPS的主要取决与阵列的算法,cache命中率,以及磁盘个数。我们假定一个case,业务的iops是10000,读cache命中率是30%,读iops为60%,写iops为40%,磁盘个数为120,那么分别计算在raid5与raid10的情况下,每个磁盘的iops为多少。

raid5:
单块盘的iops = (10000*(1-0.3)*0.6 + 4 * (10000*0.4))/120 = (4200 + 16000)/120 = 168
这里的10000*(1-0.3)*0.6表示是读的iops,比例是0.6,除掉cache命中,实际只有4200个iops
而4 * (10000*0.4) 表示写的iops,因为每一个写,在raid5中,实际发生了4个io,所以写的iops为16000个
为了考虑raid5在写操作的时候,那2个读操作也可能发生命中,所以更精确的计算为:
单块盘的iops = (10000*(1-0.3)*0.6 + 2 * (10000*0.4)*(1-0.3) + 2 * (10000*0.4))/120 = (4200 + 5600 + 8000)/120 = 148
计算出来单个盘的iops为148个,基本达到磁盘极限
raid10:  单块盘的iops = (10000*(1-0.3)*0.6 + 2 * (10000*0.4))/120  =   (4200 + 8000)/120   = 102
可以看到,因为raid10对于一个写操作,只发生2次io,所以,同样的压力,同样的磁盘,每个盘的iops只有102个,还远远低于磁盘的极限iops。

2.2 固态硬盘的IOPS

固态硬盘SSD是一种电子装置, 避免了传统磁盘在寻道和旋转上的时间花费,存储单元寻址开销大大降低,因此IOPS可以非常高,能够达到数万甚至数十万。实际测量中,IOPS数值会受到很多因素的影响,包括I/O负载特征(读写比例,顺序和随机,工作线程数,队列深度,数据记录大小)、系统配置、操作系统、磁盘驱动等等。因此对比测量磁盘IOPS时,必须在同样的测试基准下进行,即便如何也会产生一定的随机不确定性。

通常情况下,IOPS可细分为如下几个指标:

Toatal IOPS:混合读写和顺序随机I/O负载情况下的磁盘IOPS,这个与实际I/O情况最为相符,大多数应用关注此指标。

Random Read IOPS:100%随机读负载情况下的IOPS。

Random WriteIOPS:100%随机写负载情况下的IOPS。

Sequential ReadIOPS:100%顺序负载读情况下的IOPS。

Sequential WriteIOPS:100%顺序写负载情况下的IOPS。

三.ORION 工具说明

ORION (OracleI/O Calibration Tool) Oracle 公司推出的一个校准数据库的存储系统 I/O 性能的独立工具。有关该工具的说明,参考:

Oracle ORION IO 测试工具

http://blog.csdn.net/tianlesoftware/article/details/5965331

我们使用ORION 工具测试一下看看:

[root@qs-xe-dzora-pd software]# cat dave.lun

/dev/sdb1

[root@qs-xe-dzora-pd software]#  ./orion_linux_x86-64 -run advanced -testname dave -num_disks 2

ORION: ORacle IO Numbers -- Version11.1.0.7.0

dave_20111026_2026

Test will take approximately 16 minutes

Larger caches may take longer

查看生成的结果:

[root@qs-xe-dzora-pd software]# ls dave*

dave_20111026_2026_iops.csv  dave_20111026_2026_summary.txt  dave.lun_20111026_2025_summary.txt

dave_20111026_2026_lat.csv   dave_20111026_2026_trace.txt

dave_20111026_2026_mbps.csv  dave.lun

[root@qs-xe-dzora-pd software]# cat dave_20111026_2026_summary.txt

ORION VERSION 11.1.0.7.0

Commandline:

-run advanced -testname dave -num_disks 2

This maps to this test:

Test: dave

Small IO size: 8 KB

Large IO size: 1024 KB

IO Types: Small Random IOs, Large RandomIOs

Simulated Array Type: CONCAT

Write: 0%

Cache Size: Not Entered

Duration for each Data Point: 60 seconds

Small Columns:,      0

Large Columns:,      0,     1,      2,      3,     4

Total Data Points: 15

Name: /dev/sdb1 Size: 449495069184

1 FILEs found.

Maximum Large MBPS=159.61 @ Small=0 andLarge=4

Maximum Small IOPS=534 @ Small=10 andLarge=0

Minimum Small Latency=4.97 @ Small=1 andLarge=0

这里显示的吞吐量是160MBPS. IOPS 为534.

转自网络:http://blog.csdn.net/tianlesoftware/article/details/6908603

磁盘性能--IOPS和吞吐量相关推荐

  1. 磁盘性能评价指标—IOPS和吞吐量

    一.磁盘 I/O 的概念 I/O 的概念,从字义来理解就是输入输出.操作系统从上层到底层,各个层次之间均存在 I/O.比如,CPU 有 I/O,内存有 I/O, VMM 有 I/O, 底层磁盘上也有 ...

  2. oracle磁盘iops,磁盘性能,你可能不知道的IOPS计算方法

    每个I/O 请求到磁盘都需要若干时间.主要是因为磁盘的盘边必须旋转,机头必须寻道.磁盘的旋转常常被称为"rotational delay"(RD),机头的移动称为"dis ...

  3. 服务器性能和吞吐量,IOPS和吞吐量:衡量硬盘性能的主要指标

    要理解IOPS,先要了解磁盘I/O的概念.I/O(input/output)从字义理解就是输入/输出,输入指的是对磁盘写入数据,输出指的是从磁盘读出数据.磁盘IOPS(Input/Output per ...

  4. linux fio释放内存,linux使用FIO测试磁盘的iops

    出处:http://blog.itpub.net/26855487/viewspace-754346/ FIO是测试IOPS的非常好的工具,用来对硬件进行压力测试和验证,支持13种不同的I/O引擎, ...

  5. fio 是测试磁盘性能的最佳工具

    磁盘IO是检查磁盘性能的重要指标,可以按照负载情况分成照顺序读写,随机读写两大类. fio 是测试磁盘性能的最佳工具: ddif=/dev/zero  of=/root/test bs=4kcount ...

  6. 内存数据库mongodb_内存和磁盘性能如何影响您的MongoDB数据库

    内存数据库mongodb This article was originally published on MongoDB. Thank you for supporting the partners ...

  7. Linux 磁盘性能优化 ——磁盘性能及高I/O排查

    文章目录 磁盘容量查看:df 如何衡量磁盘性能 每块磁盘使用观测:iostat 进程io观测:pidstat.iotop 案例分析 参考文献 作者邮箱:2107810343@qq.com 时间:202 ...

  8. [AWS vs Azure] 云计算里AWS和Azure的探究(5) ——EC2和Azure VM磁盘性能分析

    云计算里AWS和Azure的探究(5) --EC2和Azure VM磁盘性能分析 在虚拟机创建完成之后,CPU和内存的配置等等基本上是一目了然的.如果不考虑显卡性能,一台机器最重要的性能瓶颈就是硬盘. ...

  9. fio 测试磁盘性能

    在磁盘测试中最关心的几个指标分别为: iops(每秒执行的IO次数).bw(带宽,每秒的吞吐量).lat(每次IO操作的延迟). 当每次IO操作的block较小时,如512bytes/4k/8k等,测 ...

最新文章

  1. Oracle job procedure 存储过程定时任务
  2. 南昌航空航天c语言试卷,2016年南昌航空大学软件学院程序设计复试笔试仿真模拟题...
  3. C#中对于float,double,decimal的误解
  4. 关于释放内存的那点事
  5. 前端之JavaScript:JS之DOM对象一
  6. C#为什么支持协变的参数只能用于方法的返回值?支持逆变的参数只能用于方法参数?...
  7. mysql cookbook
  8. 乐高收割机器人_乐高圣诞45002作品来啦!——驯鹿拉雪橇、圣诞树、圣诞棒棒糖...
  9. 电脑文件夹可以分屏的软件_电脑上什么便签软件可以添加音频?
  10. 单个对象和多个对象在内存中的结构图
  11. The eighteen day
  12. Windows环境CMake安装教程
  13. Unity shader入门精要-第一章笔记
  14. 西门子PLC与安川变频器Modbus通信
  15. 腾讯会议PPT演讲者模式
  16. 【数智化案例展】某头部股份制银行总行——“数字化投顾”工作台
  17. 使用SVG.Net生成svg格式文字图片
  18. Clickhouse MergeTree系列(Replacing、Summing等)表引擎使用说明
  19. 音频处理-1 基础知识
  20. 简单密码(Caesar密码)--C++实现

热门文章

  1. 小米手机4c如何刷入开发版获取ROOT权限
  2. MySQL数据库05 数据库控制和设计
  3. python基础学习06_if条件判断(多重判断、嵌套、三目运算)
  4. 数据库原理与应用——引言(一)
  5. 支付系统-财务记账 复式记账 借贷
  6. QQ宠物炫也有免费午餐---谁说全是收费?(转)
  7. C# Winform添加背景图片后加载的时候控件卡
  8. ShareSDK⭐一、QQ登陆、获取QQ用户信息
  9. 2019年高教社杯全国大学生数学建模竞赛 题目回顾及个人体会
  10. 51 单片机 点阵 LED 显示屏程序