磁碟效能 — IOPS 和 輸送量 說明

來源:互聯網
上載者:User

 

一. 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/OutputPer Second)

IOPS 即每秒的輸入輸出量(或讀寫次數),是衡量磁碟效能的主要指標之一。IOPS是指單位時間內系統能處理的I/O請求數量,一般以每秒處理的I/O請求數量為單位,I/O請求通常為讀或寫資料操作請求。隨機讀寫頻繁的應用,如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

 

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.

 

 

 

 

 

整理自網路

-------------------------------------------------------------------------------------------------------

著作權,文章允許轉載,但必須以連結方式註明源地址,否則追究法律責任!

Blog:     http://blog.csdn.net/tianlesoftware

Weibo: http://weibo.com/tianlesoftware

Email:   tianlesoftware@gmail.com

Skype: tianlesoftware

 

-------加群需要在備忘說明Oracle資料表空間和資料檔案的關係,否則拒絕申請----

DBA1 群:62697716(滿);   DBA2 群:62697977(滿)  DBA3 群:62697850(滿)  

DBA 超級群:63306533(滿);  DBA4 群:83829929(滿) DBA5群: 142216823(滿) 

DBA6 群:158654907(滿)   DBA7 群:69087192(滿)  DBA8 群:172855474

DBA 超級群2:151508914  DBA9群:102954821     聊天 群:40132017(滿)

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.