I and my team recently noticed that starting Redis on our VMs gives the following warning: "WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis.".
I investigated the topic a little bit just to find out that most DB vendors suggest (if not require) you to disable THP. Just a few examples:
I also noticed that many distros come with this feature enabled by default:
- Red Hat
- CentOS
- Ubuntu
- CoreOS
So the questions are:
- why is it enabled by default?
- what could be the downsides/risks of disabling THP on our cluster VMs (a Kubernetes cluster based on CoreOS where we run a lot of different Docker containers)?
Best Answer
The THP is a linux feature , it is enabled by default on some linux distro to increase the application performance. but it is not recommended by some os database vendors because it decrease the performance of theirs products .
From the Red-HAT docs (Why the THP is enabled):
From: Oracle Docs (Why you should disable the THP ?)
what could be the downsides/risks of disabling THP on our cluster VMs?
Keeping THP enabled is a security feature to prevent the
mmap
flood attack.