Skip to content

Commit 72f071c

Browse files
authored
Merge pull request #19940 from gaoguangze111/update-manage-compute-resources-container-zh
update manage-compute-resources-container-zh
2 parents bed6714 + 47db614 commit 72f071c

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

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

Lines changed: 23 additions & 0 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 大页面(总共 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
<!--

0 commit comments

Comments
 (0)