In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to test the IO performance of the disk in the Linux system". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to detect the IO performance of the disk in the Linux system".
The iostat command provides rich IO performance status data. Iostat can collect and display statistics on system input / output storage devices. It is often used to track down performance problems with storage devices, including devices, local disks, and remote disks such as nfs.
Iostat provides several switches for customizing the output. The most useful ones are:
-c displays only CPU lines
-d display device (disk) usage status
-k displays disk output in kilobytes
-t includes a timestamp in the output
-x includes extended disk metrics in the output
Rrqm/s: the number of merge reads per second.
Wrqm/s: the number of merge writes per second.
Rdyne s: the number of times the read of the Iripple O device was completed per second.
Wthumb s: the number of writes completed by the I _ swap O device per second.
Rsec/s: read sectors per second.
Wsec/s: the number of sectors written per second.
RkB/s: read K bytes per second. Is half the rsect/s because the size of each sector is 512 bytes. (need to calculate)
WkB/s: write K bytes per second. It's half of wsect/s. (need to calculate)
Avgrq-sz: the average data size (sector) per device Istroke O operation.
Avgqu-sz: average Imax O queue length.
Await: the average wait time (in milliseconds) for each device Istroke O operation.
Svctm: the average service time (in milliseconds) for each device Istroke O operation.
% util: how many percent of the time in a second is spent on the Imax O operation.
Explanation about Merge: when the system call needs to read data, VFS sends the request to each FS. If FS finds that different read requests read data from the same Block, FS will merge the request with Merge.
Await: the average processing time (in milliseconds) of each IO request. It can be understood as the response time of IO. Generally speaking, the response time of system IO should be lower than that of 5ms, and it is larger if it is greater than 10ms.
% util: all processing IO times during the statistical time divided by the total statistical time. For example, if the statistical interval is 1 second, the device has 0.8 seconds of processing IO and 0.2 seconds of idle, then the% util of the device = 0.8 shock 1 = 80%, so this parameter indicates how busy the device is. Generally speaking, if this parameter is 100%, it means that the device is running at nearly full capacity (of course, if it is multiple disks, even if% util is 100%, disk usage may not be a bottleneck because of disk concurrency).
Here are some ssd cards for database use. Take a look at the actual use.
The code is as follows:
Root@10.1.1.200:~# df-h
The code is as follows:
Root@10.1.1.200:~# iostat-d-m 1 5
The # parameter-d indicates the disk usage status of the display device;-m uses megabytes as the display unit. 1 5 means that it is refreshed every 1 second for a total of 5 times.
Linux 2.6.18-6-amd64 (192.168.2.31) 02Universe 16Universe 2016 _ x864th _
Tps: the number of transmissions per second of the device. One transmission means one Imax O request, and multiple logical requests will later be merged into one Imax O request. The size of a transmission request is uncertain.
MB_read/s: the amount of data read from the device per second.
MB_wrtn/s: the amount of data written to the device per second.
MB_read: the total amount of data read.
MB_wrtn: the total amount of data written.
Currently, the total disk TPS of SSD card is 551.49. The quantity is still relatively large.
Let's use the-x parameter to get more statistics
The code is as follows:
Root@10.1.1.200:~# iostat-d-x-m 1 5
Linux 2.6.18-6-amd64 (192.168.2.31) 02Universe 16Universe 2016 _ x864th _
Rrqm/s: how many read requests related to this device are merge per second.
Wrqm/s: how many write requests related to this device are merge per second.
RMB/s: the number of sectors read per second.
WMB/s: the number of sectors written per second.
Await: the average processing time of each IO request (in milliseconds) can be understood as the response time of IO. In general, the IO response time of the system should be lower than that of 5ms, and it is larger if it is greater than 10ms.
% util: all processing IO times during the statistical time divided by the total statistical time. It can be understood as equipment utilization.
Here you can see that the await card has a utilization rate of nearly 100%. When writing a large amount of data, the await response time is still below SSD. It seems that the performance is really good.
You can also use the-c parameter to view cpu status
The code is as follows:
Root@10.1.1.200:~# iostat-c 1 5
Linux 2.6.18-6-amd64 (192.168.2.31) 02Universe 16Universe 2016 _ x864th _
Thank you for reading, the above is the content of "how to detect the IO performance of the disk in the Linux system". After the study of this article, I believe you have a deeper understanding of how to detect the IO performance of the disk in the Linux system, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.