Bug 1809092 - Difference in node memory stats from oc adm top node and free commands
Summary: Difference in node memory stats from oc adm top node and free commands
Keywords:
Status: CLOSED DUPLICATE of bug 1804455
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Monitoring
Version: 3.11.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
: ---
Assignee: Pawel Krupa
QA Contact: Junqi Zhao
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-02 12:25 UTC by Yash Chouksey
Modified: 2020-03-02 12:29 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-02 12:29:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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 ***


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