Skip to content

Commit bd70d9b

Browse files
authored
Merge pull request #33879 from Sea-n/zh-tasks-topo
[zh] Sync topology-manager.md
2 parents 2856c88 + dfd3e7f commit bd70d9b

File tree

1 file changed

+26
-27
lines changed

1 file changed

+26
-27
lines changed

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

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ In order to extract the best performance, optimizations related to CPU isolation
3333
但是,在 Kubernetes 中,这些优化由各自独立的组件集合来处理。
3434

3535
<!--
36-
_Topology Manager_ is a Kubelet component that aims to co-ordinate the set of components that are responsible for these optimizations.
36+
_Topology Manager_ is a Kubelet component that aims to coordinate the set of components that are responsible for these optimizations.
3737
-->
3838
_拓扑管理器(Topology Manager)_ 是一个 kubelet 的一部分,旨在协调负责这些优化的一组组件。
3939

@@ -46,16 +46,16 @@ _拓扑管理器(Topology Manager)_ 是一个 kubelet 的一部分,旨在
4646
<!--
4747
## How Topology Manager Works
4848
-->
49-
## 拓扑管理器如何工作
49+
## 拓扑管理器如何工作 {#how-topology-manager-works}
5050

5151
<!--
5252
Prior to the introduction of Topology Manager, the CPU and Device Manager in Kubernetes make resource allocation decisions independently of each other.
5353
This can result in undesirable allocations on multiple-socketed systems, performance/latency sensitive applications will suffer due to these undesirable allocations.
5454
Undesirable in this case meaning for example, CPUs and devices being allocated from different NUMA Nodes thus, incurring additional latency.
5555
-->
56-
在引入拓扑管理器之前, Kubernetes 中的 CPU 和设备管理器相互独立地做出资源分配决策。
56+
在引入拓扑管理器之前,Kubernetes 中的 CPU 和设备管理器相互独立地做出资源分配决策。
5757
这可能会导致在多处理系统上出现并非期望的资源分配;由于这些与期望相左的分配,对性能或延迟敏感的应用将受到影响。
58-
这里的不符合期望意指,例如, CPU 和设备是从不同的 NUMA 节点分配的,因此会导致额外的延迟。
58+
这里的不符合期望意指,例如,CPU 和设备是从不同的 NUMA 节点分配的,因此会导致额外的延迟。
5959

6060
<!--
6161
The Topology Manager is a Kubelet component, which acts as a source of truth so that other Kubelet components can make topology aligned resource allocation choices.
@@ -77,28 +77,28 @@ The hint is then stored in the Topology Manager for use by the *Hint Providers*
7777
拓扑管理器策略对所提供的建议执行一组操作,并根据策略对提示进行约减以得到最优解;如果存储了与预期不符的建议,则该建议的优选字段将被设置为 false。
7878
在当前策略中,首选的是最窄的优选掩码。
7979
所选建议将被存储为拓扑管理器的一部分。
80-
取决于所配置的策略,所选建议可用来决定节点接受或拒绝 Pod
80+
取决于所配置的策略,所选建议可用来决定节点接受或拒绝 Pod。
8181
之后,建议会被存储在拓扑管理器中,供 *建议提供者* 进行资源分配决策时使用。
8282

8383
<!--
8484
### Enable the Topology Manager feature
8585
8686
Support for the Topology Manager requires `TopologyManager` [feature gate](/docs/reference/command-line-tools-reference/feature-gates/) to be enabled. It is enabled by default starting with Kubernetes 1.18.
8787
-->
88-
### 启用拓扑管理器功能特性
88+
### 启用拓扑管理器功能特性 {#enable-the-topology-manager-feature}
8989

9090
对拓扑管理器的支持要求启用 `TopologyManager`
9191
[特性门控](/zh/docs/reference/command-line-tools-reference/feature-gates/)
9292
从 Kubernetes 1.18 版本开始,这一特性默认是启用的。
9393

9494
<!--
95-
### Topology Manager Scopes and Policies
95+
## Topology Manager Scopes and Policies
9696
9797
The Topology Manager currently:
9898
- Aligns Pods of all QoS classes.
9999
- Aligns the requested resources that Hint Provider provides topology hints for.
100100
-->
101-
### 拓扑管理器作用域和策略
101+
## 拓扑管理器作用域和策略 {#topology-manager-scopes-and-policies}
102102

