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

Performance Analysis of disk iDUBO under AIX

2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

This paper mainly introduces the concept and related indicators of disk IWeiO performance, and introduces the methods of measuring and monitoring disk IWeiO performance under AIX system, as well as the common adjustable parameters under AIX.

The concept of disk IPUBO

The concept of Icano is input and output from the meaning of the word. The operating system has I _ plink O at all levels from the upper layer to the bottom. For example, CPU has Imax O, memory has Imax O, VMM has Imax O, and the underlying disk also has Imax O, which is iUniver in a broad sense. Generally speaking, an upper layer of Ithumb O may produce more than one Imax O for the disk, that is, the upper layer of Iamp O is sparse and the lower layer of Imax O is dense.

The I / O of the disk, as its name implies, is the input and output of the disk. Input refers to writing data to the disk, and output refers to reading data from the disk.

The metrics to measure the performance of disk Icano are in figure 1. The architecture of physical disks and common disk types

Our common disk types are ATA, SATA, FC, SCSI, SAS. Among these disks, SAS and FC disks are commonly used in servers, and SSD disks are also used in some high-end storage. The performance of each disk is different.

In our testing work, we mainly refer to two parameters, IOPS and throughput, to measure the performance of disk Icano. Next, we will describe the meaning of these two parameters.

Concepts of IOPS and Throughput

The IOPS of the disk, that is, the number of reads and writes to and from the disk in one second.

The throughput of the disk, that is, the amount of traffic per second, that is, the amount of data written to and read from the disk.

Relationship between IOPS and Throughput

IThroughput per second = average IOPS* IOPS* O SIZE. It can be seen from the formula that the larger the SIZE, the higher the IOPS, and the higher the throughput per second. Therefore, we would think that the higher the number of IOPS and throughput, the better. In fact, for a disk, these two parameters have their maximum values, and there is a certain relationship between the two parameters.

The following figure shows the IOPS limits for various disks.

Table 1. Common disk types and their IOPS

Note: the above table is from Wikipedia http://en.wikipedia.org/wiki/IOPS

In AIX, for the same disk (or LUN), the value of IOPS is not fixed with each time the size of data read and written by IOPS O is impassable. For example, every time I write or read big data blocks, the IOPS will be relatively low; without frequent channel change, the data blocks written or read each time will be smaller, and the IOPS will be relatively higher.

Go back to the top of the page

The type of read and write of Ipaw O

Generally speaking, the types of Imax O can be divided into read / write Imax O, large / small block Imax O, continuous / random Imax O, sequential / concurrent Imax O. Among these types, we mainly discuss: large / small block I _ pico, continuous / random I _ An O, sequential / concurrent I _ An O.

Large / small block Iswap O

This value refers to the number of consecutive readout sectors given in the controller instruction. If there is a large number, such as 64128, we can think of it as a large I-peg O; on the other hand, if it is very small, such as 4jue 8, we will think that it is a small I-peg O. in fact, there is no clear boundary between a large and a small I-peg.

Continuous / random Imax O

Continuous Icano means that the initial sector address given by this Icano is completely contiguous or not much apart from the end sector address of the last Icano. On the other hand, if the difference is very large, it will be counted as a random Icano.

The reason why the continuous Istroke O is more efficient than the random Ihammer O is that the head hardly needs to change the channel, or the time of changing channel is very short, while for the random Ihammer O, if there is a lot of it, it will cause the head to change channel constantly, resulting in a great reduction in efficiency.

Sequential / concurrent Istroke O

Conceptually, a concurrent Iamp O means that you don't have to wait for it to respond after issuing an Imax O instruction to one disk, and then send an IUnip O instruction to another disk. For striped RAID (LUN), the operation of raid O to it is concurrent, for example, raid5 and so on. On the contrary, it is the order I hand O.

Go back to the top of the page

Monitoring the performance of disk IPUBO

We can use AIX system commands, such as sar-d, iostat, topas, nmon, etc., to monitor the disk's isign O performance. Next, I'll take nmon and topas as examples to show how to observe the performance of disk Imax O in the system.

Topas

Log in to the AIX operating system, type topas, and then press D, and the following interface appears:

In the figure above, TPS is the IOPS,KBPS of the disk, which is the throughput of the disk per second. Because the server is idle, we can see that the data for IOPS,KBPS is very low.

We use the dd if command to send a read to disk hdisk2 that the size of the 1MB OMagneBlock is as follows:

