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.  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

SHMEM-THP is only available on Linux kernel >= 4.14 (CentOS 8.0+).

Prime requires SHMEM-THP because the C4 implementation relies heavily on efficient memory remapping.  This is because the C4 algorithm uses Loaded Value Barriers (LVB) to be 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 (set to "advise"), it will use it to implement multi-mapping to improve performance.

Therefore, 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