Say 05 Basics: CPU usage of an application actually reaches 100%, how can I do

summary

CPU usage is the most intuitive and most commonly used system performance, it is the first indicator When we troubleshoot performance problems usually concern. So we have to be familiar with its meaning, in particular, to clarify the user (% user), Nice (% nice), system (% system), waiting for I / O (% iowait), interrupt (% irq) and soft interrupt (% softirq) that several different CPU usage. For example:

  • Nice high CPU and user CPU, explained user mode process consumes more CPU, so it should focus on troubleshooting performance problems process.

  • High system CPU, explained kernel mode takes up more CPU, so it should focus on troubleshooting performance problems or system calls kernel threads.

  • I / O wait for high CPU, the wait I / O in a long time, so it should focus on the investigation system memory is not there an I / O problem.

  • Soft and hard break interrupt high, indicating the soft interrupt or hardware interrupt handler takes up more CPU, so it should focus on the investigation of the kernel interrupt service routine.

Problems encountered CPU utilization increases, you can use top, pidstat and other tools, identify the source of performance issues caused by CPU; perf re-use tools such investigation and the specific function to cause performance problems.

Guess you like

Origin www.cnblogs.com/xiaobao2/p/11592614.html