Requesting HugeTLB Pages Using NUMA Node Specific Parameters Early in the Boot Process
The precise way to request huge pages at boot time depends upon the system's requirements. The following procedure provides some guidance but isn't exclusive of other approaches to configuring boot options.
Huge Pages requested by using the kernel boot-time parameters, as shown in the previous example, are divided equally between the NUMA nodes.
However, you might need to request a different number of huge pages for specific nodes by setting the configuration values in a node specific file path. The file path is defined as follows:.
/sys/devices/system/node/node{0,1,2…n}/hugepages/hugepages-<SIZE>kB/
The following procedure describes how to reserve 299 pages of 2 MB size on node 0,
and 300 pages of 2 MB size on node 1 on a NUMA system. This approach uses a custom
systemd service to run a shell script after boot, to set the sysfs
parameters required.
Before beginning the following procedure, ensure that you have the administrative privileges required for all the steps.
For more information about using systemd units, see see Oracle Linux 8: Managing the System With systemd.