Bug 1809092

Summary: Difference in node memory stats from oc adm top node and free commands
Product: OpenShift Container Platform Reporter: Yash Chouksey <ychoukse>
Component: MonitoringAssignee: Pawel Krupa <pkrupa>
Status: CLOSED DUPLICATE QA Contact: Junqi Zhao <juzhao>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.11.0CC: alegrand, anpicker, erooth, kakkoyun, lcosic, mloibl, pkrupa, surbania
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-02 12:29:35 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 Yash Chouksey 2020-03-02 12:25:28 UTC
Description of problem:

After installation of metrics-server in OCP 3.11, there is a significant discrepancy in the output between the commands "oc adm top node" and "free -h". 

====================
# oc adm top node

NAME            CPU(cores)   CPU%      MEMORY(bytes)   MEMORY%
abc-node        1030m        1%        228483Mi        88%  

Here the consumed memory seen is around 88% of the total memory.

# free -h

       total   used        free      shared    buff/cache     available
Mem:    251G    21G         14G         18M        215G         227G
Swap:            0B          0B          0B

Whereas, from the free command we can verify that the consumed memory on the same node is 21G, which is very distant from what we saw in "oc adm top node" command. 

====================

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

Openshift Container Platform 3.11

How reproducible:

Always


Steps to Reproduce:

1. Configure OpenShift metrics server in your cluster, or must have heapster running on every node.
2. Check the memory stats from "oc adm top node" and "free" utilities. There is always a discrepancy in both the outputs.
3.

Actual results: 

Unmatching values.

Expected results: 

Administrators often use the "oc adm top" command to get a check of cluster stats. The expected behavior should be getting the same output from both commands.


Additional info:

Comment 1 Pawel Krupa 2020-03-02 12:29:35 UTC

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