skip to Main Content

In earlier systems (CentOS 8) I was able to make an application run using huge pages for memory allocations by setting LD_LIBRARY_PATH=<path to libhugetlbfs.so.
I tried the same approach in Rocky Linux 9. However there is no libhugetlbfs package for el9. Instead I installed successfully an rpm I had for el8 (libhugetlbfs-2.21-17.el8.x86_64.rpm).

I tried running the binary as before:

LD_PRELOAD=/usr/lib64/libhugetlbfs.so ./brhclus <args>

However looking in /proc/meminfo as the program runs, I see no reserved huge pages

AnonPages:      52018332 kB
AnonHugePages:         0 kB
HugePages_Total:   614400
HugePages_Free:    614400
HugePages_Rsvd:        0
HugePages_Surp:        0
Hugepagesize:       2048 kB
Hugetlb:        1258291200 kB

System

OS: Rocky Linux 9.2
Kernel: 5.14.0-284.18.1.el9_2.x86_64
Memory 1.5T

I may be missing something obvious – any ideas?

2

Answers


  1. Chosen as BEST ANSWER

    I found why this doesn't work. libhugetlbfs uses __morecore function in glibc which has been removed (?) or at least deprecated. As a solution I use transparent huge pages systemwide enabled using

    echo always > /sys/kernel/mm/transparent_hugepage/enabled
    

    I consider my question answered.


Please signup or login to give your own answer.
Back To Top
Search