root:$ uname -r
3.8.13-118.14.1.el6uek.x86_64
Reading doc id 361323.1, on setting Hugepages. Section on actually setting the desired value for kernel version 2.6 and later. states:
4. Set kernel parameter:
# sysctl -w vm.nr_hugepages=<value from above>
and make sure that the parameter is persistent to reboots. e.g. On SLES9:
# chkconfig boot.sysctl on
And I get:
root:$ sysctl -w vm.nr_hugepages=300
vm.nr_hugepages = 300
2019-07-23 14:07:59
root:$ chkconfig boot.sysctl on
error reading information on service boot.sysctl: No such file or directory
At this point:
root:rmcatvb$ grep Huge /proc/meminfo
HugePages_Total: 300
HugePages_Free: 300
HugePages_Rsvd: 0
HugePages_Surp: 0
Hugepagesize: 2048 kB
Bu on reboot, HugePages Total and Free have both reverted back to zero.