I am trying to disable Transparent Huge Pages in my CentOS for HDP2.2 installation. I am using this link for the reference but I am still getting the issue.

I tried to add this also:

Adding the following lines to /etc/rc.d/rc.local and restarted the machine.

echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag

And give execution rights to the file:

chmod +x /etc/rc.d/rc.local

Reference from Hortonworks link and disable transparent hugepages

I have tried editing /etc/rc.local and restated the machine.

  test -f /sys/kernel/mm/redhat_transparent_hugepage/defrag; then 
  echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag 

  test -f /sys/kernel/mm/redhat_transparent_hugepage/enabled; then 
  echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled 

When I do: cat /sys/kernel/mm/transparent_hugepage/enabled I get below message on console:

[always] madvise never

Can you please explain the exact meaning of this message.

I rebooted the machine and restarted the Ambari but ambari installation wizard is still saying thatTransparent Huge Pages is still enabled . I am new in it and looking for some help to resolve the issue.

  • I tried the way they suggested there but no luck for me :( Jun 12, 2015 at 15:12
  • What didn't work for you? Details, please! Jun 12, 2015 at 20:46
  • I tried the steps which I have mentioned in my question. The same steps are mentioned in the duplicate post also. I don't want to edit /etc/grub.conf file for this. If editing /etc/rc.local file works then why it is not working for me in CentOS6.6 Jun 13, 2015 at 2:54

1 Answer 1


You can add transparent_hugepage=never as a kernel parameter.

Edit /boot/grub/grub.cfg and add it to the kernel line.


kernel /boot/vmlinuz-2.6.32-504.1.3.el6.x86_64 ro root=/dev/vda1 rd_NO_LUKS  KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_NO_MD console=ttyS0,115200n8 console=tty0 crashkernel=auto SYSFONT=latarcyrheb-sun16 rd_NO_LVM rd_NO_DM rhgb quiet transparent_hugepage=never

Then reboot.

Not the answer you're looking for? Browse other questions tagged .