0

This question already has an answer here:

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.

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

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

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.

marked as duplicate by Stephen Kitt, chaos, cuonglm, Anthon, roaima Jun 12 '15 at 20:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I tried the way they suggested there but no luck for me :( – Sandeep Singh Jun 12 '15 at 15:12
  • What didn't work for you? Details, please! – roaima Jun 12 '15 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 – Sandeep Singh Jun 13 '15 at 2:54
1

You can add transparent_hugepage=never as a kernel parameter.

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

Example:

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 or ask your own question.