https://access.redhat.com/solutions/3936101
How to change the default HugePage size in Red Hat Enterprise Linux 8?
SOLUTION 已验证 - 已更新 2019年二月24日21:52 -
环境
- Red Hat Enterprise Linux 8
- HugePage
问题
- How to change the default HugePage size in Red Hat Enterprise Linux 8?
- How to change the default HugePage size to 1GB on X86-64 platform?
决议
-
The kernel boot parameter
default_hugepagesz
is used to set the size of the default HugeTLB page. -
Set
default_hugepagesz=1G
in/boot/grub2/grubenv
file to change the default HugePage size to 1GB on X86-64 platform.
# grep kernelopts /boot/grub2/grubenv
kernelopts=root=/dev/mapper/rhel-root ro resume=/dev/mapper/rhel-swap rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap rhgb quiet default_hugepagesz=1G
- Reboot the system for changes to take effect.
# reboot
- Verify the default HugePage size using the following commands.
# grep Hugepagesize: /proc/meminfo
Hugepagesize: 1048576 kB
# hugeadm --pool-list
Size Minimum Current Maximum Default
1073741824 0 0 0 *