Diasabling Transparent Huge Pages inside a container

Fathi

Renowned Member
May 13, 2016
133
4
83
52
Tunis, Tunisia
Hello,
I have the following error inside one of my containers, which prevents some software to work correctly:

# WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.

Then, when trying to disable it, I have the following error message:

[root@sso1 httpd]# echo never > /sys/kernel/mm/transparent_hugepage/enabled
-bash: /sys/kernel/mm/transparent_hugepage/enabled: Permission denied

Could someone help me to resolve this issue ?

TIA.
 
You have to follow the instructions on the host system.

As the container shares it's kernel with the host, it also shares THP and other memory related settings.
 
That depends on your setup. It will disable THP for all containers, VMs will most likely not see any difference.

If you're not using THP anywhere, it doesn't matter.
 
Personally, I left it to madvis, only those applications that request THP will have it done.

Cheers.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!