Showing posts with label How to disable Transparent HugePages. Show all posts
Showing posts with label How to disable Transparent HugePages. Show all posts

Tuesday, 13 October 2020

How to disable Transparent HugePages


Disabling Transparent HugePages. 


1. check the status

In RHEL

cat /sys/kernel/mm/redhat_transparent_hugepage/enabled

in other OS

cat /sys/kernel/mm/transparent_hugepage/enabled

Output:

[always] madvise never

Its highlighted for always, so Transparent HugePages are enabled.

2. disable the transparent_hugepage.

To disable this modify/add line transparent_hugepage=never

as below:

#cat /etc/default/grub

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="console=tty1 console=ttyS0 earlyprintk=ttyS0 rootdelay=300 transparent_hugepage=never"

GRUB_DISABLE_RECOVERY="true"

3. Run below command to make recreate file grub

 #grub2-mkconfig -o /boot/grub2/grub.cfg

4. Restart the server.


5. verification after restart the server.

After modification output will be as below, never  is highlighted, so its disabled.

#cat /sys/kernel/mm/transparent_hugepage/enabled

always madvise [never]