All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: Calculating real cpu usage of Xen domains correctly!
@ 2005-02-24  0:48 Ian Pratt
  2005-02-24  1:02 ` Anthony Liguori
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Pratt @ 2005-02-24  0:48 UTC (permalink / raw)
  To: Anthony Liguori, Jerone Young; +Cc: xen-devel, ian.pratt


Rather than trying to come up with metrics like this, I'd rather have
vm-top show the percentage of a physical CPU that each domain used,
independent of it's allocation.
i.e. total including the idle domain will be #CPUS x 100%.

Ian

> >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 
> >  
> >
> So for instance, measured over the course of a second, you might get:
> 
> Domain-0:  98%
> Domain-1: 99%
> Domain-2: 0%
> 
> Which implies that both Domain-0 and Domain-1 are actively running 
> Domain-2 is probably blocked on IO.  The typical expectation 
> is that the 
> sum of all the usages is going to be 100%.
> 
> >2) Relative usage .. How much of the total of the cpu times is going
> >toward a particular domain.
> >  
> >
> The idea here is to have a relative measure.  So if Domain-0 
> used 98% of 
> it's time, and Domain-1 used 99%, then the result is something like:
> 
> Domain-0: 49%
> Domain-1: 50%
> Domain-2: 0%
> 
> That looks more right.  However, we think that means making 
> assumptions 
> about the underlying scheduling algorithm (meaning that if the 
> difference in cpu_time over a period of time is the same for two 
> domains, that those two domains have gotten the same amount 
> of CPU time).
> 
> Any advice or recommendations would be greatly appreciated.
> 
> Regards,
> Anthony Liguori
> 
> 
> -------------------------------------------------------
> 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@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xen-devel
> 


-------------------------------------------------------
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_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 20+ messages in thread
* RE: Calculating real cpu usage of Xen domains correctly!
@ 2005-02-24  2:37 Ian Pratt
  2005-02-24  3:10 ` Anthony Liguori
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Pratt @ 2005-02-24  2:37 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: Jerone Young, xen-devel, ian.pratt

 

> Right, that's exactly what we want to do.  How does one get that 
> information?  We thought that xc_domain_get_cpu_usage() would provide 
> that information but it doesn't appear too.

I would expect it to return the cumulative total CPU time in ns that the
domain has received.

If it doesn't I'd regard it as a bug.

Seperately, we should make sure we store a total cumulative time that
each CPU has been executing domains (other than idle).

Ian


-------------------------------------------------------
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_ide95&alloc_id\x14396&op=click

^ permalink raw reply	[flat|nested] 20+ messages in thread
* Calculating real cpu usage of Xen domains correctly!
@ 2005-02-23 23:29 Jerone Young
  2005-02-23 23:44 ` Anthony Liguori
  0 siblings, 1 reply; 20+ messages in thread
From: Jerone Young @ 2005-02-23 23:29 UTC (permalink / raw)
  To: xen-devel

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@us.ibm.com
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

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2005-02-25 21:35 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-24  0:48 Calculating real cpu usage of Xen domains correctly! Ian Pratt
2005-02-24  1:02 ` Anthony Liguori
2005-02-24  2:10   ` Andrew Theurer
2005-02-25  2:25   ` Matt Ayres
2005-02-25  2:38     ` Anthony Liguori
2005-02-25 16:44       ` Rob Gardner
2005-02-25 17:10         ` Anthony Liguori
2005-02-25 21:35           ` Calculating real cpu usage of Xen domains correctly! (PATCH) Rob Gardner
  -- strict thread matches above, loose matches on Subject: below --
2005-02-24  2:37 Calculating real cpu usage of Xen domains correctly! Ian Pratt
2005-02-24  3:10 ` Anthony Liguori
2005-02-24 13:56   ` John L Griffin
2005-02-24 20:43     ` Anthony Liguori
2005-02-24 21:46       ` John L Griffin
2005-02-24 22:02         ` Keir Fraser
2005-02-24 23:01         ` Anthony Liguori
2005-02-25  3:53           ` John L Griffin
2005-02-25 10:31         ` Stephan Diestelhorst
2005-02-25 10:38         ` Stephan Diestelhorst
2005-02-23 23:29 Jerone Young
2005-02-23 23:44 ` Anthony Liguori

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.