You run oc adm top nodes and see a worker node at 105% memory utilization. You panic, open the OpenShift Web Console, and the dashboard says the node is only at 80%. You then check your cloud provider console and see the node is at 65% memory usage.
When your node metrics clearly contradict each other, the answer rarely lives in the web dashboard. It lives in how the kubelet does its math, how Linux allocates pages, and the fundamental difference between what a cloud provider sees and what Kubernetes enforces.
Here is why oc adm top nodes, the OpenShift Prometheus stack, and your cloud provider metrics disagree and which one you should trust in production.
Understanding the Metrics Pipeline
Before we look at the discrepancy, you have to understand where the numbers come from. Kubernetes does not have a single source of truth for metrics, it has multiple pipelines designed for different jobs.
When you type oc adm top nodes, you are querying the Kubernetes Metrics API. The metrics-server implements this API by querying each node's kubelet over HTTP, pulling data from the /stats/summary endpoint. The kubelet, in turn, gets this data from cAdvisor, a daemon embedded inside it that collects container and node metrics directly from the host kernel.
In contrast, the OpenShift Web Console dashboards rely on the Prometheus monitoring stack (kube-state-metrics and node_exporter). node_exporter bypasses the kubelet entirely and reads raw OS files like /proc/meminfo and /proc/stat.
Meanwhile, your cloud provider (Azure Monitor, AWS CloudWatch) reads metrics from the hypervisor layer or a guest agent running directly on the OS. The hypervisor has zero context about Kubernetes concepts like Pods, Limits, or Requests.
Why oc adm top nodes Shows > 100% Memory
The most common shock for platform engineers is seeing oc adm top nodes report a MEMORY% greater than 100%.
This happens because oc adm top nodes does not calculate percentages against the physical RAM installed on the machine. By default, it calculates usage against the node's Allocatable memory.
Kubernetes aggressively partitions a node to ensure system stability.
The math looks like this:
[Allocatable] = [Node Capacity] - [system-reserved] - [Hard-Eviction-Thresholds] - [Pre-allocated memory like huge pages]If you have a 32GB VM, your Allocatable memory might only be 27GB after Kubernetes reserves space for the OS, the kubelet, and eviction buffers.
Here is where the math breaks down: The node memory usage metric pulled by oc adm top is calculated as node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes. The command then calculates the percentage using this formula:((Node Memory Usage) / (Allocatable)) * 100
Because the "Node Memory Usage" includes the memory consumed by the OS, system daemons, and pre-allocated huge pages, you are dividing a raw usage number by an artificially shrunken denominator.
If you use Huge Pages, the discrepancy explodes. Huge pages are deducted from the Allocatable total in advance, but the node memory usage still counts them as pre-allocated memory. As a result, the math effectively double-counts the huge pages against a shrunken capacity, spitting out highly inflated percentages.
The Fix:
To see the actual memory usage of your nodes based on physical capacity, pass the capacity flag:
$ oc adm top nodes --show-capacityThis forces the command to base its percentage on MemTotal in /proc/meminfo instead of Allocatable, dropping your terrifying 105% back down to the accurate 75%.
Pod Metrics: Working Set vs. RSS
The discrepancy deepens when you compare oc adm top nodes with the sum of oc adm top pods.
When you run oc adm top pods, OpenShift surfaces the container_memory_working_set_bytes metric via the prometheus-adapter.
Kubernetes heavily relies on the "working set" rather than Resident Set Size (RSS). In Kubernetes, the working set is defined as the amount of memory in use that cannot be freed under memory pressure.
Working set includes:
- Anonymous memory (standard application memory).
- Active page cache (files recently accessed from disk).
The page cache exists to improve disk I/O performance. The Linux kernel aggressively caches files in unused RAM. If a container reads a large file, the active page cache spikes. Because Kubernetes considers active page cache part of the working set, oc adm top pods will show a massive spike in memory usage, pushing the pod closer to its cgroup OOM limit.
However, cloud VM metrics often classify page cache as "Available" or "Cached" memory, not "Active" application memory. The Azure portal looks at the VM and says, "That RAM is just caching files; if the OS needs it, it can drop the cache instantly." The cloud metric shows low utilization, while the kubelet sees a pod danger-close to its OOM kill threshold.
The CPU Discrepancy: Rates vs. Point-in-Time
CPU metrics introduce their own flavor of chaos.
When you look at oc adm top nodes, the CPU value is derived by taking a rate over a cumulative CPU counter provided by the kernel over a specific time window.
If your application bursts heavily across 4 cores for 15 seconds, and then sits idle, the CPU usage depends entirely on the aggregation window. oc adm top provides a short-window snapshot. The OpenShift Prometheus console averages this out over PromQL queries (like rate(container_cpu_usage_seconds_total[5m])), flattening the spikes. Your cloud metric might average CPU usage over a 1-minute or 5-minute interval at the hypervisor level.
This means:
- oc adm top catches the micro-burst.
- OpenShift Console smooths it out over 5 minutes.
- Cloud Metrics measure the overall physical core scheduling on the hypervisor hardware.
The SystemReserved Alert Mystery
Sometimes the confusion isn't the percentage, but the alerts. You might receive a SystemMemoryExceedsReservation alert, log into the cluster, run oc adm top node, and see perfectly normal, healthy memory usage.
This happens frequently on OpenShift Data Foundation (ODF) nodes or heavy infrastructure nodes. The SystemMemoryExceedsReservation alert does not mean the node is out of memory, nor does it mean your pods are consuming too much memory.
It means that the host's system processes (kubelet, CRI-O, OS daemons, OSDs/MONs) are consuming more than 95% of the specifically carved-out systemReserved memory slice. You can have 60GB of completely free RAM on the node, but if the default systemReserved is only set to 1.5GB and the system processes need 1.8GB, the alert fires.
The Fix: You must increase the systemReserved memory via a KubeletConfig for those specific nodes:
apiVersion: machineconfiguration.openshift.io/v1kind: KubeletConfigmetadata: name: odf-system-reservedspec: machineConfigPoolSelector: matchLabels: machineconfiguration.openshift.io/role: worker kubeletConfig: systemReserved: memory: 4GiThis forces the kubelet to set aside a larger chunk of memory exclusively for system daemons, silencing the alert without changing the actual physical memory footprint of the node.
Cgroups v2: The Real Source of Truth
Applying the legacy resource mindset of standard Linux hosts to OpenShift nodes leads directly to misunderstanding.
In modern OpenShift running Linux Cgroups v2, resource accounting happens in a unified hierarchy under /sys/fs/cgroup/. The kubelet translates your Pod YAML limits and requests directly into kernel interface files like cpu.max, cpu.weight, memory.max, and memory.high.
When oc adm top pods shows a pod approaching its limit, it is reading the proximity to the memory.max hard boundary. In cgroup v1, hitting this boundary meant an instant OOM kill.
But in cgroup v2, Kubernetes utilizes a multi-gate model. If a container's working set crosses memory.high, the kernel doesn't immediately kill it. Instead, it aggressively slows down the allocating threads and forces background page reclaim.
If you see latency spikes but your cloud VM metrics look fine and oc adm top shows CPU and memory to spare, check the Pressure Stall Information (PSI) directly on the node.
Exec into the node and read the cgroup files directly:
$ cat /sys/fs/cgroup/kubepods.slice/.../cri-containerd-<ID>.scope/memory.eventsIf the high counter is climbing, the kernel is actively throttling your workload for memory, regardless of what the hypervisor Azure portal says.
Check the pressure files:
$ cat /sys/fs/cgroup/kubepods.slice/.../memory.pressuresome avg10=0.42 avg60=0.18 avg300=0.05 total=314502If some is high, threads are stalling. This is the absolute truth of node saturation. A node with 99% memory utilization and avg10=0.00 stall time is a perfectly healthy, efficient node. A node with 50% memory utilization and avg10=0.50 stall time is suffocating under I/O or page reclaim pressure. When that pressure comes from a stuck storage backend, the kernel can pin threads in uninterruptible sleep, which is why pods sometimes refuse to terminate even after the app recovers.
Learnings
- Stop panicking over oc adm top nodes percentages. It calculates against a shrunken Allocatable boundary and double-counts pre-allocated structures like huge pages. Run
oc adm top nodes --show-capacityfor an accurate physical footprint. - Know your dashboard's backend. The OpenShift Console uses Prometheus for long-term historical smoothing. oc adm top queries the Metrics API for a rapid, short-window snapshot. Cloud provider metrics show hardware scheduling and ignore Kubernetes limits entirely.
- Watch your reservations. If you get system reservation alerts on healthy nodes, adjust your KubeletConfig to allocate more headroom for CRI-O and system daemons.
- Trust the Kernel. When dashboards lie, the
/sys/fs/cgroup/files do not. If you want to know if a node is truly out of resources, look at Pressure Stall Information (PSI). If threads aren't stalling, the node is fine.