Disabling Transparent Huge Pages
Purpose
Disable transparent huge pages to avoid memory allocation delay.
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"
- Press Esc, type :wq!, and press Enter to save the file and exit.
- 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.
1 | echo never > /sys/kernel/mm/transparent_hugepage/enabled |
Parent topic: OS Tuning