Performance tuning-How to analyze IO consumption
Reprint Please specify source: http://blog.csdn.net/supera_li/article/details/45225077
IO consumption analysis
For IO consumption, sub-file IO and network IO. File IO is primarily the consumption of input and output streams and memory. Network IO is generally the throughput of the NIC, and Java programs generally do not incur network IO consumption. The reason is that heap memory will explode prematurely before network IO. There is no consumption of network IO.
File IO consumption
1.pidstat-d-t-p View Thread io consumption. This command must have the support of the Sysstat tool, please consult
To install Sysstat, use the Pidstat command
http://blog.csdn.net/supera_li/article/details/45221211
2.iostat commands are more commonly used. See overall IO consumption and follow iowait%. This value represents the wait time for IO, and the larger the IO congestion, the greater the consumption.
If high, pidstat see which thread occupies the highest. After obtaining the highest PID, Jstack executes thread dump. Analyze the source code, solve the problem caused by iowait
3. For Iostat-x XVDA 3 5 The awareness is 3s query Xvda device IO status, total query 5 times.
The corresponding value. The key is to await. The percentage that causes Util will be very high.
Network IO consumption
1. Check the network card interrupt by cat/proc/interrupts whether the CPU is balanced
The NIC terminals on Io are assigned to CUP0, while CUP2 is idle.
2.sar-n all 1 1 Review Network IO consumption information
It's on my CRT.
The meaning of the parameter
Look at the acceptance situation. If you accept more, check to see if an interrupt is generated, using command 1.
Resources:
[1]sar Command http://www.360doc.com/content/10/0925/10/1107705_56179926.shtml
[2] Java Distributed Applications-Network IO consumption Chapter
Performance tuning: IO consumption analysis