103103
拓扑管理器目前:
104104
- 对所有 QoS 类的 Pod 执行对齐操作
@@ -151,7 +151,7 @@ The Topology Manager can deal with the alignment of resources in a couple of dis
151151
152152
Either option can be selected at a time of the kubelet startup, with `--topology-manager-scope` flag.
153153
-->
154-
### 拓扑管理器作用域
154+
### 拓扑管理器作用域 {#topology-manager-scopes}
155155

156156
拓扑管理器可以在以下不同的作用域内进行资源对齐:
157157

@@ -165,7 +165,7 @@ Either option can be selected at a time of the kubelet startup, with `--topology
165165
166166
The `container` scope is used by default.
167167
-->
168-
### 容器作用域
168+
### 容器作用域 {#container-scope}
169169

170170
默认使用的是 `container` 作用域。
171171

@@ -187,7 +187,7 @@ The notion of grouping the containers was endorsed and implemented on purpose in
187187
188188
To select the `pod` scope, start the kubelet with the command line option `--topology-manager-scope=pod`.
189189
-->
190-
### Pod 作用域
190+
### Pod 作用域 {#pod-scope}
191191

192192
使用命令行选项 `--topology-manager-scope=pod` 来启动 kubelet,就可以选择 `pod` 作用域。
193193

@@ -250,7 +250,7 @@ To recap, Topology Manager first computes a set of NUMA nodes and then tests it
250250
<!--
251251
### Topology Manager Policies
252252
-->
253-
### 拓扑管理器策略
253+
### 拓扑管理器策略 {#topology-manager-policies}
254254

255255
<!--
256256
Topology Manager supports four allocation policies. You can set a policy via a Kubelet flag, `--topology-manager-policy`.
@@ -293,15 +293,15 @@ This is the default policy and does not perform any topology alignment.
293293
<!--
294294
### best-effort policy {#policy-best-effort}
295295
296-
For each container in a Guaranteed Pod, kubelet, with `best-effort` topology
296+
For each container in a Pod, the kubelet, with `best-effort` topology
297297
management policy, calls each Hint Provider to discover their resource availability.
298298
Using this information, the Topology Manager stores the
299299
preferred NUMA Node affinity for that container. If the affinity is not preferred,
300300
Topology Manager will store this and admit the pod to the node anyway.
301301
-->
302302
### best-effort 策略 {#policy-best-effort}
303303

304-
对于 Guaranteed 类的 Pod 中的每个容器,具有 `best-effort` 拓扑管理策略的
304+
对于 Pod 中的每个容器,具有 `best-effort` 拓扑管理策略的
305305
kubelet 将调用每个建议提供者以确定资源可用性。
306306
使用此信息,拓扑管理器存储该容器的首选 NUMA 节点亲和性。
307307
如果亲和性不是首选,则拓扑管理器将存储该亲和性,并且无论如何都将 pod 接纳到该节点。
@@ -315,18 +315,18 @@ resource allocation decision.
315315
<!--
316316
### restricted policy {#policy-restricted}
317317
318-
For each container in a Guaranteed Pod, kubelet, with `restricted` topology
318+
For each container in a Pod, the kubelet, with `restricted` topology
319319
management policy, calls each Hint Provider to discover their resource availability.
320320
Using this information, the Topology Manager stores the
321321
preferred NUMA Node affinity for that container. If the affinity is not preferred,
322322
Topology Manager will reject this pod from the node. This will result in a pod in a `Terminated` state with a pod admission failure.
323323
-->
324324
### restricted 策略 {#policy-restricted}
325325

326-
对于 Guaranteed 类 Pod 中的每个容器, 配置了 `restricted` 拓扑管理策略的 kubelet
326+
对于 Pod 中的每个容器,配置了 `restricted` 拓扑管理策略的 kubelet
327327
调用每个建议提供者以确定其资源可用性。。
328328
使用此信息,拓扑管理器存储该容器的首选 NUMA 节点亲和性。
329-
如果亲和性不是首选,则拓扑管理器将从节点中拒绝此 Pod
329+
如果亲和性不是首选,则拓扑管理器将从节点中拒绝此 Pod。
330330
这将导致 Pod 处于 `Terminated` 状态,且 Pod 无法被节点接纳。
331331

332332
<!--
@@ -346,7 +346,7 @@ resource allocation decision.
346346
<!--
347347
### single-numa-node policy {#policy-single-numa-node}
348348
349-
For each container in a Guaranteed Pod, kubelet, with `single-numa-node` topology
349+
For each container in a Pod, the kubelet, with `single-numa-node` topology
350350
management policy, calls each Hint Provider to discover their resource availability.
351351
Using this information, the Topology Manager determines if a single NUMA Node affinity is possible.
352352
If it is, Topology Manager will store this and the *Hint Providers* can then use this information when making the
@@ -355,7 +355,7 @@ If, however, this is not possible then the Topology Manager will reject the pod
355355
-->
356356
### single-numa-node 策略 {#policy-single-numa-node}
357357

358-
对于 Guaranteed 类 Pod 中的每个容器, 配置了 `single-numa-nodde` 拓扑管理策略的
358+
对于 Pod 中的每个容器,配置了 `single-numa-nodde` 拓扑管理策略的
359359
kubelet 调用每个建议提供者以确定其资源可用性。
360360
使用此信息,拓扑管理器确定单 NUMA 节点亲和性是否可能。
361361
如果是这样,则拓扑管理器将存储此信息,然后 *建议提供者* 可以在做出资源分配决定时使用此信息。
@@ -375,7 +375,7 @@ An external control loop could be also implemented to trigger a redeployment of
375375
376376
Consider the containers in the following pod specs:
377377
-->
378-
### Pod 与拓扑管理器策略的交互
378+
### Pod 与拓扑管理器策略的交互 {#pod-interactions-with-topology-manager-policies}
379379

380380
考虑以下 pod 规范中的容器:
381381

@@ -410,7 +410,7 @@ This pod runs in the `Burstable` QoS class because requests are less than limits
410410
由于 requests 数少于 limits,因此该 Pod 以 `Burstable` QoS 类运行。
411411

412412
<!--
413-
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.
413+
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 explicitly request CPU resources.
414414
-->
415415
如果选择的策略是 `none` 以外的任何其他策略,拓扑管理器都会评估这些 Pod 的规范。
416416
拓扑管理器会咨询建议提供者,获得拓扑建议。
@@ -434,8 +434,7 @@ spec:
434434
```
435435

