Bug 1812098

Summary: Inconsistent data regarding cluster memory consumption
Product: OpenShift Container Platform Reporter: Pawel Krupa <pkrupa>
Component: Management ConsoleAssignee: bpeterse
Status: CLOSED DUPLICATE QA Contact: Yadan Pei <yapei>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.4CC: aos-bugs, jokerman
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-10 14:44:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pawel Krupa 2020-03-10 14:15:08 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

*** This bug has been marked as a duplicate of bug 1812096 ***