Amazon Working On New Proactive Memory Reclamation For The Linux Kernel

Written by Michael Larabel in Linux Kernel on 10 June 2021 at 07:00 AM EDT. 9 Comments
LINUX KERNEL
For over a year Amazon engineers have been working on DAMON as a new means of monitoring data accesses under Linux. That patch series has yet to be mainlined but continues being worked on with the intention of getting it upstreamed when ready. More recently the engineers involved have been working on a DAMON-based page reclamation implementation for the Linux kernel in dealing proactively dealing with systems having high memory load.

This week Amazon sent out their second "request for comments" patch series implementing DAMON-based proactive reclamation of memory pages. This kernel module would provide page reclamation with using DAMON to monitor data accesses in figuring out the cold pages. The patch series explains, "It finds memory regions that didn't accessed for specific time duration and page out. To avoid it consuming too much CPU for the paging out operations, the speed limit can be configured. Under the speed limit, it pages out memory regions that didn't accessed longer first. Also, to remove the monitoring overhead under peaceful situation, and to fall back to the LRU-list based page granularity reclamation when it doesn't make progress, the three watermarks based activation mechanism is used, with the free memory ratio as the watermark metric. For convenient configuration, it utilizes module parameters. Using these, sysadmins can enable/disable it and tune the coldness identification time threshold, the speed limit, and the three watermarks."


The performance of this DAMON-based page reclamation for Linux is sounding good, "DAMON_RECLAIM on v5.12 Linux kernel with ZRAM swap device and 10GB/s speed limit achieves 32% memory saving with only 1.91% runtime overhead. For this, DAMON_RECLAIM consumes only 5.72% of single CPU time. Among the CPU consumption, only about 1.448% of single CPU time is expected to be used for the access pattern monitoring."

Those wanting to find out more about this Amazon Linux kernel initiative can see this patch series and more information via this kernel mailing list thread.
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