【转】怎么在RHEL8中改变HugePage Size?

https://access.redhat.com/solutions/3936101

How to change the default HugePage size in Red Hat Enterprise Linux 8?

SOLUTION 已验证 - 已更新 2019年二月24日21:52 - 

English 

环境

  • 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.

Raw

# 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.

Raw

# reboot
  • Verify the default HugePage size using the following commands.

Raw

# grep Hugepagesize: /proc/meminfo 
Hugepagesize:    1048576 kB

# hugeadm --pool-list
      Size  Minimum  Current  Maximum  Default
1073741824        0        0        0        *

猜你喜欢

转载自blog.csdn.net/msdnchina/article/details/89975176