Monday, December 23, 2024

Android will see performance boost with more RAM and 16 KB page size

Must read

Google is working to enable a performance boost on Android devices by adding support for a 16 KB page size. This memory management-related change is now starting to see broader testing. 

In most CPUs, dedicated hardware called memory management units (MMUs) translate addresses from what a program is using to a physical location in memory. This translation is done on a page-size basis. Every time a program needs more memory, the operating system needs to get involved and fill out a “page table” entry, assigning that piece of memory to a process. When the page size is 4 times larger, there is 4 times less bookkeeping. So, the system can spend more time making sure your videos look great, games play well, and applications run smoothly, and less time filling out low-level operating system paperwork.

To date, Android has been “built and optimized to run with a 4 KB page size.” Google has found that using the larger page size on Android translates to an “overall performance boost of 5-10%,” though at the expense of ~9% additional memory usage. Specifically:

  • “Lower app launch times while the system is under memory pressure: 3.16% lower on average, with more significant improvements (up to 30%) for some apps that we tested”
  • “Reduced power draw during app launch: 4.56% reduction on average”
  • “Faster camera launch: 4.48% faster hot starts on average, and 6.60% faster cold starts on average”
  • “Improved system boot time: improved by 1.5% (approximately 0.8 seconds) on average”

With Android 15, Google has refactored the OS “from the ground up to support running at different page sizes, thus making it page-size agnostic.” Developers have to recompile their apps for 16 KB page size devices, but the “same application binary can run on both 4 KB and 16 KB devices.”

They can start doing that with Android 15 QPR1 Beta 1 on the Pixel 8 and 8 Pro. This “Boot with 16KB page size” developer option requires a device wipe and unlocked bootloader, so it’s not suited for day-to-day usage.

Google is working with “SoC and OEM partners to enable the option on additional devices soon,” while offering a x86_64 emulator.

We are looking forward to application and SDK developers now to take advantage of these options and prepare for more performant and efficient Android devices in near future.

In terms of end user availability, a “near future” timeline is provided. Google says there are “no production Android devices available today or expected for the Android 15 release that support a 16 KB page size.” The Android team expects “16 KB (and eventually greater)” page size adoption to coincide with OEMs building “devices with larger amounts of physical memory (RAM).”

FTC: We use income earning auto affiliate links. More.

Latest article