Performance Tuning: IO consumption analysis, performance tuning io consumption
Performance Tuning-> how to analyze io consumption
Reprinted please indicate the source: http://blog.csdn.net/supera_li/article/details/45225077
For more information about the performance tuning series, see.
Performance Optimization: Analysis of CPU consumption
Performance Optimization: IO Consumption Analysis
Performance Optimization: Consumption Analysis Mind Map
IO Consumption Analysis
Io consumption is divided into file IO and network IO. File IO mainly refers to the consumption of input and output streams and memory. Network I/O is generally the throughput of the NIC, and java programs generally do not consume network I/O. The reason is that, before there is network IO in the heap, it will crash in advance. So there is no network IO consumption.
File IO consumption
1. pidstat-d-t-p view thread IO consumption. This command must be supported by the SYSSTAT tool. Please refer
Install sysstat and use the pidstat command
Http://blog.csdn.net/supera_li/article/details/45221211
2. iostat commands are commonly used. Check the overall IO consumption and pay attention to iowait %. This value indicates the IO wait time. The larger the value, the more serious the IO blocking is and the larger the consumption is.
If it is too high, pidstat will check which thread occupies the most. After obtaining the highest PID, The jstack execution thread dump. Analyze the source code to solve the iowait Problem
3. iostat-x xvda 3 5 queries the I/O STATUS OF THE xvda device every 3 s, five times in total.
Corresponding value. The key is await. The percentage that causes util is very high.
Network IO consumption
1. Use cat/proc/interrupts to check whether Nic interruption balances the cpu
Nic terminals for IO are allocated to cup0, while cup2 is idle.
2. sar-n ALL 1 1 Check Network IO consumption information
On my CRT
Parameter meaning
Check the acceptance status. If you accept more, check whether there is an interruption. Use command 1.
References:
[1] sar command http://www.360doc.com/content/10/0925/10/1107705_56179926.shtml
[2] Java distributed applications-network I/O consumption