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] Calculating real cpu usage of Xen domains correctly!

To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] Calculating real cpu usage of Xen domains correctly!
From: Jerone Young <jyoung5@xxxxxxxxxx>
Date: Wed, 23 Feb 2005 17:29:31 -0600
Delivery-date: Wed, 23 Feb 2005 23:34:47 +0000
Envelope-to: xen+James.Bulpin@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
Hi all,
        With the new vm-tools we are trying to get top like capabilities going
correctly. Currently we have a program vm-list that has some of this
capability but is dependent on the cpu time given by libxc calls
(xc_get_dom_info & xc_domain_get_cpu_usage). These two functions give
you how much time (in nanoseconds, why is this not documented) the
domain has been actively used. Approaches:

1) CPU time % measured per domain
(The differential of cpu usage time / some differential time) x 100
 new_cpu_time-old_cpu_time           new_time-old_time 
 
This provides us with the % time the domain had activity ...but does not
give us absolute real CPU usage. Another problem here is sometimes you
will get percentages like %103 usage, because the cpu usage returned by
theses functions looks to be measured slightly over a second.

So this one leads to the next

2) Relative usage .. How much of the total of the cpu times is going
toward a particular domain.
(differential of domain cpu time / total differential of all domains cpu
times)
  new_cpu_time-old_cpu_time   total_new_cpu_times-total_old_cpu_times

This one gives you a good idea of what percentage a domain took of the
total active cpu usage time.


Nnot sure this the totally correct way of going about doing this.
Anthony Ligouri and I rea bit perplexed if there is a better way. Does
anyone know if there is a better way and is there a way to get the real
CPU usage.

 
-- 
Jerone Young
Open Virtualization
IBM Linux Technology Center
jyoung5@xxxxxxxxxx
512-838-1157 (T/L: 678-1157)



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel