Disable transparent hugepage

I am trying to disable transparent hugepage on the server.

in the following command output it says to add transparent_hugepage=never".

When I ran this command, the UUID part did not come as follows. So I did some research and found that it belongs to the swap directory so I added it (I think I made a mistake)


[root@dataserver~]# 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="resume=UUID=94279fa2-b457-46c9-b782-6a60a76416e2 rhgb quiet transparent_hugepage=never"
GRUB_CMDLINE_LINUX="rhgb quiet"
GRUB_DISABLE_RECOVERY="true"

cat /sys/kernel/mm/transparent_hugepage/enabled

when I run this command I get the following output.

[always] madvise never

In order for the setting to be made correctly, it should come as follows.

always madvise [never]

Where do I need to delete or add parameters in the output below?
[root@dataserver~]# 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="resume=UUID=94279fa2-b457-46c9-b782-6a60a76416e2 rhgb quiet transparent_hugepage=never"
GRUB_CMDLINE_LINUX="rhgb quiet"
GRUB_DISABLE_RECOVERY="true"

Is having multiple GRUB_CMDLINE_LINUX= lines correct, my understanding is only the last line would be taken.(ditto for all directives).

2 Likes

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="rhgb quiet transparent_hugepage=never"
GRUB_DISABLE_RECOVERY="true"

cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never

See also:

https://www.kernel.org/doc/html/latest/admin-guide/mm/transhuge.html#admin-guide-transhuge

1 Like

After changing
/etc/default/grub
did you run
update-grub
followed by a
reboot
?

1 Like

yes, i do these steps

@soolan, so, did removing duplicate entries ultimately solve the issue ?

Unfortunately it's still the same

Why not try reading the documentation I posted above and following the method the docs use?

What is specified in the referenced docs is different than what you have posted, @soolan .

2 Likes

I read the page you provided but I don't understand. I don't understand how to disable Transparent HugePage at which stage

Check if something in /boot/grub/grub.cfg overrides the default cmd args.

I made a simple mistake.

My system is running EFI system.

I had to run this command grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg.

grub2-mkconfig -o /boot/grub2/grub.cfg this is the wrong one on EFI system

1 Like