Disabling Transparent Huge Pages
Purpose
Disable transparent huge pages to avoid memory allocation delay.
Procedure
Method 1:
- Open the grub2-efi.cfg file.
1vim /etc/grub2-efi.cfg - Search for the vmlinuz-4.14.0-115.el7a.0.1.aarch64 field and add the following field to the end of the line. Separate the two fields with a space.
"transparent_hugepage=never"
- Save the configuration and exit. Then, restart the server.
- Check whether the configuration takes effect.
1cat /proc/cmdlineIf the command output contains the transparent_hugepage=never field, the transparent huge pages are successfully disabled.
Method 2:
- Enter the value of transparent_hugepage in the command line.
1echo never > /sys/kernel/mm/transparent_hugepage/enabled
Parent topic: OS Tuning