The Kubernetes Memory Manager enables the feature of guaranteed memory (and hugepages) allocation for pods in the Guaranteed
QoS class.
Stuff you wanna know:
- The Memory Manager employs hint generation protocol to yield the most suitable NUMA affinity for a pod.
- The Memory Manager feeds the central manager (Topology Manager) with affinity hints.
- The Memory Manager ensures that the memory which a pod requests is allocated from a minimum number of NUMA nodes.
- Memory Manager supports two policies. You can select a policy via a kubelet flag –memory-manager-policy — None (default) or Static.
- Memory Manager has an internal database, i.e. Node Map that incorporates Memory Maps. This database is used to keep track of the memory reserved for already deployed containers in Guaranteed QoS class.
More stuff:
- Utilizing the NUMA-aware Memory Manager — https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/
- Memory Manager configuration — https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/#memory-manager-configuration
- Examine the memory manager state on a node — https://kubernetes.io/docs/tasks/administer-cluster/memory-manager/#examine-the-memory-manager-state-on-a-node
- The Concept of Node Map and Memory Maps — https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#the-concept-of-node-map-and-memory-maps
- Memory Maps at start-up (with examples) — https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#memory-maps-at-start-up-with-examples
- Memory Maps at runtime (with examples) — https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#memory-maps-at-runtime-with-examples
- How to enable the guaranteed memory allocation over many NUMA nodes — https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/1769-memory-manager#how-to-enable-the-guaranteed-memory-allocation-over-many-numa-nodes
- Kubernetes Memory Manager moves to beta — https://kubernetes.io/blog/2021/08/11/kubernetes-1-22-feature-memory-manager-moves-to-beta/#How-does-it-work?
- Resource Management for Pods and Containers — https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
- Control Topology Management Policies on a node — https://kubernetes.io/docs/tasks/administer-cluster/topology-manager/
- Topology Management – Implementation in Kubernetes Technology Guide — https://builders.intel.com/docs/networkbuilders/topology-management-implementation-in-kubernetes-technology-guide.pdf
- Basic Pod CPU and Memory Management (Amazon EKS) — https://www.eksworkshop.com/intermediate/201_resource_management/basic-pod-limits/
- Pod Memory and CPU Resources (Oracle) — https://oracle.github.io/weblogic-kubernetes-operator/faq/resource-settings/
- CPU and Memory Allocations (Rancher) — https://rancher.com/docs/rancher/v2.5/en/istio/resources/