VOOZH about

URL: https://www.phoronix.com/news/Linux-Better-Swap-Tencent

⇱ New Patches Aim To Lower Linux Memory Use For Swap, Slightly Improve Performance - Phoronix


👁 Phoronix

New Patches Aim To Lower Linux Memory Use For Swap, Slightly Improve Performance

Written by Michael Larabel in Linux Kernel on 26 January 2026 at 05:27 AM EST. 26 Comments
Kairui Song of Tencent sent out a new patch series overnight working on enhancing the Linux kernel's swap code. With the patches there are some memory savings -- and more on the way -- while also providing for slightly faster performance.

The patch series removes the static "swap_map" and uses the swap table for the swap count directly. This conserves around 30% memory use for the static swap metadata, which amounts to 256MB of memory when mounting a 1TB swap device... Granted, using a 1TB swap device isn't too common outside of perhaps some very large server setups.

Another 512MB or so of memory savings is expected from some ongoing work for another round of swap / memory management patches.

👁 Memory modules


Besides those swap metadata memory savings, the performance is found to be slightly faster when under global memory pressure. Kernel builds under memory pressure on some smaller x86_64 and ARM64 VMs with limited RAM were found to be 1.6% to 2.4% faster. Redis/Valkey was also around 1.5% faster with this patch series.

Those interested in this work can find these latest swap/mm patches out for review on the Linux kernel mailing list.

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.