Linux 7.3 MGLRU Change Helps Executable Code Stays In Memory, Improving Performance

Linux 7.3 MGLRU Change Helps Executable Code Stays In Memory, Improving Performance

Following last week's main set of memory management "MM" related updates for Linux 7.3, another batch of MM code updates were submitted and merged today as we prepare to close out the Linux 7.3 merge window. There are a few optimization patches that stand out along with other mostly small fixes/changes. Catching my eye with today's MM merge was the patch series from Baolin Wang to promote mapped executable folios after first usage for MGLRU. The Alibaba engineer noted that classical Least Recently Used (LRU) protects mapped executable file folios for better chances of staying in system memory to avoid I/O thrashing and helping with workload performance. But MGLRU to now hasn't behaved quite as well in this regard. MGLRU has been "less reliable" in protecting of mapped executable file folios and in turn them being reclaimed more easily than classical LRU behavior. Baolin Wang quantified this issue on a 32-core Arm server with the memory accounting limit set to 2G so being very memory bound while running a 32 job Linux kernel build for lots of memory contention. In his patch message he noted system time was at 9248 seconds by default but dropped all the way down to 7861 seconds with these patches for better promoting the mapped executable folios. Typically in the real world you'll not be running 32 cores fighting over 2GB of RAM, but with today's RAM constrained marketplace and in other scenarios over over-subscribed setups, this change should ultimately be helpful. These patches to help keep executable folios in memory were merged today via this merge alongside many other small MM optimization patches.

Original Source

Read the full article at Phoronix →

KhanList aggregates and links to publicly available news content. We do not host full articles from third-party sources. Always verify important information with original sources.