update manage-compute-resources-container-zh
parent
661f064fa3
commit
8dd1c04e42
|
@ -42,6 +42,20 @@ the difference between requests and limits, see
|
|||
## Resource types
|
||||
*CPU* and *memory* are each a *resource type*. A resource type has a base unit.
|
||||
CPU is specified in units of cores, and memory is specified in units of bytes.
|
||||
|
||||
If you're using Kubernetes v1.14 or newer, you can specify _huge page_ resources.
|
||||
Huge pages are a Linux-specific feature where the node kernel allocates blocks of memory
|
||||
that are much larger than the default page size.
|
||||
|
||||
For example, on a system where the default page size is 4KiB, you could specify a limit,
|
||||
`hugepages-2Mi: 80Mi`. If the container tries allocating over 40 2MiB huge pages (a
|
||||
total of 80 MiB), that allocation fails.
|
||||
|
||||
{{< note >}}
|
||||
You cannot overcommit `hugepages-*` resources.
|
||||
This is different from the `memory` and `cpu` resources.
|
||||
{{< /note >}}
|
||||
|
||||
CPU and memory are collectively referred to as *compute resources*, or just
|
||||
*resources*. Compute
|
||||
resources are measurable quantities that can be requested, allocated, and
|
||||
|
@ -55,6 +69,15 @@ through the Kubernetes API server.
|
|||
|
||||
*CPU* 和*内存*都是*资源类型*。资源类型具有基本单位。CPU 的单位是核心数,内存的单位是字节。
|
||||
|
||||
如果您使用的是Kubernetes v1.14或更高版本,则可以指定巨大页资源。巨大页是Linux特有的功能,节点内核在其中分配的内存块比默认页面大小大得多。
|
||||
|
||||
例如,在默认页面大小为4KiB的系统上,您可以指定一个限制,`hugepages-2Mi:80Mi`。如果容器尝试分配40多个2MiB大页面(a总共80 MiB),则分配失败。
|
||||
|
||||
{{< note >}}
|
||||
您不能过量使用`hugepages- *`资源。
|
||||
这与`memory`和`cpu`资源不同。
|
||||
{{< /note >}}
|
||||
|
||||
CPU和内存统称为*计算资源*,也可以称为*资源*。计算资源的数量是可以被请求、分配、消耗和可测量的。它们与 [API 资源](/docs/concepts/overview/kubernetes-api/) 不同。 API 资源(如 Pod 和 [Service](/docs/concepts/services-networking/service/))是可通过 Kubernetes API server 读取和修改的对象。
|
||||
|
||||
<!--
|
||||
|
@ -275,7 +298,7 @@ resource limits, see the
|
|||
|
||||
The resource usage of a Pod is reported as part of the Pod status.
|
||||
|
||||
If [optional monitoring](/docs/tasks/debug-application-cluster/resource-metrics-pipeline/)
|
||||
If [optional monitoring](http://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/cluster-monitoring/README.md)
|
||||
is configured for your cluster, then Pod resource usage can be retrieved from
|
||||
the monitoring system.
|
||||
-->
|
||||
|
@ -284,7 +307,7 @@ the monitoring system.
|
|||
|
||||
Pod 的资源使用情况被报告为 Pod 状态的一部分。
|
||||
|
||||
如果为集群配置了 [可选监控](/docs/tasks/debug-application-cluster/resource-metrics-pipeline/),则可以从监控系统检索 Pod 资源的使用情况。
|
||||
如果为集群配置了 [可选监控](http://releases.k8s.io/{{< param "githubbranch" >}}/cluster/addons/cluster-monitoring/README.md),则可以从监控系统检索 Pod 资源的使用情况。
|
||||
|
||||
<!--
|
||||
## Troubleshooting
|
||||
|
|
Loading…
Reference in New Issue