• henfredemars@infosec.pub
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 days ago

    Page size involves a fundamental trade off in computer architecture. A system with the most logically minimal page size (1-byte pages) would have untenably large page tables comparable to the size of all system memory, making an MMU implementation impractical. For huge page sizes (=system memory, 1 page for the entire computer), the MMU is useless because it only recognizes permissions and virtual addresses for just a single unit, even if it would be trivially easy to implement. In between, we have practical and useful MMUs that offer some granularity in addressing and permissions for some trade off of complexity and memory to store the page tables.

    Addressable memory has grown so much over the decades. It makes sense to move the trade off point in favor of not storing so much metadata.

  • florge@feddit.uk
    link
    fedilink
    English
    arrow-up
    12
    ·
    4 days ago

    Historically, Android has been “built and optimized to run with a 4 KB page size.”

    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.

    As device OEMs add more RAM “to optimize performance,” they will adopt these larger page sizes. Android 15 added system support — by refactoring the OS to be page-size agnostic — for this “increased page size, ensuring your app can run on these evolving devices and benefit from the associated performance gains.” This is supported and available to test on the Pixel 8 and Pixel 9 series. This results in performance improvements like:

    • Faster app launches: See improvements ranging from 3% to 30% for various apps.

    • Improved battery usage: Experience an average gain of 4.5%.

    • Quicker camera starts: Launch the camera 4.5% to 6.6% faster.

    • Speedier system boot-ups: Boot Android devices approximately 8% faster.