Skip to content

Commit 8dd1c04

Browse files
committed
update manage-compute-resources-container-zh
1 parent 661f064 commit 8dd1c04

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

content/zh/docs/concepts/configuration/manage-compute-resources-container.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,20 @@ the difference between requests and limits, see
4242
## Resource types
4343
*CPU* and *memory* are each a *resource type*. A resource type has a base unit.
4444
CPU is specified in units of cores, and memory is specified in units of bytes.
45+
46+
If you're using Kubernetes v1.14 or newer, you can specify _huge page_ resources.
47+
Huge pages are a Linux-specific feature where the node kernel allocates blocks of memory
48+
that are much larger than the default page size.
49+
50+
For example, on a system where the default page size is 4KiB, you could specify a limit,
51+
`hugepages-2Mi: 80Mi`. If the container tries allocating over 40 2MiB huge pages (a
52+
total of 80 MiB), that allocation fails.
53+
54+
{{< note >}}
55+
You cannot overcommit `hugepages-*` resources.
56+
This is different from the `memory` and `cpu` resources.
57+
{{< /note >}}
58+
4559
CPU and memory are collectively referred to as *compute resources*, or just
4660
*resources*. Compute
4761
resources are measurable quantities that can be requested, allocated, and
@@ -55,6 +69,15 @@ through the Kubernetes API server.
5569

5670
*CPU**内存*都是*资源类型*。资源类型具有基本单位。CPU 的单位是核心数,内存的单位是字节。
5771

72+
如果您使用的是Kubernetes v1.14或更高版本,则可以指定巨大页资源。巨大页是Linux特有的功能,节点内核在其中分配的内存块比默认页面大小大得多。
73+
74+
例如,在默认页面大小为4KiB的系统上,您可以指定一个限制,`hugepages-2Mi:80Mi`。如果容器尝试分配40多个2MiB大页面(a总共80 MiB),则分配失败。
75+
76+
{{< note >}}
77+
您不能过量使用`hugepages- *`资源。
78+
这与`memory``cpu`资源不同。
79+
{{< /note >}}
80+
5881
CPU和内存统称为*计算资源*,也可以称为*资源*。计算资源的数量是可以被请求、分配、消耗和可测量的。它们与 [API 资源](/docs/concepts/overview/kubernetes-api/) 不同。 API 资源(如 Pod 和 [Service](/docs/concepts/services-networking/service/))是可通过 Kubernetes API server 读取和修改的对象。
5982

6083
<!--
@@ -275,7 +298,7 @@ resource limits, see the
275298

276299
The resource usage of a Pod is reported as part of the Pod status.
277300

278-
If [optional monitoring](/docs/tasks/debug-application-cluster/resource-metrics-pipeline/)
301+
If [optional monitoring](http://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/cluster-monitoring/README.md)
279302
is configured for your cluster, then Pod resource usage can be retrieved from
280303
the monitoring system.
281304
-->
@@ -284,7 +307,7 @@ the monitoring system.
284307

285308
Pod 的资源使用情况被报告为 Pod 状态的一部分。
286309

287-
如果为集群配置了 [可选监控](/docs/tasks/debug-application-cluster/resource-metrics-pipeline/),则可以从监控系统检索 Pod 资源的使用情况。
310+
如果为集群配置了 [可选监控](http://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/cluster-monitoring/README.md),则可以从监控系统检索 Pod 资源的使用情况。
288311

289312
<!--
290313
## Troubleshooting

0 commit comments

Comments
 (0)