天天看點

【轉】怎麼在RHEL8中改變HugePage Size?How to change the default HugePage size in Red Hat Enterprise Linux 8?

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        *
           

繼續閱讀