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] CPU Usage Discrepancies

To: Pradeep Vincent <pradeep.vincent@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] CPU Usage Discrepancies
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Sun, 04 Mar 2007 12:12:45 +0000
Delivery-date: Sun, 04 Mar 2007 04:11:26 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <9fda5f510703021542s4c761f83wc83ffccccc2d3824@xxxxxxxxxxxxxx>
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcdeVmp7qL5hyMpJEdu9LwAWy6hiGQ==
Thread-topic: [Xen-devel] CPU Usage Discrepancies
User-agent: Microsoft-Entourage/11.3.3.061214
Does your /proc/stat analysis include time spent in the kernel?

Another possibility here is that, if your guest blocks a lot, you will see
that Linux counts the guest as 'running' for less of the context-switch path
than Xen does. This will cause Linux's estimate of time used to be less than
Xen's. There's not much to be done about that: in general Xen has more
knowledge of what is actually going on, including precisely when a switch of
control happens, and the numbers from xentop will be more accurate than
numbers generated by the guest itself (particularly with frequently-blocking
workloads). Although it depends on what you're interested in measuring -- if
you care about the amount of time spent doing useful application work (as
opposed to context switching) then you might be more interested in the Linux
stats because Xen will include more time spent in the Linux and Xen context
switch paths.

 -- Keir

On 2/3/07 23:42, "Pradeep Vincent" <pradeep.vincent@xxxxxxxxx> wrote:

> I see serious discrepancies between Cpu usage as reported by /proc/stat on
> Xen3
> virts and Cpu usage as reported by the hypervisor via "xm" tool
> (cpu_time). The problem exists on Intel and AMD platforms - 1 Vcpu and
> multiple Vcpu slots - 1 Physical CPU and multiple Physical CPU hosts.
> 
> The skew is pronounced with workloads that "sleep-wake-sleep-wake" at
> a high frequency while workloads that hog the CPU don't exhibit this
> problem as much.
> 
> Anybody seen this ? Any insights ?
> 
> http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=882 has all the
> details.
> 
> - Pradeep Vincent
> 
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel



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

<Prev in Thread] Current Thread [Next in Thread>