Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Disk performance Index-- IOPS Theory

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Https://en.wikipedia.org/wiki/IOPS

The continuous read-write performance of mechanical hard disk is very good, but the random read-write performance is very poor. This is because it takes time for the head to move to the correct track, and when reading and writing at random, the head keeps moving, and the time is spent on head seeking, so the performance is not high. As shown below:

When storing small files (pictures) and OLTP database applications, random read and write performance (IOPS) is the most important indicator.

Learning it is helpful for us to analyze the performance bottlenecks of storage systems.

Let's take a look at the random read and write performance metric-IOPS (input and output per second).

Disk performance indicator-IOPS

IOPS (Input/Output Per Second), that is, the amount of input and output per second (or the number of reads and writes), is one of the main indicators of disk performance. IOPS refers to the number of Icano requests that can be processed by the system per unit time, usually in terms of the number of Icano requests per second, which are usually read or write data operation requests.

Applications with frequent random read and write, such as small file storage (pictures), OLTP database, mail server, focus on random read and write performance, and IOPS is the key measure.

Applications with frequent sequential reading and writing transmit a large amount of continuous data, such as video editing of TV stations, video-on-demand VOD (Video On Demand), and focus on continuous read-write performance. Data throughput is a key indicator.

IOPS and data throughput are suitable for different situations:

Read 10000 1KB files in 10 seconds Throught (throughput) = 1MB/s, IOPS=1000 pursues IOPS

Read 1 10MB file in 0.2s Throught (throughput) = 50MB/s. IOPS=5 pursues throughput.

Disk service time

-

Traditional disk is essentially a mechanical device, such as FC, SAS, SATA disk, the speed is usually different from 5400/7200/10K/15K rpm. The key factor affecting the disk is the disk service time, that is, the time it takes for the disk to complete an I _ swap O request, which consists of seek time, rotation delay and data transmission time.

The seek time Tseek is the time it takes to move the read / write head to the correct track. The shorter the seek time is, the faster the operation will be. Currently, the average seek time of the disk is generally in 3-15ms.

Rotation delay Trotation refers to the time required for disk rotation to move the sector of the requested data below the read-write head. The rotation delay depends on the speed of the disk, which is usually represented by 1x2 of the time it takes for the disk to rotate for one week. For example, the average rotation delay of a disk with 7200 rpm is about 60 million 1000 4.17ms, while a disk with a speed of 15000 rpm has an average rotation delay of 2ms.

Data transfer time Ttransfer refers to the time required to complete the transmission of the requested data, which depends on the data transfer rate, which is equal to the data size divided by the data transfer rate. At present, the data transfer rate of 300MB/s interface can be achieved by IDE/ATA, which can reach 133 MB. The data transmission time of the first two parts is usually much less than the consumption time of the first two parts. It can be ignored in simple calculation.

The average physical seek time for common disks is:

The average physical seek time of a 7200 rpm STAT hard disk is 9ms.

The average physical seek time of a 10000 rpm STAT hard disk is 6ms.

The average physical seek time of a 15000 rpm SAS hard disk is 4ms.

The rotation delay time of a common hard disk is:

The average disk rotation delay of 7200 rpm is about 60 million 1000 pm 7200 max 2 = 4.17ms

The average disk rotation latency of 10000 rpm is about 60 million 1000 paces 2 = 3ms.

The average rotation delay of a disk with 15000 rpm is about 60mm 1000pm 15000max 2 = 2ms.

Theoretical calculation method of maximum IOPS

-

IOPS = 1000 ms/ (seek time + rotation delay). Data transfer time can be ignored.

Disk IOPS of 7200 rpm = 1000 / (9 + 4.17) = 76 IOPS

Disk IOPS of 10000 rpm = 1000 / (6 + 3) = 111IOPS

Disk IOPS of 15000 rpm = 1000 / (4 + 2) = 166IOPS

Factors affecting the test

-

In the actual measurement, the IOPS value will be affected by many factors, including Icano load characteristics (read-write ratio, order and randomness, number of worker threads, queue depth, data record size), system configuration, operating system, disk drive and so on. Therefore, when comparing and measuring disk IOPS, it must be carried out under the same test benchmark, even if it will produce a certain degree of random uncertainty.

Queue depth description

Technical Analysis of NCQ, SCSI TCQ, PATA TCQ and SATA TCQ

-

It is a command sorting technology that feeds more IO requests to the device, giving elevator algorithms and equipment the opportunity to arrange merging and internal parallel processing to improve overall efficiency.

The queue depth of SCSI TCQ supports 256 levels.

The queue depth of ATA TCQ supports 32 levels (requires more than 8m cache)

NCQ can support up to 32 command depth levels, and NCQ can sort up to 32 command instructions.

Most of the software belongs to synchronous IAccord O software, that is to say, a program IWeiO has to wait until the completion of the last IWeiO operation, so there may be only one command on the hard disk at the same time, and it is impossible to give full play to the advantages of this technology, so the queue depth is 1.

With the popularity of Intel hyper-threading technology and the multitasking of application environment, as well as the emergence of a large number of asynchronous Ihop O software. This technique can be applied, and the increase in the actual queue depth represents an improvement in performance.

In testing, a queue depth of 1 is the main indicator, which can be referred to most of the time. The actual runtime queue depth is generally no more than 4. 5%.

IOPS can be subdivided into the following metrics:

-

Random read IOPS when the amount of data is n bytes and the queue depth is k

IOPS written randomly when the amount of data is n bytes and the queue depth is k

IOPS's testing benchmark tool

-

IOPS's test benchmark tools mainly include Iometer, IoZone, FIO and so on, which can be used to test disk IOPS in different situations. For the application system, it is necessary to determine the load characteristics of the data first, and then select a reasonable IOPS index for measurement and comparative analysis, so as to select the appropriate storage medium and software system.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report