News: 0001620531

  ARM Give a man a fire and he's warm for a day, but set fire to him and he's warm for the rest of his life (Terry Pratchett, Jingo)

Linux MGLRU Improvements Net A 30% Increase For MongoDB, More Than 100% On HDDs

([Linux Kernel] 4 Hours Ago Multi-Gen LRU)


It's been a while since having any improvements to talk about for the [1]MGLRU multi-gen LRU functionality for the Linux kernel to optimize page reclamation and help with system performance especially when enduring memory pressure. But this week a Tencent engineer posted some very promising patches for further enhancing this kernel feature.

Kairui Song of Tencent posted a set of eight patches for improving the reclaim loop and dirty folio handling within MGLRU. Here's the exciting part:

"This series cleans up and slightly improves MGLRU's reclaim loop and dirty flush logic. As a result, we can see an up to ~50% reduce of file faults and 30% increase in MongoDB throughput with YCSB and no swap involved, other common benchmarks have no regression, and LOC is reduced, with less unexpected OOM in our production environment.

Some of the problems were found in our production environment, and others are mostly exposed while stress testing the LFU-like design as proposed in the LSM/MM/BPF topic this year."

A 30% improvement to MongoDB throughput is exciting along with reduced code complexity of MGLRU in the end. Those tests were done on NVMe storage and the patch cover letter went on to add when using slower devices like HDDs, they observed a greater than 100% gain for some workloads.

Quite nice work. Those interested in these patches can find them out for review on the [2]Linux kernel mailing list .



[1] https://www.phoronix.com/search/MGLRU

[2] https://lore.kernel.org/lkml/20260318-mglru-reclaim-v1-0-2c46f9eb0508@tencent.com/



Q: How can I choose what groups to post in? ...
Q: How about an example?

A: Ok. Let's say you want to report that Gretzky has been traded from the
Oilers to the Kings. Now right away you might think rec.sport.hockey
would be enough. WRONG. Many more people might be interested. This is a
big trade! Since it's a NEWS article, it belongs in the news.* hierarchy
as well. If you are a news admin, or there is one on your machine, try
news.admin. If not, use news.misc.

The Oilers are probably interested in geology, so try sci.physics. He is
a big star, so post to sci.astro, and sci.space because they are also
interested in stars. Next, his name is Polish sounding. So post to
soc.culture.polish. But that group doesn't exist, so cross-post to
news.groups suggesting it should be created. With this many groups of
interest, your article will be quite bizarre, so post to talk.bizarre as
well. (And post to comp.std.mumps, since they hardly get any articles
there, and a "comp" group will propagate your article further.)

You may also find it is more fun to post the article once in each group.
If you list all the newsgroups in the same article, some newsreaders will
only show the article to the reader once! Don't tolerate this.
-- Brad Templeton, _Emily Postnews Answers Your Questions on Netiquette_