Back to Zing Documentation Home

Transparent HugePages Settings

Note

These settings are only applicable to the Zing Virtual Machine (ZVM) running in the ZST mode.

If your operating system supports Transparent HugePages (THP), the THP feature must be turned off. For RHEL systems, see https://access.redhat.com/site/solutions/422283.

To disable Transparent HugePages on RHEL, SUSE, and Ubuntu systems:

  1. Check the current HugePage setting.

# cat /sys/kernel/mm/transparent_hugepage/enabled

Sample response.

[always] madvise never

  1. Open the grub configuration file for editing.
  • For RHEL: /boot/grub/grub.conf
  • For SLES: /boot/grub/menu.1st
  • For Ubuntu: /etc/default/grub
  1. Add transparent_hugepage=never to the kernel boot line, for example:

title Red Hat Enterprise Linux Server (2.6.32-431.el6.x86_64)

root (hd0,0)

kernel /vmlinuz-2.6.32-431.el6.x86_64 ro root=/dev/mapper/vg_qaesp3-lv_root rd_LVM_LV=vg_qaesp3

/lv_root rd_LVM_LV=vg_qaesp3/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-

sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet transparent_hugepage=never

initrd /initramfs-2.6.32-431.el6.x86_64.img

  1. Reboot the server. This is required to have the change take effect.
  2. Check the change is applied after reboot.

# cat /sys/kernel/mm/transparent_hugepage/enabled

always madvise [never]

On RHEL/CentOS 7.x systems:

Follow the below steps to add the transparent_hugepage=never kernel parameter in grub configuration file:

  1. Append or change the transparent_hugepage=never kernel parameter on the GRUB_CMDLINE_LINUX option in /etc/sysconfig/grub file . Save the file. For example,

GRUB_CMDLINE_LINUX="rd.lvm.lv=rhel/root rd.lvm.lv=rhel/swap vconsole.font=latarcyrheb-sun16 vconsole.keymap=us transparent_hugepage=never"

  1. Run the grub2-mkconfig command to regenerate the grub.cfg file. For example,

$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg

  1. Reboot the system and ensure that the parameter is set correctly. This can be confirmed by running this command:

$ sudo cat /proc/cmdline

If THP are still not disabled, then continue with below steps:

  1. Create a customized tuned profile with disabled THP. The customized version will disable THP. Find out which profile is active, create a copy. In the following example we currently use the throughput-performance profile:

$ sudo tuned-adm active Current active profile: throughput-performance

  1. To create customized profile, create a new directory in /etc/tuned directory with desired profile name. For example,

$ sudo mkdir /etc/tuned/myprofile-nothp

  1. Then create a new tuned.conf file for myprofile-nothp, and insert the new tuning info. For example,

$ sudo cat /etc/tuned/myprofile-nothp/tuned.conf [main] include= throughput-performance [vm] transparent_hugepages=never

  1. Make the script executable:

$ sudo chmod +x /etc/tuned/myprofile-nothp/tuned.conf

  1. Enable myprofile like so:

$ sudo tuned-adm profile myprofile-nothp

This change will immediately take effect and persist reboots. To verify if THP are disabled or not, run the following command:

$ sudo cat /sys/kernel/mm/transparent_hugepage/enabled

Alternatively, disable the tuned services. For example:

$ sudo systemctl stop tuned $ sudo systemctl disable tuned

or

$ sudo tuned-adm off

Now add transparent_hugepage=never kernel parameter in grub configuration file as explained in above first method and reboot the server for changes to take effect.

 

 

 

See Also


© Azul Systems, Inc. 2020 All rights reserved.

Privacy Policy | Legal | Terms of Use