Skip to content

Commit 34f4f91

Browse files
authored
Merge pull request #30323 from tengqm/zh-sync-manage-resource
[zh] Resync manage resources for containers
2 parents b28f95e + a2d70a7 commit 34f4f91

File tree

1 file changed

+17
-7
lines changed

1 file changed

+17
-7
lines changed

content/zh/docs/concepts/configuration/manage-resources-containers.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,10 +202,10 @@ CPU is always requested as an absolute quantity, never as a relative quantity;
202202

203203
### CPU 的含义 {#meaning-of-cpu}
204204

205-
CPU 资源的约束和请求以 *cpu* 为单位。
205+
CPU 资源的约束和请求以 *CPU* 为单位。
206206

207-
Kubernetes 中的一个 cpu 等于云平台上的 **1 个 vCPU/核**和裸机 Intel
208-
处理器上的 **1 个超线程 **
207+
Kubernetes 中的一个 CPU 等于云平台上的 **1 个 vCPU/核**和裸机 Intel
208+
处理器上的 **1 个超线程**
209209

210210
你也可以表达带小数 CPU 的请求。`spec.containers[].resources.requests.cpu` 为 0.5
211211
的 Container 肯定能够获得请求 1 CPU 的容器的一半 CPU 资源。表达式 `0.1` 等价于表达式 `100m`
@@ -321,8 +321,9 @@ When using Docker:
321321
flag in the `docker run` command.
322322

323323
- The `spec.containers[].resources.limits.cpu` is converted to its millicore value and
324-
multiplied by 100. The resulting value is the total amount of CPU time that a container can use
325-
every 100ms. A container cannot use more than its share of CPU time during this interval.
324+
multiplied by 100. The resulting value is the total amount of CPU time in microseconds
325+
that a container can use every 100ms. A container cannot use more than its share of
326+
CPU time during this interval.
326327

327328
The default quota period is 100ms. The minimum resolution of CPU quota is 1ms.
328329

@@ -337,8 +338,8 @@ When using Docker:
337338
[`--cpu-shares`](https://docs.docker.com/engine/reference/run/#/cpu-share-constraint)
338339
标志的值。
339340
- `spec.containers[].resources.limits.cpu` 先被转换为 millicore 值,再乘以 100。
340-
其结果就是每 100 毫秒内容器可以使用的 CPU 时间总量。在此期间(100ms),容器所使用的 CPU
341-
时间不会超过它被分配的时间
341+
其结果就是每 100 毫秒内容器可以使用的 CPU 时间总量,单位为微秒。在此期间(100ms),
342+
容器所使用的 CPU 时间不可以超过它被分配的时间
342343

343344
{{< note >}}
344345
默认的配额(Quota)周期为 100 毫秒。CPU 配额的最小精度为 1 毫秒。
@@ -621,13 +622,22 @@ spec:
621622
ephemeral-storage: "2Gi"
622623
limits:
623624
ephemeral-storage: "4Gi"
625+
volumeMounts:
626+
- name: ephemeral
627+
mountPath: "/tmp"
624628
- name: log-aggregator
625629
image: images.my-company.example/log-aggregator:v6
626630
resources:
627631
requests:
628632
ephemeral-storage: "2Gi"
629633
limits:
630634
ephemeral-storage: "4Gi"
635+
volumeMounts:
636+
- name: ephemeral
637+
mountPath: "/tmp"
638+
volumes:
639+
- name: ephemeral
640+
emptyDir: {}
631641
```
632642

633643
<!--

0 commit comments

Comments
 (0)