In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you Linux how to view disk IO and find out the process that takes up a lot of IO reading and writing. I hope you will get something after reading this article. Let's discuss it together.
Background-online alarm
An online server alarms, disk utilization disk.util > 90, and continuous alarm.
After logging in to the server, I used iostat-x 1 10 to view the relevant disk usage information. The relevant screenshots are as follows:
# if there is no iostat command, then use yum install sysstat to install # iostat-x 1 10
As can be seen from the above figure, the% util [IO] of vdb disk is almost 100%, which is caused by frequent data reading.
Other field description
Device: device name
Tps: the number of IO read and write requests per second. Multiple logical requests can be combined into a single IO O request to the device.
Blk_read/s (kB_read/s, MB_read/s): the amount of data read from a device, expressed in blocks (kilobytes, megabytes) per second. The block is equivalent to a sector, so the block size is 512 bytes.
Blk_wrtn/s (kB_wrtn/s, MB_wrtn/s): the amount of data written to the device, expressed in blocks (kilobytes, megabytes) per second. The block is equivalent to a sector, so the block size is 512 bytes.
Blk_read (kB_read, MB_read): the total number of read blocks (kilobytes, megabytes).
Blk_wrtn (kB_wrtn, MB_wrtn): the total number of blocks written (kilobytes, megabytes).
Rrqm/s: the number of read requests merged into the device per second. Namely delta (rmerge) / s
Wrqm/s: the number of write requests merged into the device per second. Namely delta (wmerge) / s
Rdyne s: the number of times the read of the Iripple O device was completed per second. Namely delta (rio) / s
Whand s: the number of times the write I _ hand 0 device has been completed per second. Namely delta (wio) / s
Rsec/s (rkB/s, rMB/s): read the number of sectors of the device per second (kilobytes, megabytes). The size of each sector is 512 bytes
Wsec/s (wkB/s, wMB/s): the number of sectors written to the device per second (kilobytes, megabytes). The size of each sector is 512 bytes
Avgrq-sz: the average amount of data (in sectors) per device Istroke O operation. That is, delta (rsec+wsec) / delta (rio+wio)
Avgqu-sz: the average length of the Imax O queue sent to the device each time.
Await: average waiting time per IO request. (including waiting queue time and processing time in milliseconds)
R_await: average wait time for each IO read request. (including waiting queue time and processing time in milliseconds)
W_await: average wait time for each IO write request. (including waiting queue time and processing time in milliseconds)
Svctm: the average processing time (in milliseconds) for each device Istroke O operation. Warning! Don't trust this field value any more, it will be deleted in future sysstat versions.
% util: how many percent of the time in a second is spent on the Imax O operation, or how much time in a second the Ipicuro queue is not empty. When the value is close to 100%, device saturation occurs.
Find processes with high IO usage
Through the iotop command
If you do not have this command, install it through yum install iotop.
# iotop-oP
Through this command, you can see more detailed information, such as: process number, disk read, disk write, IO percentage, and what the command involved is. "both are caused by grep commands."
Through the pidstat command
The meaning of # command: show the statistics of pidstat O, which is updated once per second.
It can be seen that the grep command takes up a lot of read IO, and then you can view the relevant process information according to the PID.
Note: this figure is different from the PID in the above figure because the process involved in the above figure has been executed, and this figure is the process generated by subsequent execution [all executed in the same script].
What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
After reading this article, I believe you have a certain understanding of "how Linux views disk IO and finds out the process that takes up a lot of IO reading and writing". If you want to know more about it, welcome to follow the industry information channel, thank you for reading!
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.