Translate tasks/manage-hugepages/scheduling-hugepages into Japanese.
This commit is contained in:
@@ -1,44 +1,27 @@
|
||||
---
|
||||
reviewers:
|
||||
- derekwaynecarr
|
||||
title: Manage HugePages
|
||||
title: HugePageを管理する
|
||||
content_type: task
|
||||
description: Configure and manage huge pages as a schedulable resource in a cluster.
|
||||
description: クラスター内のスケジュール可能なリソースとしてhuge pageの設定と管理を行います。
|
||||
---
|
||||
|
||||
<!-- overview -->
|
||||
{{< feature-state state="stable" >}}
|
||||
|
||||
Kubernetes supports the allocation and consumption of pre-allocated huge pages
|
||||
by applications in a Pod. This page describes how users can consume huge pages.
|
||||
Kubernetesでは、事前割り当てされたhuge pageをPod内のアプリケーションに割り当てたり利用したりすることをサポートしています。このページでは、ユーザーがhuge pageを利用できるようにする方法について説明します。
|
||||
|
||||
## {{% heading "prerequisites" %}}
|
||||
|
||||
1. Kubernetesのノードがhuge pageのキャパシティを報告するためには、ノード上でhuge pageを事前割り当てしておく必要があります。1つのノードでは複数のサイズのhuge pageが事前割り当てできます。
|
||||
|
||||
1. Kubernetes nodes must pre-allocate huge pages in order for the node to report
|
||||
its huge page capacity. A node can pre-allocate huge pages for multiple
|
||||
sizes.
|
||||
|
||||
The nodes will automatically discover and report all huge page resources as
|
||||
schedulable resources.
|
||||
|
||||
|
||||
ノードは、すべてのhuge pageリソースを、スケジュール可能なリソースとして自動的に探索・報告してくれます。
|
||||
|
||||
<!-- steps -->
|
||||
|
||||
## API
|
||||
|
||||
Huge pages can be consumed via container level resource requirements using the
|
||||
resource name `hugepages-<size>`, where `<size>` is the most compact binary
|
||||
notation using integer values supported on a particular node. For example, if a
|
||||
node supports 2048KiB and 1048576KiB page sizes, it will expose a schedulable
|
||||
resources `hugepages-2Mi` and `hugepages-1Gi`. Unlike CPU or memory, huge pages
|
||||
do not support overcommit. Note that when requesting hugepage resources, either
|
||||
memory or CPU resources must be requested as well.
|
||||
|
||||
A pod may consume multiple huge page sizes in a single pod spec. In this case it
|
||||
must use `medium: HugePages-<hugepagesize>` notation for all volume mounts.
|
||||
huge pageはコンテナレベルのリソース要求で`hugepages-<size>`という名前のリソースを指定することで利用できます。ここで、`<size>`は、特定のノード上でサポートされている整数値を使った最も小さなバイナリ表記です。たとえば、ノードが2048KiBと1048576KiBのページサイズをサポートしている場合、ノードはスケジュール可能なリソースとして、`hugepages-2Mi`と`hugepages-1Gi`の2つのリソースを公開します。CPUやメモリとは違い、huge pageはオーバーコミットをサポートしません。hugepageリソースをリクエストするときには、メモリやCPUリソースを同時にリクエストしなければならないことに注意してください。
|
||||
|
||||
1つのPodのspec内に書くことで、Podから複数のサイズのhuge pageを利用することもできます。その場合、すべてのボリュームマウントで`medium: HugePages-<hugepagesize>`という表記を使う必要があります。
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
@@ -73,7 +56,7 @@ spec:
|
||||
medium: HugePages-1Gi
|
||||
```
|
||||
|
||||
A pod may use `medium: HugePages` only if it requests huge pages of one size.
|
||||
Podで1種類のサイズのhuge pageをリクエストするときだけは、`medium: HugePages`という表記を使うこともできます。
|
||||
|
||||
```yaml
|
||||
apiVersion: v1
|
||||
@@ -102,19 +85,9 @@ spec:
|
||||
medium: HugePages
|
||||
```
|
||||
|
||||
- Huge page requests must equal the limits. This is the default if limits are
|
||||
specified, but requests are not.
|
||||
- Huge pages are isolated at a container scope, so each container has own limit on their cgroup sandbox as requested in a container spec.
|
||||
- EmptyDir volumes backed by huge pages may not consume more huge page memory
|
||||
than the pod request.
|
||||
- Applications that consume huge pages via `shmget()` with `SHM_HUGETLB` must
|
||||
run with a supplemental group that matches `proc/sys/vm/hugetlb_shm_group`.
|
||||
- Huge page usage in a namespace is controllable via ResourceQuota similar
|
||||
to other compute resources like `cpu` or `memory` using the `hugepages-<size>`
|
||||
token.
|
||||
- Support of multiple sizes huge pages is feature gated. It can be
|
||||
enabled with the `HugePageStorageMediumSize` [feature
|
||||
gate](/docs/reference/command-line-tools-reference/feature-gates/) on the {{<
|
||||
glossary_tooltip text="kubelet" term_id="kubelet" >}} and {{<
|
||||
glossary_tooltip text="kube-apiserver"
|
||||
term_id="kube-apiserver" >}} (`--feature-gates=HugePageStorageMediumSize=true`).
|
||||
- huge pageのrequestsはlimitsと等しくなければなりません。limitsを指定した場合にはこれがデフォルトですが、requestsを指定しなかった場合にはデフォルトではありません。
|
||||
- huge pageはコンテナのスコープで隔離されるため、各コンテナにはそれぞれのcgroupサンドボックスの中でcontainer specでリクエストされた通りのlimitが設定されます。
|
||||
- huge pageベースのEmptyDirボリュームは、Podがリクエストしたよりも大きなサイズのページメモリーを使用できません。
|
||||
- `shmget()`に`SHM_HUGETLB`を指定して取得したhuge pageを使用するアプリケーションは、`/proc/sys/vm/hugetlb_shm_group`に一致する補助グループ(supplemental group)を使用して実行する必要があります。
|
||||
- namespace内のhuge pageの使用量は、ResourceQuotaに対して`cpu`や`memory`のような他の計算リソースと同じように`hugepages-<size>`というトークンを使用することで制御できます。
|
||||
- 複数のサイズのhuge pageのサポートはフィーチャーゲートによる設定が必要です。{{< glossary_tooltip text="kubelet" term_id="kubelet" >}}と{{< glossary_tooltip text="kube-apiserver" term_id="kube-apiserver" >}}上で、`HugePageStorageMediumSize`[フィーチャーゲート](/ja/docs/reference/command-line-tools-reference/feature-gates/)を使用すると有効にできます(`--feature-gates=HugePageStorageMediumSize=true`)。
|
||||
|
||||
Reference in New Issue
Block a user