Updated on 2022-12-30 GMT+08:00

CPU Policy

By default, kubelet uses CFS quotas to enforce pod CPU limits. When the node runs many CPU-bound pods, the workload can move to different CPU cores depending on whether the pod is throttled and which CPU cores are available at scheduling time. Many workloads are not sensitive to this migration and thus work fine without any intervention.

When creating a cluster, you can configure the CPU management policy, as shown in the following figure.

The CPU policy is specified by the kubelet parameter --cpu-manager-policy. The following policies are supported:

  • Disabled (none): the default policy. The none policy explicitly enables the existing default CPU affinity scheme, providing no affinity beyond what the OS scheduler does automatically.
  • Enabled (static): The static policy allows containers in Guaranteed pods with integer CPU requests access to exclusive CPUs on the node.

For details about CPU policies, see Control CPU Management Policies on the Node.