Question:
What is THP and can I use it in my Linux Distribution?
Answer:
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 Load 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 (RHEL 8 or later, CentOS 8.0+, Ubuntu 20.04 LTS and newer, Amazon Linux, Debian 10+, SLES 12 SP4 and later, Oracle Linux 7.9 UEK and later.
For THP configuration for Zing with and without ZST please refer to: https://docs.azul.com/prime/Enable-Huge-Pages
For further details about THP: Details about Transparent Huge Pages, THP, Static Huge Pages, Larges Pages, Shared Memory Huge Pages
Add Comment
Comments
Please sign in to leave a comment.