@@ -43,7 +43,7 @@ whether the pod is throttled and which CPU cores are available at
43
43
scheduling time. Many workloads are not sensitive to this migration and thus
44
44
work fine without any intervention.
45
45
-->
46
- ## CPU 管理策略
46
+ ## CPU 管理策略 {#cpu-management-policies}
47
47
48
48
默认情况下,kubelet 使用 [ CFS 配额] ( https://en.wikipedia.org/wiki/Completely_Fair_Scheduler )
49
49
来执行 Pod 的 CPU 约束。
@@ -66,7 +66,7 @@ The CPU Manager policy is set with the `--cpu-manager-policy` kubelet
66
66
flag or the `cpuManagerPolicy` field in [KubeletConfiguration](/docs/reference/config-api/kubelet-config.v1beta1/).
67
67
There are two supported policies:
68
68
-->
69
- ### 配置
69
+ ### 配置 {#configuration}
70
70
71
71
CPU 管理策略通过 kubelet 参数 ` --cpu-manager-policy `
72
72
或 [ 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
119
119
"none" to "static" won't apply to existing pods. So in order to properly change the CPU manager
120
120
policy on a node, perform the following steps:
121
121
-->
122
- ### 更改 CPU 管理器策略
122
+ ### 更改 CPU 管理器策略 {#changing-the-cpu-manager-policy}
123
123
124
124
由于 CPU 管理器策略只能在 kubelet 生成新 Pod 时应用,所以简单地从 "none" 更改为 "static"
125
125
将不会对现有的 Pod 起作用。
@@ -166,7 +166,7 @@ automatically. Limits on CPU usage for
166
166
[Burstable pods](/docs/tasks/configure-pod-container/quality-service-pod/)
167
167
are enforced using CFS quota.
168
168
-->
169
- ### none 策略
169
+ ### none 策略 {#none-policy}
170
170
171
171
` none ` 策略显式地启用现有的默认 CPU 亲和方案,不提供操作系统调度器默认行为之外的亲和性策略。
172
172
通过 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
180
180
`requests` access to exclusive CPUs on the node. This exclusivity is enforced
181
181
using the [cpuset cgroup controller](https://www.kernel.org/doc/Documentation/cgroup-v1/cpusets.txt).
182
182
-->
183
- ### static 策略
183
+ ### static 策略 {#static-policy}
184
184
185
185
` static ` 策略针对具有整数型 CPU ` requests ` 的 ` Guaranteed ` Pod,
186
186
它允许该类 Pod 中的容器访问节点上的独占 CPU 资源。这种独占性是使用
@@ -395,9 +395,9 @@ using the following feature gates:
395
395
You will still have to enable each option using the `CPUManagerPolicyOptions` kubelet option.
396
396
397
397
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)
401
401
-->
402
402
# ### Static 策略选项
403
403
@@ -407,9 +407,9 @@ The following policy options exist for the static `CPUManager` policy:
407
407
你仍然必须使用 `CPUManagerPolicyOptions` kubelet 选项启用每个选项。
408
408
409
409
静态 `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 或更高版本)
413
413
414
414
<!--
415
415
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_
421
421
如果使用 `full-pcpus-only` 策略选项,static 策略总是会分配完整的物理核心。
422
422
默认情况下,如果不使用该选项,static 策略会使用拓扑感知最适合的分配方法来分配 CPU。
423
423
在启用了 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)。
426
426
<!--
427
427
With the option enabled, the pod will be admitted by the kubelet only if the CPU request of all its containers
428
428
can be fulfilled by allocating full physical cores.
0 commit comments