News: 0001604371

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Transparent Hugepage Performance On Linux 6.18 LTS: Madvise vs. Always

([Memory] 77 Minutes Ago 4 Comments)


With some Linux distributions like Fedora Workstation and Ubuntu defaulting to "madvise" [1]Transparent Hugepages (THP) while others like CachyOS and openSUSE defaulting to "always", you may be curious about the madvise vs. always THP difference in modern Linux environments. If so this round of benchmarking is for you in looking at the performance impact of madvise vs. always THP.

A [2]Phoronix Premium supporter recently asked about seeing some modern benchmark results of the same software/hardware in the "always" transparent hugepages mode versus the "madvise" mode used by default on some Linux distributions. This basically is around the default transparent hugepages behavior by default for assigning huge pages and whether applications/processes need to opt-in or opt-out depending upon the workload.

[3]

Changing the default transparent hugepages configuration can be done via writing "always" or "madvise" to the "/sys/kernel/mm/transparent_hugepage/enabled" sysfs file or alternatively at boot-time with e.g. transparent_hugepages=always.

So to satisfy [4]a Phoronix Premium reader's benchmark request , here are some fresh benchmarks of madvise and always THP modes from an Ubuntu Linux server. This server was running an Ubuntu 26.04 development snapshot with the Linux 6.18 LTS kernel on an AMD EPYC 9655P single socket Supermicro server.

Mo changes were made to the system hardware/software besides rebooting in the alternative transparent hugepages configuration for testing. Quite straight-forward so let's get to this fresh reference data for those weighing the default THP option on modern Linux servers across a variety of workloads.



[1] https://www.phoronix.com/search/Transparent+Hugepage

[2] https://www.phoronix.com/phoronix-premium

[3] https://www.phoronix.com/image-viewer.php?id=thp-madvise-always&image=epyc_thp_lrg

[4] https://www.phoronix.com/forums/forum/phoronix/phoronix-premium/1601021-hugepages-always-vs-madvise



October.

This is one of the peculiarly dangerous months to speculate in stocks in.

The others are July, January, September, April, November, May, March, June,
December, August, and February.

-- Mark Twain, "Pudd'nhead Wilson's Calendar"