DAMON-Based Memory Reclamation Merged For Linux 5.16

Written by Michael Larabel in Linux Kernel on 11 November 2021 at 06:36 PM EST. 5 Comments
LINUX KERNEL
Following Amazon's DAMON being merged in Linux 5.15 as a data monitoring access framework, being merged for Linux 5.16 is an addition building on top of that for memory reclamation when experiencing system RAM pressure.

Merged as part of Andrew Morton's patch series for Linux 5.16 is DAMON-based memory reclamation that has been under review on the kernel mailing list the past few months.

This proactive reclamation of memory pages can help under light memory pressure and makes use of Amazon's DAMON framework for determining the cold pages on the system to reclaim.


The developers previously working on the patches summed up the benefits as, "DAMON_RECLAIM on v5.13 Linux kernel with ZRAM swap device and 50ms/s time quota achieves 40.34% memory saving with only 3.38% runtime overhead. For this, DAMON_RECLAIM consumes only 5.16% of single CPU time. Among the CPU consumption, only up to about 1.448% of single CPU time is expected to be used for the access pattern monitoring."

This DAMON-based reclamation supports a configurable "speed limit" to configure how many resources to spend determining what pages can be paged out. Enabling this feature needs the new CONFIG_DAMON_RECLAIM build option enabled. Kernel parameters can be passed to damon_reclaim or there is also /sys/modules/damin_reclaim as a sysfs interface. Among the options are adjusting the minimum age as a time threshold for identifying cold memory regions, limiting the time of reclamation, the size of the memory for the reclamation, the minimum and maximum time before checking watermarks, the sampling interval, and more.

See the new documentation for learning more about this DAMON reclamation support now found in the Linux 5.16 kernel.
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