436436
<!--
437-
This pod with integer CPU request runs in the `Guaranteed` QoS class because
438-
`requests` are equal to `limits`.
437+
This pod with integer CPU request runs in the `Guaranteed` QoS class because `requests` are equal to `limits`.
439438
-->
440439
此 Pod 以 `Guaranteed` QoS 类运行,因为其 `requests` 值等于 `limits` 值。
441440

@@ -459,12 +458,12 @@ This pod runs in the `BestEffort` QoS class because there are no CPU and memory
459458
因为未指定 CPU 和内存请求,所以 Pod 以 `BestEffort` QoS 类运行。
460459

461460
<!--
462-
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.
461+
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.
463462

464-
In the case of the `Guaranteed` pod with integer request, 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.
463+
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.
465464
-->
466465
拓扑管理器将考虑以上两个 Pod。拓扑管理器将咨询建议提供者即 CPU 和设备管理器,以获取 Pod 的拓扑提示。
467-
对于 `Guaranteed` 类的 CPU 请求数为整数的 Pod,`static` CPU 管理器策略将返回与 CPU 请求有关的提示
466+
对于 `Guaranteed` 类的 CPU 请求数为整数的 Pod,`static` CPU 管理器策略将返回独占 CPU 相关的拓扑提示
468467
而设备管理器将返回有关所请求设备的提示。
469468

470469
<!--
@@ -497,7 +496,7 @@ Using this information the Topology Manager calculates the optimal hint for the
497496

498497
2. The scheduler is not topology-aware, so it is possible to be scheduled on a node and then fail on the node due to the Topology Manager.
499498
-->
500-
### 已知的局限性
499+
### 已知的局限性 {#known-limitations}
501500

502501
1. 拓扑管理器所能处理的最大 NUMA 节点个数是 8。若 NUMA 节点数超过 8,
503502
枚举可能的 NUMA 亲和性并为之生成提示时会发生状态爆炸。

0 commit comments

Comments
 (0)