[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] xentop CPU% wrong?



Bonnell, David wrote:
> I noticed that the CPU% reported by xentop appears to be too high.  With
> dom0 idle xentop is reporting between 14-17% CPU utilization while at
> the same time top in dom0 is reporting 1-4% CPU utilization.  I see that
> the TODO for xentop includes a task to make CPU% more accurate but
> looking at the code for xentop and libxenstat I'm not sure how to go
> about this.  Assuming the CPU cycle data reported by Xen is fairly
> accurate then the only scope I can see for error in xentop is the
> calculation of elapsed time between samples, which may be improved by
> having libxenstat record the timestamp of each Xen hypercall it makes to
> collect stats and using those in xentop.

The TODO item to make CPU % more accurate includes several different things:
1) Making timestamping more accurate, either by moving the timestamping
closer to the point the data is collected or by moving the timestamping
code into libxenstat.  I'm inclined towards the latter.
2) Making libxenstat more efficient; the most notable issue at the
moment is that despite collecting all the domain information in one
hypercall, it collects the virtual CPU information via one hypercall per
VCPU.  This could be fixed by grouping these into one multicall.
3) Making xentop only request the information it actually needs from
libxenstat; right now it just passes the XENSTAT_ALL flag, rather than
determining which flags to pass based on which information is being
displayed.
4) Confirming that time intervals are measured correctly under Xen, by
comparing wall-clock time to gettimeofday results.

Each of these items would make the CPU time measurements more accurate.

> Does anyone else have any ideas why the CPU% could be so inaccurate?

The above items are the main issues I know of; if you find any others,
please let me know.

- Josh Triplett

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.