By default in Linux operating systems especially (red hat, oracle linux) Transparent Huge Pages are enabled by default.
Per Oracle recommendation Transparent HugePages are known to cause unexpected node reboots and performance problems. So, its strongly recommended to disable Transparent HugePages on all Database servers running Oracle.
*** UPDATE AUGUST 2025: Oracle strategy has changed and now they are recommending to set Transparent HugePages to madvise
To check your current operating system configuration:
[root@localhost ~]# cat /sys/kernel/mm/transparent_hugepage/enabled
always [madvise] never
// the above indicates THP is enabled
To disable it there are multiple ways….in the following method i am going to use Linux systemd service file:
// create a service file
touch /etc/systemd/system/disable-thp.service
//edit the service file and add the following entry for example using “vi” editor:
[Unit]
Description=Disable Transparent Huge Pages (THP)
[Service]
Type=simple
ExecStart=/bin/sh -c “echo ‘never’ >/sys/kernel/mm/transparent_hugepage/enabled && echo ‘never’ >/sys/kernel/mm/transparent_hugepage/defrag”
[Install]
WantedBy=multi-user.target
// then reoload and enable the new service file
systemctl daemon-reload
systemctl start disable-thp
systemctl enable disable-thp
systemctl status disable-thp
// verify that THP is disabled now:
[root@localhost ~]# cat /sys/kernel/mm/transparent_hugepage/enabled
always madvise [never]
Now, THP is disabled after verifying this by running the above cat command and your database environment will be running in the best and recommended performance setup.