Android 13 promises improved memory management, but not necessarily for everyone

It will affect low-end hardware the most

No matter how much RAM manufacturers pour into their smartphones, we’ve all found that Android kills background apps a little too relentlessly. At best, it may mean restarting your last-played song on Spotify or reloading a tweet on Twitter, but in some cases, you may end up losing unsaved data. With an upcoming change to Android currently being tested, Google may finally be ready to improve how memory management works.

The folks at XDA Developers discovered a new commit on Android Gerrit that follows some changes the company has been working towards on Chrome OS. Google is working to implement MGLRU, or “Multi-Generational Least Recently Used”, as a policy on Android. After first rolling it out to millions of Chrome OS users, the company has merged it into the core of Android 13, potentially ready to expand its reach to countless smartphone owners.

This kind of memory management is a rather complicated process – whether you look at Android specifically or Linux as a whole. Although Mishaal Rahman on Esper.io offers a much more in-depth look at what multi-generational LRU really brings to the table, here’s a super simplified explanation. Instead of having two lists of services (active and inactive), MGLRU uses “generations”, which allow for additional levels than just the simple two-list approach. Once implemented, Android will seek to clear pages from the older generation first, potentially making better choices about what to kill silently in the background, resulting in improved performance overall.

According to archived Linux posts by a senior software engineer at Google from January, the company has already started testing this kind of memory management with about a million Android devices, but as XDA points out, these numbers probably point to Android Runtime on Chrome OS – not smartphones . Still, early results are promising:

Google’s fleet-wide profiling shows an overall 40% drop in kswapd CPU usage, in addition to improvements in other UX metrics, e.g. a 85% decrease in the number of low-memory killings at the 75th percentile and a 18% decrease in reproduction delay at the 50th percentile.

Reduced use of kswapd (which controls virtual memory) should return improved CPU performance, which is great for any device from low-end models to flagships, but it’s the low-memory kill numbers that excite us. It is possible that this change will not come in Android 13, although it is certainly being prepared for a future version of the operating system. Another Gerrit commit points to the ability to enable MGLRU using ADB commands, so who knows – maybe we’ll get to try this when the upcoming Android 13 beta app is live.

UPDATE: 2022/04/22 13:00 EST BY WILL SATTELBERG

More details

Esper.ios Mishaal Rahman has published an in-depth exploration of exactly what MGLRU means for Android in the future – including a super useful explanation of how memory and page management work fully. It’s the perfect weekend read, but it also fills us in on some extra details about what these changes mean for Android going forward.

First of all, it sounds like the biggest impact MGLRU will have on smartphones will target low-end devices – gadgets without a wealth of RAM that can struggle under intense workloads. Your next Galaxy S device is likely to have plenty of overhead to continue managing apps and other background services without having to rely on these changes. That said, it is not impossible for flagship phones to see improvements from this – we’ll just have to wait and see what effect is really done.

Second, you may need to download a new device to try it out. While Rahman suggests that Google is planning to try out MGLRU on the Pixel 6 series, you will probably need to take a phone that includes Android 13 pre-installed. This change in memory management requires an updated Linux kernel, and thanks to the Google Requirements Freeze program, many older phones will not get it.


samsung-galaxy-s22-plus-cases-bigwm-1

The best Samsung Galaxy S22 + covers in 2022

Read Next


About the author