Thursday, February 26, 2015

Hadoop Disable Transparent Huge Pages

Hadoop HDP THP Disable

·         Disable Transparent Huge Pages
§  RHEL
·         Disable THP at boot time
·         Append the following to the kernel command line in /etc/grub.conf:
·         transparent_hugepage=never
·         Add the following commands to your /etc/rc.local file
if test -f /sys/kernel/mm/transparent_hugepage/enabled; then
    echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
fi

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

·       Disable THP at run time
·         Run the following commands to disable THP on-the-fly:
·         echo never > /sys/kernel/mm/redhat_transparent_hugepage/enabled
·         echo never > /sys/kernel/mm/redhat_transparent_hugepage/defrag
·       How to check if HugePages is enabled or disabled
·         if the value of HugePages_Total is "0" it means HugePages is disabled on the system.
·         grep -i HugePages_Total /proc/meminfo
·          if the value in /proc/sys/vm/nr_hugepages file or vm.nr_hugepages sysctl parameter is "0" it means HugePages is disabled on the system
·         cat /proc/sys/vm/nr_hugepages
·         sysctl vm.nr_hugepages
§  Reference Documents


No comments:

Post a Comment