Transparent Hugepage is not getting disabled (Doc ID 2279458.1)

Transparent Hugepage is not getting disabled (Doc ID 2279458.1) To BottomTo Bottom

In this Document

  Symptoms
  Cause
  Solution
  References

 

APPLIES TO:

Linux OS - Version Oracle Linux 6.8 with Unbreakable Enterprise Kernel [4.1.12] and later
Information in this document applies to any platform.

SYMPTOMS

Trying to disable transparent hugepages. Made the following entries:

/etc/grub.conf

kernel /vmlinuz-2.6.32-642.3.1.el6.x86_64 ro root=/dev/mapper/vg_ho02db02-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=vg_ho02db02/lv_swap rd_LVM_LV=vg_ho02db02/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet numa=off transparent_hugepage=never fnic.fnic_max_qdepth=256

 

/etc/rc.d/rc.local:
if test −f /sys/kernel/mm/transparent_hugepage/enabled; then
echo never > /sys/kernel/mm/transparent_hugepage/enabled
fi
if test −f /sys/kernel/mm/transparent_hugepage/defrag; then
echo never > /sys/kernel/mm/transparent_hugepage/defrag
fi

Even though the changes have been made the system still shows hugepage is active

CAUSE

The ktune service enables transparent_hugepages by default for all profiles hence anytime a tuned profile is enabled at bootup or manually transparent huge pages gets re-enabled.
 
The below file states the cause of the hugepage getting enabled always even though it is set to never in grub.conf file
/etc/tune-profiles/enterprise-storage/ktune.sh

#!/bin/sh

. /etc/tune-profiles/functions

start() {
  set_cpu_governor performance
  set_transparent_hugepages always ---->>>> set transparent_hugepages always
  disable_disk_barriers
  multiply_disk_readahead 4

  return 0
}

stop() {
  [ "$1" != "restart" ] && restore_cpu_governor
  restore_transparent_hugepages
  enable_disk_barriers
  restore_disk_readahead

  return 0
}

process $@ 

SOLUTION

#service tuned stop
#chkconfig tuned off
#service ktune stop
#chkconfig ktune off


Append transparent_hugepage=never to kernel command line in /boot/grub/grub.conf file

/etc/grub.conf:
...
kernel /vmlinuz-2.6.32-642.3.1.el6.x86_64 ro root=/dev/mapper/vg_ho02db02-lv_root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto rd_LVM_LV=vg_ho02db02/lv_swap rd_LVM_LV=vg_ho02db02/lv_root KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet numa=off transparent_hugepage=never  fnic.fnic_max_qdepth=256
...

Reboot the server and check if  /sys/kernel/mm/transparent_hugepage/enabled changed

#cat /sys/kernel/mm/transparent_hugepage/enabled
always madvise [never]

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326044049&siteId=291194637