Setting Transparent HugePages to madvise
Transparent HugePages memory is enabled by default with Oracle Linux. However, for optimal performance, Oracle recommends that you set Transparent HugePages to madvise on all Oracle AI Database servers UEK7 and later kernels and not disable Transparent HugePages as was recommended in prior releases.
If you install Oracle AI Database Preinstallation RPM, then it sets Transparent HugePages to madvise on all Oracle AI Database servers UEK7 and later kernels.
To set madvise on Transparent HugePages:
For Oracle Linux and Red Hat Enterprise Linux, add or modify the
transparent_hugepage=madviseparameter in the/etc/default/grubfile:GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet transparent_hugepage=madvise" GRUB_DISABLE_RECOVERY="true"Note:
The file name may vary depending on your operating system and hardware. For example, on Oracle Cloud Infrastructure (OCI) the
grub.cfgfile is located at/boot/efi/EFI/redhat/. Check your operating system documentation for the exact file name.Run the
grub2-mkconfigcommand to regenerate thegrub.cfgfile.On Oracle Linux 8
# grub2-mkconfig -o /boot/grub2/grub.cfgOn Oracle Linux 9 and later
grub2-mkconfig -o /boot/grub2/grub.cfg --update-bls-cmdlineRestart the system to make the changes permanent. If you do not want to restart your system, then enter the following command:
# echo madvise > /sys/kernel/mm/transparent_hugepage/enabledTo check if Transparent HugePages is enabled and configured with
madvise, run one of the following commands as therootuser:Oracle Linux kernels:
# cat /sys/kernel/mm/transparent_hugepage/enabledRed Hat Enterprise Linux kernels:
# cat /sys/kernel/mm/redhat_transparent_hugepage/enabledThe following is a sample output that shows Transparent HugePages is being used and set to
madvise.always [madvise] never