Latest Slab Cgroup Memory Controller Patches Saving ~1GB RAM Per Host On Facebook Servers

Written by Michael Larabel in Linux Kernel on 19 June 2020 at 03:34 AM EDT. 30 Comments
The past number of months Facebook engineering has been working on a new slab memory controller for Linux that can offer less memory fragmentation and lower memory use and slab utilization. The sixth version of these patches were published earlier this month.

Facebook's Roman Gushchin who has been spearheading the new cgroup slab memory controller posted the new patches earlier this month. These patches are based against the latest Linux memory management code as their primary change along with other code improvements.

Roman did reiterate with the latest patches, "This leads to a significant win in the slab utilization (up to 45%) and the corresponding drop in the total kernel memory footprint. The reduced number of unmovable slab pages should also have a positive effect on the memory fragmentation...The more precise accounting does require more CPU, however in practice the difference seems to be negligible. We've been using the new slab controller in Facebook production for several months with different workloads and haven't seen any noticeable regressions. What we've seen were memory savings in order of 1 GB per host (it varied heavily depending on the actual workload, size of RAM, number of CPUs, memory pressure, etc)."

Assuming these big improvements continue panning out after further testing, let's hope these patches make it into Linux 5.9 or so. Especially with already being in use on production Facebook servers is a good proving ground.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of 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 automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week