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

[Xen-devel] Node CPU Utilization


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: "Shuveb Hussain" <shuveb@xxxxxxxxx>
  • Date: Mon, 8 Oct 2007 19:42:32 +0530
  • Delivery-date: Mon, 08 Oct 2007 07:14:21 -0700
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

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