Monday, August 1, 2016

Huge Page Vs. Transparent Huge Page


Starting with RedHat6, RedHat7, OL6, OL7 SLES11 and UEK2 kernels, Transparent Huge Page are implemented and enabled (default) in an attempt to improve the memory management.  
Transparent Huge Page are similar to the Huge Page that have been available in previous Linux releases. The main difference is that the Transparent Huge Page are set up dynamically at run time by the khugepaged thread in kernel while the Huge Page(regular) had to be pre-allocated at the boot up time.

So once you setup Huge Page with Transparent for Oracle Database, it will downgrade the database performance suddenly,therefore we need disable the Transparent Huge Page, below is detail steps to disable Transparent Huge Page.

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

Notes:
most of guys disable the Transparent Huge Page, but reboot's server still lost setup.

Reference:
Oracle Doc 1557478.1

No comments:

Post a Comment