Skip to content

Commit eb750e8

Browse files
author
Byonggon Chun
committed
fix inaccurate information of topology-manager admin guide
Topology Manager deal with Guaranteed QoS Pod. =>Topology Manager deal with all Pod QoS Classes since 1.17 Topology Manager works on Nodes with the Static CPU Policy enabled => changing wording to make this clearer and adding examples Signed-off-by: Byonggon Chun <[email protected]>
1 parent dbd05c7 commit eb750e8

File tree

1 file changed

+41
-12
lines changed

1 file changed

+41
-12
lines changed

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

Lines changed: 41 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,15 @@ reviewers:
66
- klueska
77
- lmdaly
88
- nolancon
9+
- bg-chun
910

1011
content_template: templates/task
1112
min-kubernetes-server-version: v1.18
1213
---
1314

1415
{{% capture overview %}}
1516

16-
{{< feature-state state="beta" >}}
17+
{{< feature-state state="beta" for_k8s_version="v1.18" >}}
1718

1819
An increasing number of systems leverage a combination of CPUs and hardware accelerators to support latency-critical execution and high-throughput parallel computation. These include workloads in fields such as telecommunications, scientific computing, machine learning, financial services and data analytics. Such hybrid systems comprise a high performance environment.
1920

@@ -53,11 +54,16 @@ Support for the Topology Manager requires `TopologyManager` [feature gate](/docs
5354

5455
The Topology Manager currently:
5556

56-
- Works on Nodes with the `static` CPU Manager Policy enabled. See [control CPU Management Policies](/docs/tasks/administer-cluster/cpu-management-policies/)
57-
- Works on Pods making CPU requests or Device requests via extended resources
57+
- Aligns Pods of all QoS classes.
58+
- Aligns the requested resources that Hint Provider provides topology hints for.
5859

5960
If these conditions are met, Topology Manager will align the requested resources.
6061

62+
{{< note >}}
63+
To align CPU resources with other requested resources in a Pod Spec, the CPU Manager should be enabled and proper CPU Manager policy should be configured on a Node. See [control CPU Management Policies](/docs/tasks/administer-cluster/cpu-management-policies/).
64+
{{< /note >}}
65+
66+
6167
Topology Manager supports four allocation policies. You can set a policy via a Kubelet flag, `--topology-manager-policy`.
6268
There are four supported policies:
6369

@@ -72,7 +78,7 @@ This is the default policy and does not perform any topology alignment.
7278

7379
### best-effort policy {#policy-best-effort}
7480

75-
For each container in a Guaranteed Pod, kubelet, with `best-effort` topology
81+
For each container in a Pod, the kubelet, with `best-effort` topology
7682
management policy, calls each Hint Provider to discover their resource availability.
7783
Using this information, the Topology Manager stores the
7884
preferred NUMA Node affinity for that container. If the affinity is not preferred,
@@ -83,7 +89,7 @@ resource allocation decision.
8389

8490
### restricted policy {#policy-restricted}
8591

86-
For each container in a Guaranteed Pod, kubelet, with `restricted` topology
92+
For each container in a Pod, the kubelet, with `restricted` topology
8793
management policy, calls each Hint Provider to discover their resource availability.
8894
Using this information, the Topology Manager stores the
8995
preferred NUMA Node affinity for that container. If the affinity is not preferred,
@@ -97,7 +103,7 @@ resource allocation decision.
97103

98104
### single-numa-node policy {#policy-single-numa-node}
99105

100-
For each container in a Guaranteed Pod, kubelet, with `single-numa-node` topology
106+
For each container in a Pod, the kubelet, with `single-numa-node` topology
101107
management policy, calls each Hint Provider to discover their resource availability.
102108
Using this information, the Topology Manager determines if a single NUMA Node affinity is possible.
103109
If it is, Topology Manager will store this and the *Hint Providers* can then use this information when making the
@@ -135,8 +141,7 @@ spec:
135141

136142
This pod runs in the `Burstable` QoS class because requests are less than limits.
137143

138-
If the selected policy is anything other than `none` , Topology Manager would not consider either of these Pod
139-
specifications.
144+
If the selected policy is anything other than `none`, Topology Manager would consider these Pod specifications. The Topology Manager would consult the Hint Providers to get topology hints. In the case of the `static`, the CPU Manager policy would return default topology hint, because these Pods do not have explicity request CPU resources.
140145

141146

142147
```yaml
@@ -155,7 +160,26 @@ spec:
155160
example.com/device: "1"
156161
```
157162

158-
This pod runs in the `Guaranteed` QoS class because `requests` are equal to `limits`.
163+
This pod with integer CPU request runs in the `Guaranteed` QoS class because `requests` are equal to `limits`.
164+
165+
166+
```yaml
167+
spec:
168+
containers:
169+
- name: nginx
170+
image: nginx
171+
resources:
172+
limits:
173+
memory: "200Mi"
174+
cpu: "300m"
175+
example.com/device: "1"
176+
requests:
177+
memory: "200Mi"
178+
cpu: "300m"
179+
example.com/device: "1"
180+
```
181+
182+
This pod with sharing CPU request runs in the `Guaranteed` QoS class because `requests` are equal to `limits`.
159183

160184

161185
```yaml
@@ -173,10 +197,15 @@ spec:
173197
```
174198
This pod runs in the `BestEffort` QoS class because there are no CPU and memory requests.
175199

176-
The Topology Manager would consider both of the above pods. The Topology Manager would consult the Hint Providers, which are CPU and Device Manager to get topology hints for the pods.
177-
In the case of the `Guaranteed` pod the `static` CPU Manager policy would return hints relating to the CPU request and the Device Manager would send back hints for the requested device.
200+
The Topology Manager would consider the above pods. The Topology Manager would consult the Hint Providers, which are CPU and Device Manager to get topology hints for the pods.
201+
202+
In the case of the `Guaranteed` pod with integer CPU request, the `static` CPU Manager policy would return topology hints relating to the exclusive CPU and the Device Manager would send back hints for the requested device.
203+
204+
In the case of the `Guaranteed` pod with sharing CPU request, the `static` CPU Manager policy would return default topology hint as there is no exclusive CPU request and the Device Manager would send back hints for the requested device.
205+
206+
In the above two cases of the `Guaranteed` pod, the `none` CPU Manager policy would return default topology hint.
178207

179-
In the case of the `BestEffort` pod the CPU Manager would send back the default hint as there is no CPU request and the Device Manager would send back the hints for each of the requested devices.
208+
In the case of the `BestEffort` pod, the `static` CPU Manager policy would send back the default topology hint as there is no CPU request and the Device Manager would send back the hints for each of the requested devices.
180209

181210
Using this information the Topology Manager calculates the optimal hint for the pod and stores this information, which will be used by the Hint Providers when they are making their resource assignments.
182211

0 commit comments

Comments
 (0)