Glibc 2.35 Bringing Improved Huge Pages Handling, New Tunable

Written by Michael Larabel in GNU on 15 December 2021 at 07:33 PM EST. Add A Comment
GNU
Glibc 2.35 is introducing the new tunable glibc.malloc.hugetlb that can help with improving system performance for some workloads making use of this tunable, depending upon your kernel's hugepages configuration.

The GNU C Library has landed huge pages support on Linux for mmap and arenas code that can be enabled with a new glibc tunable. That same tunable also allows enabling madvise support for transparent huge pages (THP).

The code merged this afternoon to Glibc Git across multiple commits explains:
On Linux, a new tunable, glibc.malloc.hugetlb, can be used to either make malloc issue madvise plus MADV_HUGEPAGE on mmap and sbrk or to use huge pages directly with mmap calls with the MAP_HUGETLB flags). The former can improve performance when Transparent Huge Pages is set to 'madvise' mode while the latter uses the system reserved huge pages.

This madvise/THP work for Glibc was written by Linaro's Adhemerval Zanella. More details for those interested in these latest commits.


This better handling of Linux THP will be found in Glibc 2.35 due out in February along with plenty of other improvements to this common Linux C library implementation.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week