Red Hat Bugzilla – Bug 989797
pmchart CPU view shows both User and Guest, but User CPU time includes Guest
Last modified: 2015-01-27 22:51:20 EST
Description of problem: pmchart CPU view shows both User and Guest, but the CPU accounting code in the kernel double counts Guest CPU time as User CPU time too, so displaying both User and Guest is incorrect.
Version-Release number of selected component (if applicable): pcp-gui-1.5.9-1
How reproducible: always
Steps to Reproduce:
1. pmchart -c CPU
2. fire up a VM and burn some CPU time in it
Actual results: CPU charts (as a stacked bar) exceed NCPUs * 100%
Expected results: user cpu time should not include guest CPU time in the charts
Additional info: unfortunately the kernel CPU accounting double counts guest as user CPU time. To fix this I think we'll need a new metric, e.g. kernel.*.cpu.vuser (or some such name) that subtracts guest CPU time from user CPU time, accounting for counter wrapping and so forth. I don't think we can change the semantics of the existing kernel.*.cpu.user metric. We'll probably need a different CPU view variant for pmchart too, e.g. "HypervisorCPU" or something.
since I added Guest to the CPU view, I'll follow-thru with fixing this up. This BZ was posted for RFC reasons mostly. The main change will be in the Linux PMDA to add the new metric. Any RFC comments welcome.
No RFC comments, just cheering from the side-lines - thanks for taking this on.
upstream commit finished this off
Author: Mark Goodwin <email@example.com>
Date: Fri Jun 13 16:11:38 2014 +1000
Remove Guest from the standard CPU view since User (kernel.all.cpu.user)
includes Guest. Create a new view called vCPU that includes Guest and vUSER,
where vUSER is kernel.all.cpu.vuser which does not include Guest.
new file: src/pmchart/views/vCPU
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
This message is a notice that Fedora 19 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 19. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 19 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
Fixed by mgoodwin, as per earlier comment.