File tree Expand file tree Collapse file tree 1 file changed +33
-3
lines changed
content/en/docs/tasks/manage-hugepages Expand file tree Collapse file tree 1 file changed +33
-3
lines changed Original file line number Diff line number Diff line change @@ -14,15 +14,45 @@ by applications in a Pod. This page describes how users can consume huge pages.
14
14
15
15
## {{% heading "prerequisites" %}}
16
16
17
+ Kubernetes nodes must
18
+ [ pre-allocate huge pages] ( https://www.kernel.org/doc/html/latest/admin-guide/mm/hugetlbpage.html )
19
+ in order for the node to report its huge page capacity.
17
20
18
- 1 . Kubernetes nodes must pre-allocate huge pages in order for the node to report
19
- its huge page capacity. A node can pre-allocate huge pages for multiple
20
- sizes.
21
+ A node can pre-allocate huge pages for multiple sizes, for instance,
22
+ the following line in ` /etc/default/grub ` allocates ` 2*1GiB ` of 1 GiB
23
+ and ` 512*2 MiB ` of 2 MiB pages:
24
+
25
+ ```
26
+ GRUB_CMDLINE_LINUX="hugepagesz=1G hugepages=2 hugepagesz=2M hugepages=512"
27
+ ```
21
28
22
29
The nodes will automatically discover and report all huge page resources as
23
30
schedulable resources.
24
31
32
+ When you describe the Node, you should see something similar to the following
33
+ in the following in the ` Capacity ` and ` Allocatable ` sections:
34
+
35
+ ```
36
+ Capacity:
37
+ cpu: ...
38
+ ephemeral-storage: ...
39
+ hugepages-1Gi: 2Gi
40
+ hugepages-2Mi: 1Gi
41
+ memory: ...
42
+ pods: ...
43
+ Allocatable:
44
+ cpu: ...
45
+ ephemeral-storage: ...
46
+ hugepages-1Gi: 2Gi
47
+ hugepages-2Mi: 1Gi
48
+ memory: ...
49
+ pods: ...
50
+ ```
25
51
52
+ {{< note >}}
53
+ For dynamically allocated pages (after boot), the Kubelet needs to be restarted
54
+ for the new allocations to be refrelected.
55
+ {{< /note >}}
26
56
27
57
<!-- steps -->
28
58
You can’t perform that action at this time.
0 commit comments