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

[Xen-devel] Node CPU Utilization

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] Node CPU Utilization
From: "Shuveb Hussain" <shuveb@xxxxxxxxx>
Date: Mon, 8 Oct 2007 19:42:32 +0530
Delivery-date: Mon, 08 Oct 2007 07:14:21 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=VhQo/E1DIE+6ayh1qQN1iu+SPEEbZ7Ja28nVLiQALTA=; b=synvWz37yTSkie70zljSt4oQF1p1iOgmtuCaM1a+mAAfF10+9NWc0epc+2dNH4ptqwQkq5UV8YmSSjuzp6qB0MxOM0/e1/K7Jz/gnUkWex9NLPOMnaCY2zqfb4LqdxZhPvD0k7GsnrVPU8tUv9NFo7ifpWgwiX//3mIqgX84Isw=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Yd2YwxVx7oOUAxzc1ezRK6zQXmScZ54SIn0be0cGsrfTxIwYy3CRHs9iUuAodmpSqDqPFGQeXPB2InVOrvqxfJXa38ZNTrQdeSETkA6IoVyZr5oAWkAVM6ERv/aTJCwz8LF12XxcEcV+QyJZM86QF3zx4E/NxoNtj8ixiaD5/X0=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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
Hi,

While getting a hardware node's CPU utilization, I'm getting values
between .0 and 1.0. These values however do not seem to correspond to
load on the domains themselves. I have a program that print these
values once a second for all cpus on the node:

import XenAPI
import time

session = None

def print_cpu_utilization():
    # Find a non-template VM object
    cpus = session.xenapi.host_cpu.get_all()

    while True:
        for cpu in cpus:
            load = session.xenapi.host_cpu.get_utilisation(cpu)
            print load
        time.sleep(1)

url = 'httpu:///var/run/xend/xen-api.sock'
username = 'fakeuser' # we run as root, dont worry about auth
password = 'fakepass'
# First acquire a valid session by logging in:
session = XenAPI.Session(url)
session.xenapi.login_with_password(username, password)
print_cpu_utilization()

Some observations:
* If I run a program with only a tight loop on dom0, this seems to
affect the figures printed out by this program. One of the CPUs
exhibits values near .8 or .9

* If I run the same tight loop on a HVM domain, the printed values
don't seem to be affected.

* With an increase in the number of guest domains (HVM), the values
printed by the program goes up. For example, I started 2 HVM domains
and the values for 2 CPUs on my system stayed near .4, even if the
domains were doing nothing.

* When I start the 3rd domain, however, it takes ages to start. Even
though, as per utilization figures, only about 40% of the CPU is
loaded.

I'm running Xen 3.1 on a Fedora Core 7 system. Please share your
thought on this.

Regards,
-- 
Shuveb Hussain.
Money has nothing to do with Happiness,
But, Poverty has a lot to do with Sorrow.
Company: www.binarykarma.com
Blog: www.binarykarma.org

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] Node CPU Utilization, Shuveb Hussain <=