Disabling Transparent Hugepages (THP)
Most Linux platforms supported by Cloudera Runtime include a feature called transparent hugepages, which interacts poorly with Hadoop workloads and can seriously degrade performance.
- Symptom 1: High system CPU usage and performance degradation
-
System monitoring tools, such as
top, show a large percentage of CPU usage under "system CPU." If system CPU usage consumes 30% or more of the total CPU capacity, your system might be experiencing this issue.To check if the system enables transparent hugepages, run the following commands and verify the output:
$ cat defrag_file_pathname $ cat enabled_file_pathname-
[always] nevermeans that transparent hugepages is enabled. -
always [never]means that transparent hugepages is disabled.
-
- Symptom 2: Server native memory leak and 100% CPU spin (OPSAPS-77888)
-
When you enable Transparent Huge Pages (THP) and set them to
alwayson the cluster, a known issue with the Oracle Database driver (Oracle Instant Client) triggers severe memory instability by causing it to consume a large amount of memory.The
AnonHugePagesmemory allocation grows continuously, causing a server native memory leak. Consequently, the memory consumption of processes using this database driver, such as Cloudera Manager, keeps growing and escalates until it induces a 100% CPU spin, which eventually prevents all other system processes from functioning.
To disable Transparent Hugepages, perform the following steps on all cluster hosts:
