Skip to content

Commit e2cccab

Browse files
committed
Add docs for Windows CPU and Memory Managers
Signed-off-by: James Sturtevant <[email protected]>
1 parent 1332f3f commit e2cccab

File tree

4 files changed

+56
-3
lines changed

4 files changed

+56
-3
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
# Removed from Kubernetes
3+
title: WindowsCPUAndMemoryAffinity
4+
content_type: feature_gate
5+
6+
_build:
7+
list: never
8+
render: false
9+
10+
stages:
11+
- stage: alpha
12+
defaultValue: false
13+
fromVersion: "1.32"
14+
---
15+
Add CPU and Memory Affinity support to Windows nodes with [CPUManager](/docs/tasks/administer-cluster/cpu-management-policies#windows-support), [MemoryManager](/docs/tasks/administer-cluster/memory-manager.md#windows-support) and Topology manager.

content/en/docs/tasks/administer-cluster/cpu-management-policies.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ However, in workloads where CPU cache affinity and scheduling latency
4949
significantly affect workload performance, the kubelet allows alternative CPU
5050
management policies to determine some placement preferences on the node.
5151

52+
## Windows Support
53+
54+
{{< feature-state for_k8s_version="v1.32" state="alpha" feature_gate_name="WindowsCPUAndMemoryAffinity" >}}
55+
56+
The CPU Manager support can be enabled on Windows by using the `WindowsCPUAndMemoryAffinity` feature flag and requires a support in the container runtime.
57+
Once feature is enabled follow the steps above to configure the [CPU Manager Policy](#configuration).
58+
5259
### Configuration
5360

5461
The CPU Manager policy is set with the `--cpu-manager-policy` kubelet

content/en/docs/tasks/administer-cluster/memory-manager.md

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Preceding v1.22, the `kubelet` must be started with the following flag:
4646

4747
in order to enable the Memory Manager feature.
4848

49-
## How Memory Manager Operates?
49+
## How does the Memory Manager Operates?
5050

5151
The Memory Manager currently offers the guaranteed memory (and hugepages) allocation
5252
for Pods in Guaranteed QoS class.
@@ -57,7 +57,7 @@ prepare and deploy a `Guaranteed` pod as illustrated in the section
5757

5858
The Memory Manager is a Hint Provider, and it provides topology hints for
5959
the Topology Manager which then aligns the requested resources according to these topology hints.
60-
It also enforces `cgroups` (i.e. `cpuset.mems`) for pods.
60+
On Linux, it also enforces `cgroups` (i.e. `cpuset.mems`) for pods.
6161
The complete flow diagram concerning pod admission and deployment process is illustrated in
6262
[Memory Manager KEP: Design Overview][4] and below:
6363

@@ -91,6 +91,12 @@ The problem has been solved as elaborated in
9191
Also, reference [Memory Manager KEP: Simulation - how the Memory Manager works? (by examples)][1]
9292
illustrates how the management of groups occurs.
9393

94+
### Windows Support
95+
96+
{{< feature-state for_k8s_version="v1.32" state="alpha" feature_gate_name="WindowsCPUAndMemoryAffinity" >}}
97+
98+
Windows support can be enabled via the `WindowsCPUAndMemoryAffinity` feature gate and requires a support in the container runtime. Only the [BestEffort Policy](#policy-best-effort) is supported on Windows.
99+
94100
## Memory Manager configuration
95101

96102
Other Managers should be first pre-configured. Next, the Memory Manager feature should be enabled
@@ -103,7 +109,8 @@ node stability (section [Reserved memory flag](#reserved-memory-flag)).
103109
Memory Manager supports two policies. You can select a policy via a `kubelet` flag `--memory-manager-policy`:
104110

105111
* `None` (default)
106-
* `Static`
112+
* `Static` (Linux only)
113+
* `BestEffort` (Windows Only)
107114

108115
#### None policy {#policy-none}
109116

@@ -123,6 +130,24 @@ In the case of the `BestEffort` or `Burstable` pod, the `Static` Memory Manager
123130
the default topology hint as there is no request for the guaranteed memory,
124131
and does not reserve the memory in the internal [NodeMap][2] object.
125132

133+
This policy is only Supported on Linux.
134+
135+
#### BestEffort policy {#policy-best-effort}
136+
137+
{{< feature-state for_k8s_version="v1.32" state="alpha" feature_gate_name="WindowsCPUAndMemoryAffinity" >}}
138+
139+
This policy is only Support on Windows.
140+
141+
On Windows, NUMA node assignment works differently than Linux. There is no mechanism
142+
to ensure that Memory access only comes from a specific NUMA node, instead the Windows
143+
internals will select the most optimal NUMA node based on the CPU assignment and it is
144+
possible that Windows might use other nodes if required or deemed optimal. For this
145+
reason this policy is best effort.
146+
147+
The policy does track the amount of memory available and requested through the internal
148+
[NodeMap][2] to make a best effort at ensuring that memory enough memory is available on
149+
a NUMA node before making the hint to assign it to the NODE. This means that in most cases, this should function as expected.
150+
126151
### Reserved memory flag
127152

128153
The [Node Allocatable](/docs/tasks/administer-cluster/reserve-compute-resources/) mechanism

content/en/docs/tasks/administer-cluster/topology-manager.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,12 @@ the pod can be accepted or rejected from the node based on the selected hint.
5858
The hint is then stored in the Topology Manager for use by the *Hint Providers* when making the
5959
resource allocation decisions.
6060

61+
## Windows Support
62+
63+
{{< feature-state for_k8s_version="v1.32" state="alpha" feature_gate_name="WindowsCPUAndMemoryAffinity" >}}
64+
65+
The Topology Manager support can be enabled on Windows by using the `WindowsCPUAndMemoryAffinity` feature flag and requires a support in the container runtime.
66+
6167
## Topology manager scopes and policies
6268

6369
The Topology Manager currently:

0 commit comments

Comments
 (0)