New Patches Speed-Up Linux's Accounted Kernel Memory Allocations By ~30%

Written by Michael Larabel in Linux Kernel on 5 October 2023 at 06:44 AM EDT. 3 Comments
LINUX KERNEL
A set of patches posted last week can improve the Linux kernel's performance of accounted kernel memory allocations by around 30%.

Developer Roman Gushchin posted the set of five patches that can greatly enhance the performance of accounted kernel memory allocations by 30~34% based on a micro-benchmark, but still a ways behind the speed of having kernel memory accounting disabled entirely: the kernel patches remove "the majority of the overhead" for the root memory cgroup while for a user cgroup it's halved.

A nice speed-up


Gushchin explained of his work:
"The main idea is to get rid of unnecessary memcg to objcg conversions and switch to a scope-based protection of objcgs, which eliminates extra operations with objcg reference counters under a rcu read lock."

See this patch series if interested in the effort to speed-up kernel memory accounting.
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