Bug 989797 - pmchart CPU view shows both User and Guest, but User CPU time includes Guest
pmchart CPU view shows both User and Guest, but User CPU time includes Guest
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: pcp (Show other bugs)
19
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Nathan Scott
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-29 21:19 EDT by Mark Goodwin
Modified: 2015-01-27 22:51 EST (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-01-27 22:51:20 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Mark Goodwin 2013-07-29 21:19:21 EDT
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
3.

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.
Comment 1 Mark Goodwin 2013-07-29 23:33:06 EDT
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.
Comment 2 Nathan Scott 2013-07-29 23:38:52 EDT
No RFC comments, just cheering from the side-lines - thanks for taking this on.
Comment 3 Mark Goodwin 2014-06-13 02:44:07 EDT
upstream commit finished this off 

commit 37f48043a79bb716dab62d7687aaff70376e5198
Author: Mark Goodwin <mgoodwin@redhat.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.

        modified:   src/pmchart/views/CPU
        new file:   src/pmchart/views/vCPU
Comment 4 Fedora Admin XMLRPC Client 2014-06-26 02:44:38 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 5 Fedora End Of Life 2015-01-09 14:09:35 EST
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.
Comment 6 Nathan Scott 2015-01-27 22:51:20 EST
Fixed by mgoodwin, as per earlier comment.

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