Urgent.News

What's breaking now, across thousands of outlets.

Tech

MGLRU-FG Delivering Up To 10~40% Higher Performance For Linux In Some Tests

Linux's Multi-Gen LRU "MGLRU" has already achieved nice performance gains for Linux in recent years by optimizing page reclaims and improves performance under memory pressure. The new MGLRU-FG patches aim to take things further...

Memory Grouped Least Recently Used (MGLRU) is an eviction policy that has been enhanced to potentially deliver up to 10-40% higher performance for Linux in certain tests. The update introduces a tier-PID protection mechanism for eviction time, while also utilizing access-time frequency to promote pages.

A unified set of helpers, based on the referenced count of a folio, has been introduced. Each access increments the folio's referenced count, stored in folio flags. A logarithmic tier is used to map the reference count, with specific thresholds defined: LRU_REFS_REFERENCED (1), LRU_REFS_WORKINGSET (2), LRU_REFS_PROTECTED (3), and LRU_REFS_MAX (7).

When the referenced count reaches a certain threshold, the folio is promoted proactively, bypassing the need to wait for the PID controller. Additionally, the usage of PG_workingset and PG_referenced has been simplified, with these values now comprising the low two bits of the refs count. This change reduces the bit usage of MGLRU's refs count by one, and improves the accuracy of MGLRU's reference accounting.

The enhancements result in a 10% - 40% higher performance, or lower refault rates, in various tests. Certain workloads exhibit a significantly reduced runtime. The improvement is primarily due to MGLRU's increased ability to distinguish hotter working sets. Tests across multiple servers with different architectures, desktops, and Android have shown promising results.

Compared to the previous version (V2), V3 is more affected by anonymous over-reclaim, but overall, it provides better results. However, this problem should be addressed separately. Despite being a major change to LRU, including modifications to Active/Inactive reading, the new policy is already performing well and is considered usable.

Michael Larabel, the principal author of Phoronix.com, has authored over 20,000 articles about Linux hardware support, performance, graphics drivers, and other topics. He is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org.

Written by urgent.news from Phoronix's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at phoronix.com →

More in Tech

Flatpak from the CLI sucks

  • Flatpak simplifies Linux application distribution by bundling dependencies.
  • CLI usability for Flatpak is challenging due to long syntax and additional commands.
  • Windows Store and Desktop Bridge offer sandboxed distribution but add complexity.

My friend was lost in the internship hunt, so I built him Get A Job.

This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend What I Built I wanted to build something a friend could actually use beyond this weekend. My friend is a third-year Computer Science student looking for summer and software internships.

  • "Get A Job" simplifies internship search and applications
  • Open-source AI tool consolidates internship discovery and application process
  • Local AI processing ensures data privacy and flexibility

More from Sunday 4 October →