WARNING | OS Check | Linux transparent huge pages are enabled |
报告中指出建议禁用该特性,对于oracle数据库运行在sles11,rhel6或者oracle linux6上,均建议禁用,按照官方说法,可能导致节点重启或者性能问题
Starting with SLES11, RHEL6, OL6 and UEK2 Kernels, Transparent HugePages are introduced and enabled by default, and this can cause node reboots and performance problems.
关于如何禁用THP的方式参考:
- Note: 1557478.1 - RAC - Disable Transparent HugePages on SLES11, RHEL6 and OEL6
DESCRIPTION
Note: This ONLY applies to the new feature Transparent HugePages, Oracle highly recommends the use of standard HugePages that were recommended for previous releases of Linux. See Document 361323.1 for additional information on HugePages.OCCURRENCE
Starting with SLES11, RHEL6, OL6 and UEK2 Kernels, Transparent HugePages are introduced and enabled by default, and this can cause node reboots and performance problems.
SYMPTOMS
Node reboots.
The ocssd.log may show some of the threads are blocked (but this does not show all the time):
2013-05-01 14:30:45.255: [ CSSD][224204544]clssscMonitorThreads clssnmvKillBlockThread not scheduled for 7500 msecs
2013-05-01 14:30:46.945: [ CSSD][224204544]clssscMonitorThreads clssnmvWorkerThread not scheduled for 8030 msecsWORKAROUND
The workaround provided here may not work for newer versions of Redhat like Redhat 7 or SLES. If the following workaround does not work, please contact Redhat or SLES (SUSE) for actual instruction on how to disable the transparent hugepages.
To check if the Transparent HugePages are enabled in your server execute the following:Default/Enabled setting is [always]:
# cat /sys/kernel/mm/transparent_hugepage/enabled
[always] neverNote 1: For RHEL kernel, the file path is different from above:
# cat /sys/kernel/mm/ redhat_transparent_hugepage/enabled
[always] never
Pleaes modify this file accordingly.
Note 2: For UEK2 kernel, as of 2.6.39-400.116.0 Transparent Hugepages has been removed from the kernel. If it is not compiled into the kernel then /sys/kernel/mm/transparent_hugepage will not exist.
Disabled setting is [never]:# cat /sys/kernel/mm/transparent_hugepage/enabled
always [never]If "enabled" is NOT set to "[never]", the Transparent HugePages are being used.
You can also issue:
# grep AnonHugePages /proc/meminfoIf the output contains a line like "AnonHugepages: xxxx kB", with a value > 0kB, the kernel is using Transparent HugePages.
Because the kernel currently uses Transparent HugePages only for the anonymous memory blocks like stack and heap, the value of AnonHugepages in /proc/meminfo is the current amount of Transparent HugePages that the kernel is using.
禁用THP的方法如下,两种方案:
To disable Transparent HugePages boot time either one of the following 2 methods may be used:Add the following to the kernel boot line in /etc/grub.conf (a symlink to /boot/grub/grub.conf) and reboot the server (this is the preferred method):
transparent_hugepage=neverOnce modified the line will read similar to the following example:
title Oracle Linux Server (2.6.32-300.25.1.el6uek.x86_64)
root (hd0,0)
kernel /vmlinuz-2.6.32-300.25.1.el6uek.x86_64 ro root=LABEL=/ transparent_hugepage=never
initrd /initramfs-2.6.32-300.25.1.el6uek.x86_64.img
OR
Add the following lines in /etc/rc.local and reboot the server (this still can be done on Redhat 7 although rc.local is being deprecated):
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
Please change the file path for RHEL kernel to /sys/kernel/mm/redhat_transparent_hugepage/ accordingly.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/27802288/viewspace-1711574/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/27802288/viewspace-1711574/