mpstat is a simple command that shows how your processors are doing based on time. In a multiple CPUs or hyperthreading-enabled CPUs, you can see if a particular processor is doing more work than the others, are they fully utilized or balanced by observing the number of interrupts each CPU is handling.
mpstat -P ALL --
Linux 2.6.18-274.18.1.el5 (dcsr103.com) 03/01/2009
11:21:44 AM CPU %user %nice %sys %iowait %irq %soft %steal %idle intr/s
11:21:44 AM all 0.21 0.01 0.09 0.26 0.00 0.01 0.00 99.43 1181.58
11:21:44 AM 0 0.19 0.00 0.06 0.01 0.00 0.00 0.00 99.74 1000.24
11:21:44 AM 1 0.15 0.00 0.08 0.27 0.00 0.01 0.00 99.49 7.12
11:21:44 AM 2 0.29 0.01 0.10 1.33 0.00 0.02 0.00 98.26 17.95
11:21:44 AM 3 0.19 0.00 0.09 0.44 0.00 0.01 0.00 99.26 5.75
11:21:44 AM 4 0.25 0.01 0.08 1.09 0.00 0.02 0.00 98.55 15.29
11:21:44 AM 5 0.18 0.00 0.06 0.18 0.00 0.00 0.00 99.57 1.79
11:21:44 AM 6 0.20 0.00 0.06 0.13 0.00 0.01 0.00 99.59 5.20
11:21:44 AM 7 0.16 0.00 0.06 0.05 0.00 0.00 0.00 99.72 9.02
11:21:44 AM 8 0.17 0.01 0.06 0.01 0.00 0.00 0.00 99.75 1.13
11:21:44 AM 9 0.15 0.00 0.06 0.04 0.00 0.00 0.00 99.75 2.78
11:21:44 AM 10 0.33 0.01 0.18 0.11 0.00 0.02 0.00 99.36 4.68
11:21:44 AM 11 0.27 0.01 0.18 0.06 0.00 0.02 0.00 99.46 2.34
11:21:44 AM 12 0.25 0.01 0.08 0.08 0.00 0.01 0.00 99.58 5.94
11:21:44 AM 13 0.18 0.00 0.08 0.05 0.00 0.01 0.00 99.68 28.32
11:21:44 AM 14 0.22 0.01 0.07 0.02 0.00 0.01 0.00 99.67 9.16
11:21:44 AM 15 0.19 0.00 0.09 0.23 0.00 0.03 0.00 99.45 64.86
In the above output, it seems that one CPU handles all the interrupts. This could be the cause of a bottle neck because one CPU is busy and the rest are waiting for work to do.
mpstat -P 0 1 5 .........CPU Statistics for processor 0
Linux 2.6.18-274.18.1.el5 (dcsr103.com) 03/01/2009
11:30:24 AM CPU %user %nice %sys %iowait %irq %soft %steal %idle intr/s
11:30:25 AM 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 1001.00
11:30:26 AM 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 1001.00
11:30:27 AM 0 1.00 0.00 0.00 0.00 0.00 0.00 0.00 99.00 1001.00
11:30:28 AM 0 0.00 0.00 0.99 0.00 0.00 0.00 0.00 99.01 991.09
11:30:29 AM 0 0.00 0.00 0.00 0.00 0.00 0.00 0.00 100.00 1011.11
Average: 0 0.20 0.00 0.20 0.00 0.00 0.00 0.00 99.60 1001.00
No comments:
Post a Comment