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

How to monitor and analyze the performance of disk IO under SUSE LINUX

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

Share

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

Today, I will talk to you about how to conduct disk IO performance monitoring analysis under SUSE LINUX. Many people may not know much about it. In order to let you know more, Xiaobian summarizes the following contents for you. I hope you can gain something according to this article.

These two days, I found that a test server often has a high load, but the CPU and memory consumption are very small, which is very strange. After diagnosis, it is found that the disk IO consumption under high concurrency is relatively large due to large capacity test data. Since the cache is small and the number is relatively large, the IO consumption is very large under high concurrency. So how can we quickly locate high concurrency due to disk io overhead?

1. Use the information in the top command to observe

The redlined parameters are explained as follows:

Tasks: 437 total Total processes

4 running Number of running processes

430 sleeping Number of sleep processes

3 stopped Number of processes stopped

0 zombie Number of zombie processes

Cpu(s):

7.1% us User space percentage of CPU

4.2% sy Kernel space percentage CPU

0.0% ni Percentage of CPU consumed by processes in user process space that have changed priority

76.8% id Percentage of CPU idle

12% wa Percentage of CPU time waiting for input and output

The percentage of 12% wa roughly indicates that disk io requests currently waiting for input and output are too frequent.

For further analysis, we trace key process locator procedures

#strace -p 28644 (CPU usage is higher as shown)

You can see that the ora_lgwr_nms program causes a large read and write overhead.

II. Observing with IOSTAT command

Disk IO performance is an important indicator of overall computer performance. Linux provides the iostat command to get disk input/output (IO) statistics.

#iostat -x 1 Count complete results once per second.

Use the #mount command to find out that the/opt partition corresponding to sda5 and the/data partition corresponding to sdb8 read and write frequently.

OPT partition due to FTP transfer to the disk overhead is relatively large.

After analyzing and locating, adjust FTP and database archives for related problems, and then look again.

Summary: TOP, IOSTAT are more common commands, through the flexible application of basic commands to analyze and locate problems is more convenient, especially the basic command parameter selection and use is worth our study.

Supplement: Disk IOPS knowledge

IOPS (Input/Output Per Second) is the number of inputs and outputs per second (or the number of reads and writes), which is one of the main indicators to measure disk performance. IOPS refers to the number of I/O requests that the system can handle per unit of time, usually in the number of I/O requests processed per second. I/O requests are usually read or write data operation requests. For applications with frequent random reads and writes, such as OLTP(Online Transaction Processing), IOPS is a key metric. Another important metric is data throughput, which refers to the amount of data that can be successfully transmitted per unit time. For applications with a large number of sequential reads and writes, such as VOD(Video On Demand), more attention is paid to throughput metrics.

Traditional disks are essentially mechanical devices, such as FC, SAS, SATA disks, which typically run at speeds ranging from 5400/7200/10K/15K rpm. The key factor affecting disk is disk service time, that is, the time it takes for disk to complete an I/O request, which consists of seek time, rotation delay and data transfer time.

Seek time Tseek is the time required to move the read/write head to the correct track. The shorter the seek time, the faster the I/O operation, and the average seek time for disks is currently 3-15 ms.

Rotation delay Trotation is the time required for disk rotation to move the sector in which the requested data is located below the read/write head. The spin delay depends on the disk speed and is usually expressed as 1/2 of the time required for a disk revolution. For example, the average spin delay for a disk at 7200 rpm is approximately 60*1000/7200/2 = 4.17 ms, while the average spin delay for a disk at 15000 rpm is approximately 2 ms.

The data transfer time Ttransfer refers to the time required to complete the transmission of the requested data, which depends on the data transfer rate and has a value equal to the data size divided by the data transfer rate. At present, IDE/ATA can reach 133MB/s, SATA II can reach 300MB/s interface data transmission rate, data transmission time is usually much shorter than the first two parts of time.

Therefore, it is theoretically possible to calculate the maximum IOPS of the disk, i.e. IOPS = 1000 ms/ (Tseek + Troation), ignoring the data transfer time. Assuming an average physical seek time of 3ms and disk speeds of 7200,10K, and 15K rpm, the theoretical maximum disk IOPS are,

IOPS = 1000 / (3 + 60000/7200/2) = 140

IOPS = 1000 / (3 + 60000/10000/2) = 167

IOPS = 1000 / (3 + 60000/15000/2) = 200

IOPS depends on the algorithm associated with the array, cache hit ratio, and number of disks. Array algorithms vary from array to array. On raid5 and raid10, there is no difference in read iops, but the same traffic, write iops eventually fall on each disk is different, if the write limit of i0ps per disk is reached, performance will be affected. For raid5 each write actually takes place 4 io's, whereas raid10 only takes place 2 io's, so raid10 writes faster than raid5.

After reading the above, do you have any further understanding of how to monitor disk IO performance under SUSE LINUX? If you still want to know more knowledge or related content, please pay attention to the industry information channel, thank you for your support.

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