Use topas for monitoring:

In this case, the throughput of hdisk2 is 163.9m and the IOPS is 655.

Let's start another dd if to make the busy value of hdisk reach 100%:

As can be seen from the above figure, when the disk busy reaches 100%, its throughput is 304.1 M and its IOPS is 1200.

Hdisk2 is a locally integrated SAS disk. We can find out that the bandwidth of the locally integrated SAS channel is 3Gb:

For the SAS channel of 3Gb, the disk throughput of 304.1m is close to the peak of its Imax O bandwidth.

It should be noted that it is feasible to use dd if to measure disk bandwidth, but it is unscientific to determine the IOPS and throughput of business Imax O. Because the reads and writes initiated by dd if are only sequential Imax O reads and writes, this kind of read and write is not common in OLTP services, but there are more random small Icano reads and writings. Therefore, the disk Imax O performance of the measurement business needs to be monitored when the business is running.

Nmon

Enter nmon in the system and press d to get the following interface:

You can get a disk hdisk2 throughput of 318m at this time.

Using nmon to collect data for a period of time, and then using nmon analyzer for analysis, you can get a more direct chart:

The collected nmon files are analyzed using nmon analyzer, and the following report is obtained:

Figure 2.nmon chart shows disk performance back to the top of the page

Disk Iripple O performance tuning confirms that there is a performance problem with disk Icano

For random loads, when we encounter the rest of the situation, we usually think that there is a performance problem with Iripple O:

The average read time is greater than 15ms. Under the condition of having write cache, the average write time is longer than 2.5ms.

For sequential loads, when we encounter the rest of the situation, we usually think that there is a performance problem with Icano:

There are two contiguous Imax O streams on one disk with insufficient throughput (that is, far less than the disk Imax O bandwidth)

For a disk, with the increase of the number of IOPS, I service time O service will also increase, and there will be a saturation point, that is, after the IOPS reaches a certain point, the increase of IOPS will cause a significant increase in I service time.

Figure 3. Disk IOPS and IO service time diagram

Empirically speaking, in our testing work, we focused on three values: IOPS and throughput, and disk busy%. If the IOPS and throughput are very low, and the busy% of the disk is also very low, we will think that the disk pressure is too low, resulting in too low throughput and IOPS. Only when the IOPS and throughput are very low, and the busy% of the disk is very high (close to 100%), we will analyze the busy% performance of the disk.

Improving the performance of disk Ibank O by adjusting AIX parameters

In the AIX system, we mainly adjust the parameters related to the performance of disk Iram O as shown below:

Figure 4.AIX 's common disk Iramp O performance parameters

It should be noted that the adjustment values of the following parameters are only empirical values; for different applications and different scenarios, specific analysis should be made.

Adjust the queue length of IPUP O

Queue_depth is the number of commands that AIX can deliver to the disk device at a time, and putting commands in a queue and then transferring them to disk can improve the performance of AIX. Each disk defined in AIX has a queue_depth attribute in the ODM library. This property limits the maximum number of commands that AIX can pass to the device.

The default value of queue_depth is 4

Adjust the queue length of hdisk2 from 16 to 64:

Max_transfer parameter

This parameter means that the storage driver can send the largest Icano to the storage. By increasing the value of max_transfer, we can allow the number of LTG of VG to be larger.

We can adjust this parameter from 64m to 128m.

Fiber Carnum _ cmd_elems parameters

If it is external storage connected by an optical fiber card, you can consider adjusting num_cmd_elems. The function of this parameter is: controls maximum number of in-flight Ios

The default value for this parameter is 500. let's change it to 1000:

Optical fiber card max_xfer_size parameters: attribute also controls a DMA memory area used to hold data for transfer, and at the default is 16 MB. This parameter controls the DMA area, which is used to maintain the area of transmitted data. Its default value is 16MB. You can adjust this value to 128MB so that the bandwidth of the fiber card is higher.

FSCSI equipment

For FSCSI devices, we can achieve fast path switching by setting parameters: dyntrk and fc_err_recov: This sets the adapters to fast fail over and reduces the amount of time required to select a new data path.

After the modification is completed, Rong confirms it with the following command:

Summary

It is a relatively complex task to adjust the performance of disk Iram O under AIX, and the values of parameters are often impassable according to the change of environment. This requires us to adjust flexibly on the basis of being familiar with the performance architecture of disk Iswap O.

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

Internet Technology

Wechat

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

12
Report