Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
You read that right; a single line of code from Intel has shown the Linux kernel could receive a performance jump of up to 4,000 percent by way of will-it-scale.per_process_ops.
A Intel kernel testing bot discovered this, and the change was added to commit efa7df3e3bb5 (“mm: align larger anonymous mappings on THP boundaries”). That commit was related to efficient memory management and mapping (mm and mmap) techniques that use Transparent Hugepages (THPs) and Page Middle Directory (PMD).
Before anyone gets too excited, the discovered performance increase was isolated to a synthetic test case, so real-world workloads will probably never see such incredible gains. However, it does make a solid case for how well Linux is capable of performing.
One issue with the change is that it was shown to significantly regress certain workloads by up to 600 percent (when using the cactusBSSN benchmark on certain platforms). Those regressions are related to the benchmark's access pattern that suffers from translation lookaside buffer (TLB) or cache aliasing from aligned boundaries of the individual areas.
According to author Vlastimil Babka from SUSE, “To fix the regression but still try to benefit from THP-friendly anonymous mapping alignment, add a condition that the size of the mapping must be a multiple of PMD size instead of at least PMD size. In case of many odd-sized mapping like the cactusBSSN creates, those will stop being aligned and with gaps between, and instead naturally merge again.”
You can read more about this discovery from this entry in the Kernel mailing list and this post from Vlastimil Babka.
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Support Our Work
Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.
News
-
Red Hat Enterprise Linux 9.5 Released
Notify your friends, loved ones, and colleagues that the latest version of RHEL is available with plenty of enhancements.
-
Linux Sees Massive Performance Increase from a Single Line of Code
With one line of code, Intel was able to increase the performance of the Linux kernel by 4,000 percent.
-
Fedora KDE Approved as an Official Spin
If you prefer the Plasma desktop environment and the Fedora distribution, you're in luck because there's now an official spin that is listed on the same level as the Fedora Workstation edition.
-
New Steam Client Ups the Ante for Linux
The latest release from Steam has some pretty cool tricks up its sleeve.
-
Gnome OS Transitioning Toward a General-Purpose Distro
If you're looking for the perfectly vanilla take on the Gnome desktop, Gnome OS might be for you.
-
Fedora 41 Released with New Features
If you're a Fedora fan or just looking for a Linux distribution to help you migrate from Windows, Fedora 41 might be just the ticket.
-
AlmaLinux OS Kitten 10 Gives Power Users a Sneak Preview
If you're looking to kick the tires of AlmaLinux's upstream version, the developers have a purrfect solution.
-
Gnome 47.1 Released with a Few Fixes
The latest release of the Gnome desktop is all about fixing a few nagging issues and not about bringing new features into the mix.
-
System76 Unveils an Ampere-Powered Thelio Desktop
If you're looking for a new desktop system for developing autonomous driving and software-defined vehicle solutions. System76 has you covered.
-
VirtualBox 7.1.4 Includes Initial Support for Linux kernel 6.12
The latest version of VirtualBox has arrived and it not only adds initial support for kernel 6.12 but another feature that will make using the virtual machine tool much easier.