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
Created attachment 442725 [details] patch against hg master
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.
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.
I noticed that this older bug: https://bugzilla.redhat.com/show_bug.cgi?id=475856 seems to be illustrating the same point.
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.
*** Bug 475856 has been marked as a duplicate of this bug. ***
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'