The Physics of Computing
Your CPU Is Not Your CPU
A container's CPU allocation is the end of a scheduling chain, not a private piece of silicon. Understanding that chain explains throttling, contention and surprising latency.
A process sees CPUs. A container sees a quota, a cpuset or both. A virtual machine sees virtual CPUs. The physical machine has cores, hardware threads, caches, memory channels and a scheduler deciding who gets to use them.
These are not interchangeable views of the same resource.
When an application thread is runnable, it does not simply walk over to a core and execute. It passes through a stack of scheduling decisions. In a virtualised Kubernetes environment, that stack can include the application runtime, the guest kernel, the virtual CPU scheduler, the host kernel and the physical processor’s own execution resources.
A CPU limit is an enforcement mechanism
A CPU request is primarily a scheduling weight and placement signal in Kubernetes. A CPU limit is an upper bound enforced through CPU bandwidth control. They solve different problems.
A container can have a dedicated cpuset and still encounter a quota. Pinning constrains where a task may run; a quota constrains how much CPU time the group may consume over an enforcement period. One does not automatically cancel the other.
This distinction matters for bursty workloads. A workload can consume its available budget early in a period and then be throttled until the next period, even when the application has more work ready to run.
More CPUs are not automatically more throughput
A wider allocation can increase parallelism, but it can also expose contention elsewhere: shared caches, memory bandwidth, locks, garbage collection coordination, run queues or downstream dependencies.
The useful question is not how many CPUs the deployment declares. It is how much useful work completes per unit of wall-clock time, and where execution time is being lost.
Measure the whole path
Look at throttled time, CPU usage, run-queue pressure, context switches, application-level latency and the behaviour of downstream services together. A single utilisation number cannot explain a scheduling system.
The exact diagnosis depends on the kernel, cgroup version, runtime, hypervisor and Kubernetes configuration. Treat defaults as hypotheses to verify, not facts to assume.
A CPU allocation is a contract with several layers of software. It is not ownership of a core.