Bug 1812096 - Inconsistent data regarding cluster memory consumption
Summary: Inconsistent data regarding cluster memory consumption
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.5.0
Assignee: Rastislav Wagner
QA Contact: Yadan Pei
URL:
Whiteboard:
: 1812098 (view as bug list)
Depends On:
Blocks: 1815388
TreeView+ depends on / blocked
 
Reported: 2020-03-10 14:14 UTC by Pawel Krupa
Modified: 2020-08-04 18:04 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Utilization card and top consumers popover used different ways to calculate memory usage Consequence: Memory consumption data are not consistent Fix: Use the same queries for both utilization card and top consumer popover Result: Memory consumption data are consistent
Clone Of:
: 1815388 (view as bug list)
Environment:
Last Closed: 2020-08-04 18:04:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift console pull 4712 0 None closed Bug 1812096: Update node memory utilization query 2020-06-23 09:15:50 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-08-04 18:04:27 UTC

Description Pawel Krupa 2020-03-10 14:14:24 UTC
Description of problem:
Currently in the section "Cluster Utilisation" memory consumption is calculated using following query:

sum(node_memory_Active_bytes)

However, when using "by node" breakdown, the query used is:

`topk(25, sort_desc(node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes))`.

Difference between queries causes differences in perceived memory usage.


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


How reproducible:
always


Steps to Reproduce:
1. Start a cluster
2. Open Console

Actual results:
Cluster memory usage is calculated by taking only Active memory


Expected results:
Cluster memory consumption should be calculated by using `Total - Available` difference or with following query:

sum(node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes)

Additional info:

This is probably also present in previous OpenShift versions, but I didn't verify it.

Possibly this line needs a change: https://github.com/openshift/console/blob/master/frontend/public/components/dashboard/dashboards-page/cluster-dashboard/queries.ts#L70

Comment 1 bpeterse 2020-03-10 14:44:33 UTC
*** Bug 1812098 has been marked as a duplicate of this bug. ***

Comment 2 bpeterse 2020-03-10 19:30:42 UTC
Targeting 4.5 as we are past code freeze.

Comment 5 Yadan Pei 2020-03-20 06:04:33 UTC
Now

Memory Utilization query is using query_range?start=1584679548.928&end=1584683148.928&step=60&query=sum(node_memory_MemTotal_bytes+-+node_memory_MemAvailable_bytes)
Memory Total query is using query?query=sum(node_memory_MemTotal_bytes)

Verified on 4.5.0-0.nightly-2020-03-19-112259

Comment 7 errata-xmlrpc 2020-08-04 18:04:23 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 (OpenShift Container Platform 4.5 image release 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/RHBA-2020:2409


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