Labels

hpunix (63) marathi kavita (52) linux (21) solaris11 (11) AWS (5) numerology (5)

Monday, May 16, 2022

How to disable transparent_hugepage in linux

 How to disable transparent_hugepage


Here it shows that the transparent_hugepage value is enabled.

[root@testsrv~]# cat /sys/kernel/mm/transparent_hugepage/enabled

[always] madvise never


Steps:

1. Take backup of /etc/default/grub

#cp -rp /etc/default/grub /etc/default/grub_16May2022 


2. Edit the file /etc/default/grub by adding transparent_hugepage=never to the line 

GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=vg_os/lv_root rd.lvm.lv=vg_os/lv_swap rhgb quiet"

so the entry will be like 

GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=vg_os/lv_root rd.lvm.lv=vg_os/lv_swap rhgb quiet transparent_hugepage=never"


3. Take backup of file grub.cfg

#cp -pv   /boot/efi/EFI/redhat/grub.cfg  /boot/efi/EFI/redhat/grub.cfg-bkp

4. Create new grub configuration file

#grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg 

5. Reboot the server

#reboot

6. Verify whether the value is changed or not

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

[root@testsrv~]# cat /sys/kernel/mm/transparent_hugepage/enabled

always madvise [never]


Regards,

Kiran B Jaadhav

No comments:

Post a Comment