File-Based Configuration Parameters for HugeTLB Pages
Note:
In addition to accessing the settings at runtime, you can also initialize the parameters early in the boot process, for example, by creating a start-up bash script or by setting the parameters up in a local rc init script.nr_hugepages
settings can exist. This parameter defines the number of pages
in a pool, including the following:
- File
/sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
for the number of pages in the pool of 2 MB pages. - File
/sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages
for the number of pages in the pool of 1 GB pages.
The following table outlines commonly used HugeTLB configuration parameters and the multiple file instances that you might find for each parameter.
Table 2-2 Commonly Used File-Based HugeTLB Parameters
Parameter | Purpose | File Paths for Different Instances |
---|---|---|
nr_hugepages
|
|
The file path formats for different instances of
nr_hugepages are as follows:
|
nr_overcommit_hugepages
|
|
The file path formats for different instances of
nr_overcommit_hugepages are as follows:
Note: The |
free_hugepages
|
|
The file path formats for different instances of
|
surplus_hugepages
|
|
The file path formats for different instances of
|
The following sections show file branches under which different instances of the HugeTLB parameters are stored:
/proc/sys/vm
All systems that support static huge pages contain HugeTLB parameter files under
/proc/sys/vm
.
Note:
On many systems, including many Oracle database servers, the
procfs
file system is the main parameter-set used.
The sysctl
parameter vm.nr_hugepages
that's commonly
initialized in scripts that request huge pages also writes to the procfs
file /proc/sys/vm/nr_hugepages
.
The following are example folders under branch /proc/sys/vm
:
├── ...
├── ...
├── nr_hugepages
├── ...
├── nr_overcommit_hugepages
├── ...
├── ...
/sys/kernel/mm/hugepages/
Systems that support multiple size pools contain HugeTLB parameter files in size-specific
folders under /sys/kernel/mm/hugepages/
.
The following are example folders under branch /sys/kernel/mm/hugepages/
:
└── hugepages-2048kB
├── free_hugepages
├── nr_hugepages
├── ...
├── nr_overcommit_hugepages
├── ...
└── surplus_hugepages
└── hugepages-1048576kB
├── free_hugepages
├── nr_hugepages
├── ...
├── nr_overcommit_hugepages
├── ...
└── surplus_hugepages
/sys/devices/system/node/
Only NUMA systems contain HugeTLB parameter files under
/sys/devices/system/node/
.
The following are example folders under branch
/sys/devices/system/node
:
├─ ...
├── node0
│ ├── ...
│ ├──hugepages
│ hugepages-2048kB
│ ├── free_hugepages
│ ├── nr_hugepages
│ └── surplus_hugepages
│
│ hugepages-1048576kB
│ ├── free_hugepages
│ ├── nr_hugepages
│ └── surplus_hugepages
├── node1
├── ...
├──hugepages
hugepages-2048kB
├── free_hugepages
├── nr_hugepages
└── surplus_hugepages
hugepages-1048576kB
├── free_hugepages
├── nr_hugepages
└── surplus_hugepages