Skip to content

CONCEPT Cited by 1 source

CPU Manager static policy

Definition

The CPU Manager is a Kubernetes kubelet feature that governs how pods receive CPU time. It supports two policies:

  • none (default) — standard CFS bandwidth control: pods get CPU time via cgroups but can be scheduled on any core at any time.
  • static — pods in the Guaranteed QoS class with integer CPU requests receive exclusive cpusets: the kubelet pins them to specific physical CPUs and no other workload (including system daemons) can preempt them on those CPUs.

The static policy is the Kubernetes-native way to achieve hyperthread-aware placement without hand-rolling taskset commands or sidecars.

Why the static policy matters

By default, the kernel CFS scheduler can move a pod between cores freely, which:

  • Breaks cache locality — L1/L2 caches warmed on one core are cold after migration.
  • Can land the pod on a sibling hyperthread of a busy core — the source of the HT softirq contention effect.
  • Introduces run-queue latency variance unrelated to the workload itself.

The static policy takes these scheduling decisions out of the kernel's hands for Guaranteed pods, granting them exclusive physical CPUs.

Operational caveats

  • Requires pods to request integer whole CPUscpu: "1.5" does not qualify. Fractional-CPU workloads still share.
  • Shrinks the shared CPU pool for the rest of the node — fewer pods per node if many use Guaranteed + integer CPU.
  • Requires careful reservation of cores for kubelet, container runtime, and kernel threads via --reserved-cpus.
  • HT-aware allocation: with CPU Manager static policy and the full-pcpus-only option, the kubelet allocates entire physical cores (both sibling HTs together) rather than individual logical CPUs — the direct fix for concepts/hyperthread-softirq-contention.

Seen in

  • sources/2020-06-23-zalando-pgbouncer-on-kubernetes-minimal-latency — Zalando cites CPU Manager as the operator-level mitigation for the HT-softirq effect they observed: "It could be beneficial to configure CPU manager in the cluster, so that this would not be an issue." Concrete motivation for enabling static policy: don't let PgBouncer pods land on sibling hyperthreads of already-busy cores.
Last updated · 476 distilled / 1,218 read