Bug 1474511 - CPU / Memory and CPU usage / Memory Usage use inconsistent data
Summary: CPU / Memory and CPU usage / Memory Usage use inconsistent data
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: C&U Capacity and Utilization
Version: 5.8.0
Hardware: All
OS: All
medium
medium
Target Milestone: GA
: 5.10.0
Assignee: James Wong
QA Contact: Tasos Papaioannou
URL:
Whiteboard: c&u:NOR
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-24 19:45 UTC by Tasos Papaioannou
Modified: 2021-06-10 12:39 UTC (History)
6 users (show)

Fixed In Version: 5.10.0.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-07 23:02:36 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screen shot of the NOR values after the fix (130.23 KB, image/png)
2018-06-25 15:17 UTC, James Wong
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:0212 0 None None None 2019-02-07 23:02:47 UTC

Description Tasos Papaioannou 2017-07-24 19:45:25 UTC
Description of problem:

The CPU (MHz) and CPU Usage (%) values shown in the Normal Operating Ranges widget are not consistent with each other. Likewise for the Memory (MB) and Memory Usage (%) values. For example:

Normal Operating Ranges (over 30 days)
CPU 	  	 
Max 	271.48 MHz
High 	249.15 MHz
Average 132.34 MHz
Low 	15.54 MHz

CPU Usage 	  	 
Max 	Not Available
High 	5.86%
Average 3.18%
Low 	0.51%

Memory 	  	 
Max 	366.17 MB
High 	318.35 MB
Average 164.68 MB
Low 	11.01 MB

Memory Usage 	  	 
Max 	Not Available
High 	10.43%
Average 5.10%
Low 	0.00% 

The percentages do not match the corresponding MHz/MB values, e.g.,

High CPU / High CPU Usage = 249.15 / 0.0586 = 4251.71 MHz
Avg CPU / Avg CPU Usage = 132.34 / 0.0318 = 4161.64 MHz
Low CPU / Low CPU Usage = 15.54 / 0.0051 = 3047.06 MHz

The displayed values for avg / high (avg + std dev) / low (avg - std dev) use the following fields in metric_rollups:

CPU:		cpu_usagemhz_rate_average
CPU Usage:	min_max[:max_cpu_usage_rate]
Memory:		derived_memory_used
Memory Usage:	min_max[:max_mem_usage_absolute_average]

The CPU and Memory values are taken from daily averages, whereas CPU Usage and Memory Usage are taken from max usage values.

See also:

https://bugzilla.redhat.com/show_bug.cgi?id=1452364
https://bugzilla.redhat.com/show_bug.cgi?id=1468634
https://bugzilla.redhat.com/show_bug.cgi?id=1469243

Version-Release number of selected component (if applicable):

5.8.1.4

How reproducible:

100%

Steps to Reproduce:
1.) Capture several days' worth of C&U data for a VM
2.) View NOR data

Actual results:

CPU and Memory values don't match corresponding CPU Usage and Memory Usage values.

Expected results:

CPU and Memory values match corresponding CPU Usage and Memory Usage values.

Additional info:

Comment 2 James Wong 2018-06-25 15:17:06 UTC
Created attachment 1454387 [details]
Screen shot of the NOR values after the fix

Comment 3 James Wong 2018-06-25 15:23:55 UTC
Tasos,

Please check the screen shot and let me know if that makes sense now.

James

Comment 6 Tasos Papaioannou 2018-07-03 17:11:47 UTC
It seems reasonable. I'd have to do some testing with the fix to tell for sure.

Comment 7 CFME Bot 2018-07-03 18:46:23 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/c4bddc98e0a56b4b2a0fe4a5e4033b3e2ea5f1b0
commit c4bddc98e0a56b4b2a0fe4a5e4033b3e2ea5f1b0
Author:     James Wong <jwong>
AuthorDate: Tue Jun 19 19:42:22 2018 -0400
Commit:     James Wong <jwong>
CommitDate: Tue Jun 19 19:42:22 2018 -0400

    Normal Operating Range cpu/mem usage rate to use avg

    https://bugzilla.redhat.com/show_bug.cgi?id=1474511

 app/models/metric/long_term_averages.rb | 2 +
 app/models/vm_or_template/right_sizing.rb | 2 +
 spec/models/metric_spec.rb | 7 +
 3 files changed, 11 insertions(+)

Comment 8 CFME Bot 2018-07-05 13:53:14 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/5ba9e5105c956f11c194cc4f1adde8dab838f9ee
commit 5ba9e5105c956f11c194cc4f1adde8dab838f9ee
Author:     James Wong <webpotent>
AuthorDate: Fri Jun 22 13:13:49 2018 -0400
Commit:     James Wong <webpotent>
CommitDate: Fri Jun 22 13:13:49 2018 -0400

    NOR to use right values for cpu/mem usage

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1474511

 app/helpers/vm_helper/textual_summary.rb | 4 +-
 1 file changed, 2 insertions(+), 2 deletions(-)

Comment 9 Tasos Papaioannou 2018-07-10 19:37:31 UTC
Verified on 5.10.0.3.

Comment 10 errata-xmlrpc 2019-02-07 23:02:36 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2019:0212


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