Disabling Transparent HugePages in Ubuntu 14.04 Server LTS

Need might arise to turn off transparent_hugepages which is by default ON in Ubuntu 14.04 LTS Server Version. This might apply to the other distro’s and also to other versions of Ubuntu.

Checking transparent_hugepages

To check if transparent_hugepages is on or off you can execute the following command:

cat /sys/kernel/mm/transparent_hugepage/enabled

always madvise [never]

[never] means that transparent_hugepages is turned off

[always] means that transparent_hugepages is turned on

Turning Off using Grub

Edit the grub configuration file present in /etc/default/grub and add transparent_hugepage=never to the GRUB_CMDLINE_LINUX_DEFAULT if other options are already present in this line then simply put a space and transparent_hugepage=never