1871318 - Linux - Disable Transparent HugePages for Oracle Database

3
SAP Note Header Data Symptom Transparent HugePages (THP) on a Linux system in combination with running Oracle Database or Oracle RAC are known to cause unexpected node reboots and performance problems. Other Terms Linux, Kernel, THP, Transparent HugePages, HugePages Reason and Prerequisites Standard HugePages are recommended to be used for Oracle databases in SAP environments. As a workaround until the bug is fixed Oracle recommends HIGHLY to disable the usage of Transparent HugePages (THP) on all database servers running Oracle. Oracle Engineered Systems like Oracle Exadata and Oracle Database Appliance are not affected. Solution Running single instance Oracle Database or Oracle Database with Oracle RAC on Linux distributions with enabled Transparent HugePages (THP) feature,as a workaround until the bug is fixed Oracle recommends HIGHLY to disable THP feature. This ONLY applies to the new feature Transparent HugePages, Oracle HIGHLY recommends the use of standard HugePages for larger SGAs that were recommended in SAP Note 1672954. One of the main difference of Standard HugePages and Transparent HugePages is that Standard HugePages had to be preallocated, THP are set up dynamically at runtime by the Linux kernel. Transparent HugePages (THP) feature merged in Linux kernel version 2.6.38. Details about THP can be find in Linux kernel documentation: /usr/share/doc/kernel-<version>/vm/transhuge.txt THP are introduced with new Linux kernel in the following Linux distributions: l RedHat Enterprise Linux 6 l SUSE Linux Enterprise Server 11 SP2 l Oracle Linux 6 with RHCK l Oracle Linux 5 and Oracle Linux 6 using UEKR2 Information about THP feature are documented in the specfic release note of your distribution or your kernel. To determine the usage of Transparent HugePages take a look in your Linux kernel config file or in the kernel sys interface. The default value for enabled and defrag is set to always: cat /boot/config-`uname -r`| grep TRANSPARENT_HUGEPAGE cat /sys/kernel/mm/transparent_hugepage/enabled cat /sys/kernel/mm/transparent_hugepage/defrag Additional you find the running kernel thread khugepaged, which manage the dynamically allocation of the Transparent HugePages: ps axf | grep khuge 100 0.0 0 0 ? SN May03 0:00 \_ [khugepaged] 9826 0.0 103244 820 pts/0 S+ 21:30 0:00 \_ grep huge You can see the usage of Transparent HugePages with grep AnonHugePages /proc/meminfo if you see a value >0KB your system use THP. 1871318 - Linux: Disable Transparent HugePages for Oracle Database Version 3 Validity:  21.10.2013 - active Language English Released On 21.10.2013 10:34:51 Release Status Released for Customer Component BC-DB-ORA Oracle BC-OP-LNX Linux Priority Correction with high priority Category Consulting Other Components

description

1871318 - Linux - Disable Transparent HugePages for Oracle Database

Transcript of 1871318 - Linux - Disable Transparent HugePages for Oracle Database

  • SAP Note

    Header Data

    Symptom

    Transparent HugePages (THP) on a Linux system in combination with running Oracle Database or Oracle RAC are known to cause unexpected node reboots and performance problems.

    Other Terms

    Linux, Kernel, THP, Transparent HugePages, HugePages

    Reason and Prerequisites

    Standard HugePages are recommended to be used for Oracle databases in SAP environments. As a workaround until the bug is fixed Oracle recommends HIGHLY to disable the usage of Transparent HugePages (THP) on all database servers running Oracle. Oracle Engineered Systems like Oracle Exadata and Oracle Database Appliance are not affected.

    Solution

    Running single instance Oracle Database or Oracle Database with Oracle RAC on Linux distributions with enabled Transparent HugePages (THP) feature,as a workaround until the bug is fixed Oracle recommends HIGHLY to disable THP feature. This ONLY applies to the new feature Transparent HugePages, Oracle HIGHLY recommends the use of standard HugePages for larger SGAs that were recommended in SAP Note 1672954. One of the main difference of Standard HugePages and Transparent HugePages is that Standard HugePages had to be preallocated, THP are set up dynamically at runtime by the Linux kernel. Transparent HugePages (THP) feature merged in Linux kernel version 2.6.38. Details about THP can be find in Linux kernel documentation: /usr/share/doc/kernel-/vm/transhuge.txt THP are introduced with new Linux kernel in the following Linux distributions:

    l RedHat Enterprise Linux 6

    l SUSE Linux Enterprise Server 11 SP2

    l Oracle Linux 6 with RHCK

    l Oracle Linux 5 and Oracle Linux 6 using UEKR2

    Information about THP feature are documented in the specfic release note of your distribution or your kernel. To determine the usage of Transparent HugePages take a look in your Linux kernel config file or in the kernel sys interface. The default value for enabled and defrag is set to always: cat /boot/config-`uname -r`| grep TRANSPARENT_HUGEPAGE cat /sys/kernel/mm/transparent_hugepage/enabled cat /sys/kernel/mm/transparent_hugepage/defrag Additional you find the running kernel thread khugepaged, which manage the dynamically allocation of the Transparent HugePages: ps axf | grep khuge 100 0.000 ?SN May03 0:00\_ [khugepaged] 98260.0 103244 820 pts/0S+21:30 0:00\_ grep huge You can see the usage of Transparent HugePages with grep AnonHugePages /proc/meminfo if you see a value >0KB your system use THP.

    1871318 - Linux: Disable Transparent HugePages for Oracle Database

    Version 3 Validity: 21.10.2013 - active Language English

    Released On 21.10.2013 10:34:51 Release Status Released for Customer Component BC-DB-ORA Oracle

    BC-OP-LNX Linux

    Priority Correction with high priority Category Consulting

    Other Components

  • To disable the THP feature you either need to change the Kernel grub configuration or with expanding the init scripts. Add the following to the kernel boot line in /boot/grub/grub.conf (this is the preferred method) and reboot the server: transparent_hugepage=never Other possible way is to expand your /etc/rc.local and reboot: 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

    Validity

    This document is not restricted to a software component or software component version

    References

    This document refers to:

    SAP Notes

    This document is referenced by:

    SAP Notes (4)

    1672954 Oracle 11g: Usage of hugepages on Linux 1567511 Oracle Linux 5.x SAP Installation and Upgrade

    171356 SAP software on Linux: General information 1567511 Oracle Linux 5.x SAP Installation and Upgrade 1672954 Oracle 11g: Usage of hugepages on Linux 1310037 SUSE LINUX Enterprise Server 11: Installation notes