How to disable THP on Centos 7 for mongodb How to disable THP on Centos 7 for mongodb mongodb mongodb

How to disable THP on Centos 7 for mongodb


I had the same issue, and solved it by writing this in /etc/rc.local:

echo never > /sys/kernel/mm/transparent_hugepage/enabled;echo never > /sys/kernel/mm/transparent_hugepage/defrag;

I also gave execution permissions to /etc/rc.d/rc.local

Now thb are disabled every time I boot.