Docker Community Forums

Share and learn in the Docker community.

Disable Transparent Huge Pages (THP)

(Yavor Yanev) #1


I’m trying to install and run VoltDB Enterprise but I got a response that THP has to be disabled.
I tried to run the following commands:
echo never >/sys/kernel/mm/transparent_hugepage/enabled
echo never >/sys/kernel/mm/transparent_hugepage/defrag
but files are read-only.

Anyone can help?

(slamp) #2

From inside a container you can not modified the THP. 2 solutions:

  • Do it on the host before starting the container
  • Start the container in privileged mode and then you should be able to modify it

If you want to keep it after a reboot you need to modify /etc/sysctl.conf

(Yavor Yanev) #3

Thanks for the info.
Can you please explain any of the approaches in more details? I use Docker for Windows(Hyper-V) and I’m not sure how to change it on host level neither how to start it in privileged mode.

(slamp) #4

(Yavor Yanev) #5

You made my day, thanks a lot. :slight_smile: