Turning off transparent hugepages

Hello,

The newest version of cryosparc is throwing an error saying “Transparent hugepages are enabled. You may encounter stalls or performance problems with CryoSPARC jobs.”

However, it does not affect my jobs (no stalls) but I am wondering if turning it off will speed up my jobs or in any way enhance performance. I would like to test that but would appreciate some guidance about the process.

This is what I did but it did not help:

  • Edit grub configuration:
    Open the /etc/default/grub file.
    Add transparent_hugepage=never to the GRUB_CMDLINE_LINUX line.
  • Update grub:
    Run sudo grub2-mkconfig -o /boot/grub2/grub.cfg to regenerate the grub configuration file.
  • Reboot

Can somebody help me with this? Thank you!

Best,
Suparno.

Welcome to the forum @snandi .
Please can you clarify what you meant with

Did the commands disable transparent hugepages?

cat /proc/cmdline
cat /sys/kernel/mm/transparent_hugepage/enabled

I had the same issue on Centos with cryosparc beyond 4.6.0 which was explained in the update page. I moved couple of our systems to Rocky linux and i do not get that error. But even with the error, the program run just fine. Do not know if that helps. What system are you running?

I’m managing this system that Suparno is using – he’s more the end user of CryoSPARC.
To answer your questions about the output of those two commands:

(base) [username@hostname ~]$ cat /proc/cmdline
BOOT_IMAGE=(hd10,gpt2)/vmlinuz-5.14.0-427.28.1.el9_4.x86_64 root=UUID=7ee4c896-9f74-4897-95be-16041b57e087 ro crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M resume=UUID=1d0f8d1b-146b-4654-8e51-ba090d768187 nomodeset rhgb quiet

And

(base) [username@hostname ~]$ cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never

I have confirmed that “transparent_hugepage=never” is in /etc/default/grub as well as /boot/grub2/grub.cfg.

We are using Rocky Linux 9. If this page can be believed – “Solved: Can’t disable transparent hugepages in RHEL9”, it would seem that the “old” ways of disabling it do not work for (Redhat/Rocky 9). I have also seen mention of it not working on a few other pages. Unfortunately, I haven’t come across a good solution yet.

In talking with Suparno, it was my understanding that he was not really having an issue with stalls/performance, he just saw that warning message and was trying to make it go away/possibly increase performance.

I DID have him try this:

------------------8<---Begin-Cut-Here---8<------------------
$ sudo /bin/bash
# echo never > /sys/kernel/mm/transparent_hugepage/enabled
# echo never > /sys/kernel/mm/transparent_hugepage/defrag
# exit
-------------------8<---End-Cut-Here---8<-------------------

To which, he confirmed the warning did go away, but of course a permanent boot-time solution would be much preferred to having to do this manually. That page I linked above, mentioned something about “TuneD” being the solution, but I haven’t had a chance to look into that.

In our case, this whole thing might not even really be an issue though since we may not really be having stall/performance issues. In his original inquiry, Suparno said he was just wondering if this would “increase performance” (because the warning says performance “may” have been decreased by having hugepages enabled…).

… Billy …

1 Like