In case you don’t know Multi-Gen LRU is an alternative LRU implementation that optimizes page reclaim and improves performance under memory pressure. Page reclaim decides the kernel’s caching policy and ability to overcommit memory. It directly impacts the kswapd CPU usage and RAM efficiency.

Has anyone enabled this feature on their machines? Have you noticed any performance gains or memory management improvements? It’s developed by Google and is reportedly is being used in ChromeOS and Android.

You are viewing a single thread.
View all comments
12 points
*

I use this on all of my machines now, it does a much better job of preventing swap thrashing than the original LRU code. I’ve been running the MGLRU patch set for like two years (?) without any downside that I’ve been able to detect.

Edit: We switched to using the MGLRU patch set for all of our Arch kernel packages in the asus-linux community back when the patch set was in development, there have been zero problem reports over an installed base of at least a couple hundred people. As far as I can tell there really isn’t a downside to using it.

permalink
report
reply
2 points

How do I enable it? I’ve been having huge issues with reclaiming swap and memory usage in general. Do I have to compile the kernel myself and if I do, where is the option located?

permalink
report
parent
reply
2 points

Check your running kernel’s config at /proc/config (or config.gz) to see if it’s enabled.

https://docs.kernel.org/admin-guide/mm/multigen_lru.html has admin/usage details.

If your current kernel doesn’t build multi-gen LRU then you’ll need to build a kernel package that does, or switch to one that enables it.

permalink
report
parent
reply
1 point

Ah, then where in the menuconfig is this option located, if I need to build my own kernel…

permalink
report
parent
reply

Linux

!linux@lemmy.ml

Create post

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word “Linux” in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

  • Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
  • No misinformation
  • No NSFW content
  • No hate speech, bigotry, etc

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

Community stats

  • 7.7K

    Monthly active users

  • 6.5K

    Posts

  • 179K

    Comments