[Xen-devel] CPU Utilization

Dave Thompson \(davetho\)
Mon, 12 Dec 2005 19:07:18 -0000

I have a question concerning the CPU utilization number provided by
the ''xm top'' command in xen 3.0.  I''ve noticed that
if I run a TCP
performance tool on domain 0 which simply receives and echos back
a TCP stream, the output of ''xm top'' during the test does not
match
up with the output of ''top'' on domain 0 in terms of CPU
utilization
(nor with the CPU utilization computed by the test program).

In this example, ''xm top'' shows a CPU utilization for domain 0
of
around 65% during the test while ''top'' at the same time
indicates
that the domain is around 70% idle (the test tool also indicates
that the CPU utilization averages about 30% during the test).

Output from ''xm top'':
xentop - 12:44:29   Xen 3.0.0
1 domains: 1 running, 0 blocked, 0 paused, 0 crashed, 0 dying, 0
shutdown
Mem: 2094904k total, 559792k used, 1535112k free    CPUs: 2 @ 3800MHz
      NAME  STATE   CPU(sec) CPU(%)     MEM(k) MEM(%)  MAXMEM(k)
MAXMEM(%) VCPUS NETS NETTX(k) NETRX(k) SSID
  Domain-0 -----r        273   66.6     519192   24.8   no limit
n/a     2    8 17120030 17489822    0
VCPUs(sec):   0:        273s

Output from ''top'':
Tasks:  69 total,   2 running,  67 sleeping,   0 stopped,   0 zombie
Cpu(s):  1.0% us,  7.3% sy,  0.0% ni, 73.3% id,  0.0% wa,  3.3% hi,
15.0% si
Mem:    505556k total,   497812k used,     7744k free,   109624k buffers
Swap:  2104472k total,        0k used,  2104472k free,   212904k cached

Any idea why these displays disagree?

Thanks,
Dave Thompson