CPU bottlenecks
-------------------
Here's a brief introduction to how to use command Vmstat, Tprof, and PS to check if the system has CPU bottlenecks.
1. Vmstat
Using commands
# vmstat 1 10
p650a:/#vmstat 1 10
System configuration:lcpu=16 MEM=15744MB
KTHR memory page Faults CPU
----- ----------- ------------------------ ------------ -----------
R B AVM fre re Pi po fr SR CY in SY CS US sy ID WA
0 0 3208684 10343 0 0 0 0 0 0 19 1447 290 0 0 99-0
0 0 3208686 10341 0 0 0 0 0 0 2 1268 248 0 0 99-0
0 0 3208686 10341 0 0 0 0 0 0 1 1265 246 0 0 99-0
0 0 3208687 10340 0 0 0 0 0 0 3 1260 254 0 0 99-0
0 0 3208687 10340 0 0 0 0 0 0 1 1320 264 0 0 99-0
0 0 3208687 10337 0 0 0 0 0 0 24 4145 321 0 3 97-0
0 0 3208687 10337 0 0 0 0 0 0 9 1438 313 0 0 99-0
0 0 3208687 10334 0 3 0 0 0 0 40 2348 1110 0 0 99-0
0 0 3208687 10334 0 0 0 0 0 0 1 1323 257 0 0 99-0
0 0 3208687 10334 0 0 0 0 0 0 5 1251 242 0 0 99-0
Note: The system will run slower when the running queue has process waiting.
ID CPU idle time or percent of no I/O wait time;
The percentage of CPU I/O wait time in WA;
R the number of threads in the running queue;
If the value of ID and WA persists to a value of close to 0, the CPU is busy at this time.
Let's look at the field R (number of threads in the running queue).
The greater the number of threads waiting in the run queue, the greater the impact of system performance.