WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: "Bonnell, David" <David_Bonnell@xxxxxxx>
Subject: Re: [Xen-devel] xentop CPU% wrong?
From: Josh Triplett <josh.trip@xxxxxxxxxxx>
Date: Sun, 11 Sep 2005 17:21:38 -0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 12 Sep 2005 06:49:31 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <E9DE7963E5EA6546B42A979EC28B4D0118AA2F40@xxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <E9DE7963E5EA6546B42A979EC28B4D0118AA2F40@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050802 Debian/1.7.10-1
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
<Prev in Thread] Current Thread [Next in Thread>