What is THP and can I use it in CentOS?


What is THP and can I use it in CentOS?



THP or Transparent Huge Pages is a feature of the Linux kernel since 4.14.  It comes in 2 flavors:

  • Anonymous (ANON-THP): /sys/kernel/mm/transparent_hugepage/enabled
  • Shared Memory (SHMEM-THP): /sys/kernel/mm/transparent_hugepage/shmem_enabled

Azul Prime's C4 garbage collector relies heavily on efficient memory remapping.  This is because the C4 algorithm uses Loaded Value Barriers (LVB) inserted into the Java code (both compiled and interpreted). 

When ZST (Zing System Tools) is not available, there is no way to do large remap batches without incurring a lot of TLB (Translation Lookaside Buffer) flushes.  To compensate, if SHMEM-THP is available, Prime will use it to implement multi-mapping to improve performance.

SHMEM-THP is only available on Linux kernel >= 4.14 (CentOS 8.0+, Ubuntu 18+, Amazon Linux since 2018, Debian 10+, SLES 12 SP4 and later). Therefore, with CentOS, SHMEM-THP can only be used on CentOS 8.0 and later.

For more information, please refer to our THP Documentation Page.

Add Comment



Please sign in to leave a comment.

Was this article helpful?
0 out of 0 found this helpful