Kubernetes NUMA Affinity Scheduling Plugin
Currently, most cloud service providers need to deploy a large number of containers on a server, and the number of deployed containers even exceeds the number of physical cores of the server. In this scenario, the Kubernetes NUMA affinity scheduling plugin can automatically adjust the pod deployment range based on the resource usage of the node to ensure NUMA affinity for container resources like CPUs and GPUs and prevent cross-NUMA memory access of service containers.
The Kubernetes NUMA affinity scheduling plugin runs at the node layer of the Kubernetes cluster. It is deployed through pods that use DaemonSet (Daemon pods), which ensures a plugin instance on each node. This plugin interconnects with the NRI of containerd to dynamically adjust the CPU scheduling range of a pod, securing effective NUMA affinity.
The following figure shows how the NUMA affinity scheduling plugin works based on the NRI function of the containerd runtime.
In addition, the Kubernetes NUMA affinity scheduling plugin provides the Topology Affinity Plugin (TAP) to be compatible with the Docker and containerd container runtimes in Kubernetes clusters of earlier versions. This plugin obtains requests and returns responses as a proxy. During request delivery, it optimizes the resource parameters to implement NUMA affinity. The following figure shows how the Kunpeng TAP works.
Constraints
The Kubernetes NUMA affinity scheduling plugin has different usage restrictions and version requirements for the containerd and Docker scenarios. For details, see Table 1.
|
Plugin Type |
Version Requirement |
|||
|---|---|---|---|---|
|
Kubernetes |
containerd |
Docker |
Remarks |
|
|
Kubernetes NUMA affinity scheduling plugin (containerd with NRI enabled) |
1.28.4 |
1.7.14 |
- |
In the containerd scenario, use containerd as the container runtime. |
|
Kubernetes NUMA affinity scheduling plugin (Docker/containerd) |
1.23.6 |
1.6.8+ |
20.10.14 |
In the Docker scenario, use Dockershim as the runtime communication component. containerd is also supported. |