SAP HANA – alert: Transparent Huge Pages (THP) are activated or not readable
With SLES 15, the usage of transparent hugepages (THP) is generally activated for the Linux kernel. The use of transparent huge pages on Linux can cause the SAP HANA database to appear to hang and they should be disabled. Last time I observed in my HANA database alert from this area. Read more about how to check and disable THP in the system…
To check the current configuration run the following command:
# cat /sys/kernel/mm/transparent_hugepage/enabled
Its output should read:
always madvise [never]
In my Linux the command output indicated on [always] therefore I had to disable THP.
We can disable transparent huge pages in two ways. First, by issuing the following:
# echo never > /sys/kernel/mm/transparent_hugepage/enabled
This setting is then valid until the next system start. Please note that You don’t have to shutdown the database to apply this configuration.
The second possibility is to disable THP permanently by editing /etc/default/grub configuration or using yast bootloader command.
Edit /etc/default/grub
search for the line starting with "GRUB_CMDLINE_LINUX_DEFAULT" and append to this line: transparent_hugepage=never
Save your changes and run
# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found theme: /boot/grub2/themes/SLE/theme.txt
Found linux image: /boot/vmlinuz-5.14.21-150400.24.66-default
Found initrd image: /boot/initrd-5.14.21-150400.24.66-default
Found linux image: /boot/vmlinuz-5.14.21-150400.24.46-default
Found initrd image: /boot/initrd-5.14.21-150400.24.46-default
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done
Use YaST2 bootloader, execute
# yast bootloader
choose "Kernel Parameters" tab (ALT-k) and edit the "Optional Commandline Parameters" section by appending: transparent_hugepage=never
To enable this change, a system reboot is required.