Incorrect memory values reported in "oc describe"
Environment
- Red Hat OpenShift Container Platform 4 (RHOCP4)
Issue
- Why is the allocatable memory values reported way higher than the actual memory on the node?
Capacity:
...
memory: 395911864Ki
Allocatable:
...
memory: 389954383052800m
- Why do we see memory units as
m
instead ofKi
orGi
- Does this cause Openshift to schedule more pods to the node than it can support?
Resolution
- The reported memory value is correct and does not affect pod scheduling.
- The value is a representation of the memory in
milli
Bytes or1/1000
bytes. - An example to understand would be similar to the following.
389954383052800m bytes
= 389954383052800 ÷ 1000 bytes
= 389954383052.8 bytes
= 389954383052.8 ÷ 1024 KiB
= 380814827.2 KiB ~ 363.17 GiB
Root Cause
- The resource values are expressed in the
BinarySI
format in the actual code implementation. - However, for fractional values and certain other circumstances, it is normal for the
BinarySI
quantities to be represented as theirDecimalSI
counterpart viz.389954383052800m
is the memory representation inmilli
Bytes.
Diagnostic Steps
oc describe
oroc get node <NODENAME> -o yaml
shows values for memory in milli unit.- Check if
autoSizingReserved
is set for the nodes where the memory value is seen in milli unit.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments