Bug 629754 - [PATCH] Alter domain CPU statistics to account for VCPU allocation
Summary: [PATCH] Alter domain CPU statistics to account for VCPU allocation
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: virt-manager
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Cole Robinson
QA Contact:
URL:
Whiteboard:
: 475856 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-09-02 20:54 UTC by mspacex
Modified: 2011-07-12 14:02 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-12 14:02:03 UTC
Embargoed:


Attachments (Terms of Use)
patch against hg master (1.38 KB, text/plain)
2010-09-02 20:55 UTC, mspacex
no flags Details

Description mspacex 2010-09-02 20:54:05 UTC
Instead of having the displayed domain information be relative
to the number of physical cores on the host, this patch makes        
the domain CPU graphs instead be relative to the number of 
VCPUs allocated to the domain, where possible.

Enjoy!

~Michael Williams

Comment 1 mspacex 2010-09-02 20:55:21 UTC
Created attachment 442725 [details]
patch against hg master

Comment 2 Daniel Berrangé 2010-09-03 09:51:30 UTC
IMHO this is a less useful way of showing utilization because it means you can't accurately compare utilization of two different guests, without taking into consideration the number of vCPUs they have. eg, with this patch you can have 2 guests with same CPU utilization, but totally different displays. eg A guest with 2 vCPUs may show 100% utilization and a guest with 4 vCPUs may show 50% utilization, but in absolute terms both are consuming the same amount of CPU time. This is why the CPU time is display in terms of host CPUs, not guest vCPUs.
If we do need a way to display CPU time relative to vCPUs, then it should be a user preference which defaults to off.

Comment 3 mspacex 2010-09-03 16:59:12 UTC
I agree that depending on what you want to see in virt-manager, this patch may not be for everyone.  A user preference would allow someone to set what they wanted to see.

Could we maybe add another cpu graph on the line with the hypervisor connection name that shows the total host cpu usage?  That way you could see the overall hypervisor usage and still also see the guest cpu usage relative to itself.

The usage scenario where I find viewing the domain cpu information with this patch useful is on a hypervisor with 8 cores running at least 14 vms with 1 vcpu each.  Here, even with the domain using 100% cpu, the graph would never show more than 12.5% usage, barely even moving the on-screen graph.

Comment 4 mspacex 2010-11-19 22:50:00 UTC
I noticed that this older bug: https://bugzilla.redhat.com/show_bug.cgi?id=475856 seems to be illustrating the same point.

Comment 5 Andy Grover 2011-03-21 20:01:34 UTC
bug 629051, is this a duplicate?

in any case, let me add a "metoo" to wanting an option to view vcpu % as a user preference.

Comment 6 Cole Robinson 2011-07-12 13:58:47 UTC
*** Bug 475856 has been marked as a duplicate of this bug. ***

Comment 7 Cole Robinson 2011-07-12 14:02:03 UTC
Sorry for not getting to this sooner, I just never took the time to understand
what the complaints were all about. mspacex, I didn't use your original patch,
but thanks for the contribution, it helped me understand what was going on.

Addressed upstream now:

http://git.fedorahosted.org/git?p=virt-manager.git;a=commit;h=e31fa80e291d588a1946ab13618c12538af3f311

manager: Option to view VM CPU usage of guest OR host

Since forever, all we've ever shown is a VMs CPU usage according to host
resources. However I don't think this is the intuitive default, when users
see a graph for each VM IMO it implies the CPU usage of the guest's
resources.

Change the default to 'guest CPU usage', and add an extra optional column
for explicitly listing 'host CPU usage'


Note You need to log in before you can comment on or make changes to this bug.