Bug 1495133 - Stored C&U "CPU (Mhz)" values for RHV VMs are incorrect (too high) by a factor of two
Summary: Stored C&U "CPU (Mhz)" values for RHV VMs are incorrect (too high) by a facto...
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: C&U Capacity and Utilization
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: 5.10.0
Assignee: Boriso
QA Contact: Angelina Nikiforova
Depends On:
Blocks: 1526118 1550715
TreeView+ depends on / blocked
Reported: 2017-09-25 09:18 UTC by Peter McGowan
Modified: 2019-06-06 12:00 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1526118 1550715 (view as bug list)
Last Closed: 2018-06-21 20:22:21 UTC
Category: ---
Cloudforms Team: RHEVM

Attachments (Terms of Use)
CPU (Mhz) graph from C&U (84.13 KB, image/png)
2017-09-25 09:18 UTC, Peter McGowan
no flags Details

Description Peter McGowan 2017-09-25 09:18:00 UTC
Created attachment 1330464 [details]
CPU (Mhz) graph from C&U

Description of problem:
The Capacity & Utilization metrics values for "CPU (Mhz)" are too high by a factor of two for RHV VMs. This appears to be due to an erroneous :precision value of 2 in 

For example the values retrieved by perf_collect_metrics for the graph shown in the attachment are as follows:

Timestamp: 2017-09-22T16:17:16Z, :cpu_usagemhz_rate_average=>306.8928
Timestamp: 2017-09-22T16:17:36Z, :cpu_usagemhz_rate_average=>238.69440000000003
Timestamp: 2017-09-22T16:17:56Z, :cpu_usagemhz_rate_average=>272.7936
Timestamp: 2017-09-22T16:18:16Z, :cpu_usagemhz_rate_average=>170.496
Timestamp: 2017-09-22T16:18:36Z, :cpu_usagemhz_rate_average=>409.1904
Timestamp: 2017-09-22T16:18:56Z, :cpu_usagemhz_rate_average=>170.49
Timestamp: 2017-09-22T16:19:16Z, :cpu_usagemhz_rate_average=>272.7936}
Timestamp: 2017-09-22T16:19:36Z, :cpu_usagemhz_rate_average=>238.69440000000003
Timestamp: 2017-09-22T16:19:56Z, :cpu_usagemhz_rate_average=>136.3968
Timestamp: 2017-09-22T16:20:16Z, :cpu_usagemhz_rate_average=>238.69440000000003
Timestamp: 2017-09-22T16:20:36Z, :cpu_usagemhz_rate_average=>306.8928
Timestamp: 2017-09-22T16:20:56Z, :cpu_usagemhz_rate_average=>375.0912
Timestamp: 2017-09-22T16:21:16Z, :cpu_usagemhz_rate_average=>136.3968
Timestamp: 2017-09-22T16:21:36Z, :cpu_usagemhz_rate_average=>375.0912
Timestamp: 2017-09-22T16:21:56Z, :cpu_usagemhz_rate_average=>272.7936
Timestamp: 2017-09-22T16:22:16Z, :cpu_usagemhz_rate_average=>375.0912
Timestamp: 2017-09-22T16:22:36Z, :cpu_usagemhz_rate_average=>375.0912
Timestamp: 2017-09-22T16:22:56Z, :cpu_usagemhz_rate_average=>613.7856
Timestamp: 2017-09-22T16:23:16Z, :cpu_usagemhz_rate_average=>511.488
Timestamp: 2017-09-22T16:23:36Z, :cpu_usagemhz_rate_average=>443.2896
Timestamp: 2017-09-22T16:23:56Z, :cpu_usagemhz_rate_average=>375.0912
Timestamp: 2017-09-22T16:24:16Z, :cpu_usagemhz_rate_average=>170.496
Timestamp: 2017-09-22T16:24:36Z, :cpu_usagemhz_rate_average=>204.5952
Timestamp: 2017-09-22T16:24:56Z, :cpu_usagemhz_rate_average=>170.496
Timestamp: 2017-09-22T16:25:16Z, :cpu_usagemhz_rate_average=>443.2896
Timestamp: 2017-09-22T16:25:36Z, :cpu_usagemhz_rate_average=>272.7936
Timestamp: 2017-09-22T16:25:56Z, :cpu_usagemhz_rate_average=>272.7936
Timestamp: 2017-09-22T16:26:16Z, :cpu_usagemhz_rate_average=>204.5952
Timestamp: 2017-09-22T16:26:36Z, :cpu_usagemhz_rate_average=>375.0912
Timestamp: 2017-09-22T16:26:57Z, :cpu_usagemhz_rate_average=>170.496
Timestamp: 2017-09-22T16:27:17Z, :cpu_usagemhz_rate_average=>204.5952

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

How reproducible:
Every Time.

Steps to Reproduce:
1. Find a RHV VM in the WebUI, and go to the Monitoring -> Utilization button. Select Interval -> 'Most Recent Hour' metrics and show 10 minutes back. Observe the values for CPU (Mhz)
2. In Rails console, find the same VM, and call vm.perf_collect_metrics('realtime', 1.hour.ago). Identify the :cpu_usagemhz_rate_average values for the same time points that the graph showed

Actual results:
Observe that the real-time values retrieved from perf_collect_metrics are half the values shown in the graph.

Expected results:
The real-time values retrieved from perf_collect_metrics should match the values in the graph.

Additional info:

The :precision value of 2 is also set for disk_usage_rate_average and net_usage_rate_average so it's possible that these are also incorrect.

Comment 2 Oved Ourfali 2017-09-29 07:15:42 UTC
Shirly, can you please take a look?

Comment 3 Shirly Radco 2017-11-15 21:03:46 UTC
Please set an environment we can check this in.

Comment 11 CFME Bot 2017-12-07 12:46:58 UTC
New commit detected on ManageIQ/manageiq/master:

commit 34a1528e9536b81ad74b1645dce8186df4e6cafb
Author:     Boris Odnopozov <bodnopoz@redhat.com>
AuthorDate: Thu Dec 7 13:29:49 2017 +0200
Commit:     Boris Odnopozov <bodnopoz@redhat.com>
CommitDate: Thu Dec 7 13:29:49 2017 +0200

    Bumping the ovirt_metrics gem version
    Several bug fixes are included in the new release, including:

 Gemfile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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