Visit Support

Transparent HugePages Settings

Looking for Zing? The Azul Zing Virtual Machine is now Azul Zulu Prime Builds of OpenJDK and part of Azul Platform Prime. Learn more.

Note: These settings are only applicable to using Azul Zulu Prime Builds of OpenJDK (Azul Zulu Prime JVM) with Azul Zulu Prime System Tools (ZST).

If your operating system supports Transparent HugePages (THP), the THP feature must be turned off. For RHEL systems, see

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 
  2. Open the grub configuration file for editing.

    • For RHEL: /boot/grub/grub.conf

    • For SLES: /boot/grub/menu.1st

    • For Ubuntu: /etc/default/grub

  3. 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 
  4. Reboot the server. This is required to have the change take effect.

  5. 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=" vconsole.font=latarcyrheb-sun16 vconsole.keymap=us transparent_hugepage=never" 
  2. Run the grub2-mkconfig command to regenerate the grub.cfg file. For example:

     $ sudo grub2-mkconfig -o /boot/grub2/grub.cfg 
  3. Reboot the system and ensure that the parameter is set correctly:

     $ 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 and create a copy. In the following example we currently use the throughput-performance profile:

     $ sudo tuned-adm active
    Current active profile: throughput-performance 
  2. To create customized profile, create a new directory in /etc/tuned directory with desired profile name. For example,

     $ sudo mkdir /etc/tuned/myprofile-nothp 
  3. 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
    include= throughput-performance
  4. Make the script executable:

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

     $ 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 


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