Kubernetes v1.31: New Kubernet... Note

Kubernetes v1.31: New Kubernetes CPUManager Static Policy: Distribute CPUs Across Cores

Kubernetes v1.31 introduces the distribute-cpus-across-cores option for CPU management, aiming to optimize CPU utilization on multi-core processors. This feature spreads CPUs across physical cores, reducing resource contention and potentially enhancing application performance.Traditionally, Kubernetes allocated CPUs compactly onto as few cores as possible, but this strategy could lead to performance bottlenecks due to resource sharing on the same physical core.The new feature reorders the free CPU list to allocate CPUs from separate physical cores, minimizing contention and potentially improving performance for CPU-intensive applications.To enable this feature, users can add the --cpu-manager-policy-options flag or field with the value distribute-cpus-across-cores=true in their Kubernetes configuration.Currently, this policy option cannot be used with other CPU allocation strategies, limiting its compatibility with certain workloads.The feature is currently in alpha and hidden by default, with future updates aimed at resolving compatibility issues and enhancing flexibility.By reducing physical core contention, this feature offers a more balanced CPU allocation approach, particularly beneficial for heterogeneous workloads.Users are encouraged to test and provide feedback on the feature, which will contribute to its ongoing development.The CPU Manager and this new feature are discussed in the Control CPU Management Policies on the Node task page.To get involved in the development and improvement of this feature, users can attend SIG Node meetings for more information and discussion.