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

GRUB_CMDLINE_LINUX_DEFAULT=”transparent_hugepage=never”

Save and then on the terminal run “sudo update-grub”

Reboot the server.

Disabling Transparent HugePages in Ubuntu 14.04 Server LTS

2 thoughts on “Disabling Transparent HugePages in Ubuntu 14.04 Server LTS

  • March 15, 2017 at 11:02 am
    Permalink

    This method doesn’t work. Like at all. (Ubuntu 16)

    Reply
  • May 26, 2018 at 1:16 am
    Permalink

    Like actually it does on Ubuntu 16.04, and it survives after a reboot too.

    Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.