Cloud Native 10 min read

What Does “52m” Mean in kubectl top? Decoding Kubernetes Millicores

The article explains how kubectl top reports CPU usage in millicores, what the “m” unit represents, how Kubernetes measures and aggregates these metrics via cgroups, Kubelet, and Metrics Server, and how millicores relate to traditional CPU cores, requests, limits, and resource scheduling.

Ops Development & AI Practice
Ops Development & AI Practice
Ops Development & AI Practice
What Does “52m” Mean in kubectl top? Decoding Kubernetes Millicores

Introduction

When troubleshooting a Kubernetes cluster or monitoring resource consumption, the kubectl top command is a frequently used tool that quickly shows the current CPU and memory usage of Nodes or Pods. For example, running kubectl top po produces output such as:

app-api-686799f58d-bgfrl       52m         1991Mi
app-api-686799f58d-hcqzc       52m         2015Mi
app-api-686799f58d-p2xbc       49m         1986Mi

The values like 52m and 49m are the CPU usage of the Pods, but what exactly do they mean and how do they relate to familiar concepts such as CPU clock speed (GHz) or core count?

What kubectl top Shows

kubectl top

displays the average resource usage of a Kubernetes resource (Node or Pod) over a short recent interval. The resources measured are CPU and memory.

For CPU, the command reports the amount of compute time consumed by the Pod or Node.

Millicores (the “m” Unit)

The CPU usage shown by kubectl top uses the unit m, which stands for millicores . In Kubernetes, a full CPU core is defined as 1000m. 1000m = 1 full CPU core 500m = 0.5 CPU core (half a core) 52m = 0.052 CPU core 5m = 0.005 CPU core

Kubernetes introduced millicores to allow fine‑grained allocation and measurement of CPU resources, because most applications do not need an entire core.

How CPU Metrics Are Collected

cgroups (Linux control groups) : On each node, the container runtime (e.g., containerd, CRI‑O) uses cgroups to isolate and monitor each container’s resource usage. cgroups track the total CPU time (in nanoseconds or clock cycles) consumed by each process.

Kubelet collection : The Kubelet running on each node periodically reads the cumulative CPU time from cgroups.

Rate calculation : Kubelet compares the current cumulative time with the previous reading, divides the difference by the elapsed interval, and obtains the average CPU usage rate for that period.

Normalization to millicores : The rate is expressed as a fraction of a full CPU core and multiplied by 1000 to convert to millicores. For example, using 0.5 seconds of CPU time over a 10‑second interval yields 0.05 × 1000 = 50m.

Metrics Server aggregation : A Metrics Server component (usually deployed in the cluster) pulls these averaged CPU and memory values from every node’s Kubelet every 10–30 seconds.

kubectl top query : When you run kubectl top, the API server requests the latest metrics from the Metrics Server and displays them.

Thus, the 52m you see represents the average consumption of 52 millicores during the most recent collection interval—an average, not an instantaneous snapshot.

Kubernetes CPU vs. Traditional CPU

Correlation : 1000m corresponds to one physical or virtual CPU core. If a node has a 4‑core CPU, the node can theoretically provide up to 4000m of CPU capacity (actual usable capacity may be slightly lower due to system overhead). A Pod showing 52m is using about 5.2 % of a single core’s capacity.

Difference : Traditional CPU performance is tied to clock frequency (GHz). Kubernetes abstracts away these frequency differences; a 1000m allocation on a 2 GHz core is considered equivalent to 1000m on a 3 GHz core. The value 52m therefore indicates a standardized share of a core, not a specific GHz amount.

This abstraction simplifies scheduling across heterogeneous nodes, allowing the scheduler to treat all cores as equal resource units.

Relation to CPU Requests and Limits

In a Pod spec you can define requests and limits for CPU: requests: The amount of CPU a Pod asks for at startup; the scheduler uses this to decide placement. limits: The maximum CPU a Pod may consume; it prevents a Pod from monopolizing node resources.

The CPU metric shown by kubectl top (e.g., 52m) is the Pod’s actual usage. This usage is typically ≥ the request (if the node has spare capacity) and should not exceed the limit (otherwise the Pod may be throttled).

Conclusion

The CPU figures displayed by kubectl top are average values expressed in millicores, representing the standardized share of a CPU core a Pod consumed during the most recent measurement window. One thousand millicores equal one full core, but the metric abstracts away the underlying clock frequency, enabling consistent resource planning, monitoring, and troubleshooting across diverse Kubernetes clusters.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Cloud NativeKubernetesResource MonitoringkubectlCPU MetricsMillicores
Ops Development & AI Practice
Written by

Ops Development & AI Practice

DevSecOps engineer sharing experiences and insights on AI, Web3, and Claude code development. Aims to help solve technical challenges, improve development efficiency, and grow through community interaction. Feel free to comment and discuss.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.