With some Linux distributions like Fedora Workstation and Ubuntu defaulting to "madvise" 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 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…
With some Linux distributions like Fedora Workstation and Ubuntu defaulting to "madvise" 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 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.
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 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.