Multigen LRU Patches Updated For Addressing Linux's Expensive Page Reclaimation

Written by Michael Larabel in Linux Kernel on 20 May 2021 at 06:03 AM EDT. 14 Comments
LINUX KERNEL
One of the interesting performance-related kernel patch series to come about so far this year has been Google's multi-generational LRU framework that is promising to offer much better performance in addressing the kernel's expensive page reclaimation handling.

The Multigen LRU framework addresses issues with the current kernel design, "the current page reclaim is too expensive in terms of CPU usage and often making poor choices about what to evict. We would like to offer an alternative framework that is performant, versatile and straightforward." This patch series has been touted as leading to ~18% less low-memory kills on Android, code starts reduced by 16%, and Google's testing on Chrome OS led to ~96% fewer low-memory tab discards and 59% less out-of-memory kills thanks to this improved least recently used framework.

Sent out today were the v3 patches that re-base this multigenerational LRU framework against the latest Linux 5.13 Git code while also incorporating a bug fix. An additional testimonial was also included as part of the patch series:
My success story: I have Archlinux with 8G RAM + zswap + swap. While developing, I have lots of apps opened such as multiple LSP-servers for different langs, chats, two browsers, etc. Usually, my system gets quickly to a point of SWAP-storms, where I have to kill LSP-servers, restart browsers to free memory, etc, otherwise the system lags heavily and is barely usable.

1.5 day ago I migrated from 5.11.15 kernel to 5.12 + the LRU patchset, and I started up by opening lots of apps to create memory pressure, and worked for a day like this. Till now I had *not a single SWAP-storm*, and mind you I got 3.4G in SWAP. I was never getting to the point of 3G in SWAP before without a single SWAP-storm.

With the v3 changes light, we'll see how these v3 patches are received and if this multigenerational LRU framework could potentially be ready for mainlining this summer in 5.14 or if any new objections are raised. In any event this appears to be quite another promising kernel contribution from Google.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week