Skip to content

Commit edbfb71

Browse files
authored
Merge pull request #37116 from windsonsea/cpupol
[zh] Sync cpu-management-policies.md
2 parents c8081e8 + 6ad73e2 commit edbfb71

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ whether the pod is throttled and which CPU cores are available at
4343
scheduling time.  Many workloads are not sensitive to this migration and thus
4444
work fine without any intervention.
4545
-->
46-
## CPU 管理策略
46+
## CPU 管理策略 {#cpu-management-policies}
4747

4848
默认情况下,kubelet 使用 [CFS 配额](https://en.wikipedia.org/wiki/Completely_Fair_Scheduler)
4949
来执行 Pod 的 CPU 约束。
@@ -66,7 +66,7 @@ The CPU Manager policy is set with the `--cpu-manager-policy` kubelet
6666
flag or the `cpuManagerPolicy` field in [KubeletConfiguration](/docs/reference/config-api/kubelet-config.v1beta1/).
6767
There are two supported policies:
6868
-->
69-
### 配置
69+
### 配置 {#configuration}
7070

7171
CPU 管理策略通过 kubelet 参数 `--cpu-manager-policy`
7272
[KubeletConfiguration](/zh-cn/docs/reference/config-api/kubelet-config.v1beta1/)
@@ -119,7 +119,7 @@ Since the CPU manger policy can only be applied when kubelet spawns new pods, si
119119
"none" to "static" won't apply to existing pods. So in order to properly change the CPU manager
120120
policy on a node, perform the following steps:
121121
-->
122-
### 更改 CPU 管理器策略
122+
### 更改 CPU 管理器策略 {#changing-the-cpu-manager-policy}
123123

124124
由于 CPU 管理器策略只能在 kubelet 生成新 Pod 时应用,所以简单地从 "none" 更改为 "static"
125125
将不会对现有的 Pod 起作用。
@@ -166,7 +166,7 @@ automatically.  Limits on CPU usage for
166166
[Burstable pods](/docs/tasks/configure-pod-container/quality-service-pod/)
167167
are enforced using CFS quota.
168168
-->
169-
### none 策略
169+
### none 策略 {#none-policy}
170170

171171
`none` 策略显式地启用现有的默认 CPU 亲和方案,不提供操作系统调度器默认行为之外的亲和性策略。
172172
通过 CFS 配额来实现 [Guaranteed Pods](/zh-cn/docs/tasks/configure-pod-container/quality-service-pod/)
@@ -180,7 +180,7 @@ The `static` policy allows containers in `Guaranteed` pods with integer CPU
180180
`requests` access to exclusive CPUs on the node. This exclusivity is enforced
181181
using the [cpuset cgroup controller](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt).
182182
-->
183-
### static 策略
183+
### static 策略 {#static-policy}
184184

185185
`static` 策略针对具有整数型 CPU `requests``Guaranteed` Pod,
186186
它允许该类 Pod 中的容器访问节点上的独占 CPU 资源。这种独占性是使用
@@ -395,9 +395,9 @@ using the following feature gates:
395395
You will still have to enable each option using the `CPUManagerPolicyOptions` kubelet option.
396396

397397
The following policy options exist for the static `CPUManager` policy:
398-
* `full-pcpus-only` (beta, visible by default)
399-
* `distribute-cpus-across-numa` (alpha, hidden by default)
400-
* `align-by-socket` (alpha, hidden by default)
398+
* `full-pcpus-only` (beta, visible by default) (1.22 or higher)
399+
* `distribute-cpus-across-numa` (alpha, hidden by default) (1.23 or higher)
400+
* `align-by-socket` (alpha, hidden by default) (1.25 or higher)
401401
-->
402402
#### Static 策略选项
403403

@@ -407,9 +407,9 @@ The following policy options exist for the static `CPUManager` policy:
407407
你仍然必须使用 `CPUManagerPolicyOptions` kubelet 选项启用每个选项。
408408

409409
静态 `CPUManager` 策略存在以下策略选项:
410-
* `full-pcpus-only`(beta,默认可见)
411-
* `distribute-cpus-across-numa`(alpha,默认隐藏)
412-
* `align-by-socket`(alpha,默认隐藏)
410+
* `full-pcpus-only`(beta,默认可见)(1.22 或更高版本)
411+
* `distribute-cpus-across-numa`(alpha,默认隐藏)(1.23 或更高版本)
412+
* `align-by-socket`(alpha,默认隐藏)(1.25 或更高版本)
413413

414414
<!--
415415
If the `full-pcpus-only` policy option is specified, the static policy will always allocate full physical cores.
@@ -421,8 +421,8 @@ to the [noisy neighbours problem](https://en.wikipedia.org/wiki/Cloud_computing_
421421
如果使用 `full-pcpus-only` 策略选项,static 策略总是会分配完整的物理核心。
422422
默认情况下,如果不使用该选项,static 策略会使用拓扑感知最适合的分配方法来分配 CPU。
423423
在启用了 SMT 的系统上,此策略所分配是与硬件线程对应的、独立的虚拟核。
424-
这会导致不同的容器共享相同的物理核心,该行为进而会导致
425-
[吵闹的邻居问题](https://en.wikipedia.org/wiki/Cloud_computing_issues#Performance_interference_and_noisy_neighbors)。
424+
这会导致不同的容器共享相同的物理核心,
425+
该行为进而会导致[吵闹的邻居问题](https://en.wikipedia.org/wiki/Cloud_computing_issues#Performance_interference_and_noisy_neighbors)。
426426
<!--
427427
With the option enabled, the pod will be admitted by the kubelet only if the CPU request of all its containers
428428
can be fulfilled by allocating full physical cores.

0 commit comments

Comments
 (0)