This is a sticky topic.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Gary Explains: How much RAM does your phone REALLY need in 2019? All


    First, a look at how Android manages RAM.

    RAM management

    When you launch a new app on Android the Linux kernel creates a new process. A process is a unit of execution with its own virtual address space (which is mapped to physical memory). The Linux kernel manages the resources needed by the process including time running on the CPU, input and output of data (over the network or via the filesystem), and physical memory (RAM).
    When there is an abundance of resources the kernel’s job is easy. If the process needs more CPU time and the CPU is idle, the kernel can easily grant the process more execution time. If there is little I/O, giving the process more I/O isn’t a problem. If the process needs more RAM and RAM is available, the kernel just needs to track what process is using which bits of memory.
    However, when resources are scarce things become complicated. With CPU time and I/O, the biggest casualty of overloading is performance. If the CPU is busy, the work at hand will still get done, but it won’t be as quick. RAM is different. When you have no more, waiting longer probably won’t result in any more RAM being freed. This is where the kernel needs to be proactive to get back some RAM.
    Linux and Android handle this in two ways. First, there is the idea of swapping using zRAM. Android can allocate a chunk of physical memory for swapping. Swapping is an idea Linux uses on PCs and servers. When there isn’t enough memory, the oldest and least used pages of memory are written out to the disk and the memory they occupied becomes available for other processes. If that swapped-out memory is needed later, the saved data is read back from the disk and put back into memory (swapped-in), where it can be used.
    Android compresses the memory and writes it back into memory, but into the section reserved for zRAM. If we assume a 50 percent compression ratio, 128KB of RAM can reduce to 64KB, freeing up 64KB. This is the equivalent to swapping-out pages to disk. The compressed memory isn’t directly readable, so if it is needed it must be uncompressed and written back. This is the same as swapping-in.

    When a process requests more RAM and RAM is unavailable, the kernel will try to free up some RAM using swapping. If sufficient RAM can’t be found, the kernel needs to get more aggressive and start culling processes. This is a strange situation for the kernel. It must kill an existing process, to make room for another process. The key here is the current memory request is likely coming from the foreground app, which is currently in use. The kernel applies various tests and checks and determines which processes can be killed off to free memory. If you started Candy Crush three days ago and switched away, but never returned, then the kernel can assume you aren’t going to switch back to it now and so kills it off. This frees memory and allows the currently running app to continue.

    This is all handled by the kernel’s Low Memory Killer driver. Interestingly, future versions of Android will handle this slightly differently. While the result will be the same, it won’t be the kernel’s assassin that does the dirty deed. Starting with Linux Kernel 4.12, the Low Memory Killer driver has been removed and instead, the userspace Android Low Memory Killer Daemon (lmkd) performs the cullings.

    This means when you start a new app, older memory resident apps, are removed to make way. If you switch back to these apps, using the recent apps screen, then the apps will be reloaded, similar to an initial launch.
    Although this system may sound brutal, it is the way Android was designed. All apps are given ample warning that they will be killed off and move through different states allowing them to save their current status information. When they are reloaded, the apps just read the last status information and carry on from where they left off.
    How much memory do apps use?

    If the low memory killer activates too frequently, the overall user experience can be affected. In a worst-case scenario every time you switch away from an app to start another one, the previous app will get killed to make way for the new app. This is a severe low memory condition. However, there is an acceptable sweet spot where the occasional resident app is removed to make way for new apps. As long as the removed app is “old,” the user probably won’t even notice it was removed from memory. After that sweet spot the frequency of app removals becomes academic, since there won’t be much perceptible change in the overall user experience.
    However, what is the sweet spot? To find that out I wrote a utility which uses the Android Debug Bridge (adb) to monitor which processes are being killed, along with the amount of available memory. It also looks at how much RAM the running apps use.
    After lots of experimentation, I have come up with a list of three different categories of apps. “Standard” apps use between 130MB and 400MB of RAM. There are apps like YouTube and WhatsApp, as well as games like Crossy Road and Candy Crush. Then there are the “media-intensive” apps, which load lots of images and therefore use more memory to show them. Here you will find titles like Google Photos and Instagram. These apps use between 400MB and 700MB of RAM.
    Finally, there are the “huge” apps, predominantly high-end games which can eat through RAM like a hungry Pac-Man. Games like Need for Speed: No Limits or PUBG Mobile can use between 800MB and 1152MB. Chrome is also in this category (with 3 tabs open).
    The amount of RAM being used on your device depends entirely on which apps you have running. If you like Instagram and Candy Crush, but not much else, then you will be using just over 1GB of RAM. If you switch between PUBG and Asphalt 9 all day long, you’ll need 2GB, and so on.
    How much RAM do I have?
    Each Android smartphone comes with a fixed amount of RAM. It is part of the phone’s motherboard and it isn’t upgradable. While it’s important to know how much RAM your phone has, it is also important to know how available it is for running apps. Android and Linux will both use some RAM, and as do some pre-installed user level services. Here is a table of some devices I had at hand, showing the installed RAM and the available memory. Available memory is how much memory is available for starting new apps, without swapping.
    Huawei Mate 8 2881 1392 511 0
    Pixel 3 XL 3548 1740 1023 8
    Samsung Galaxy Note 8 5339 2799 2559 34
    Samsung Galaxy Note 9 5580 3597 2048 266
    OnePlus 6T 7640 5065 0 0
    The Mate 8, Pixel 3 XL, and Note 8 make about 50 percent of the installed RAM available for user apps. That number starts to climb slightly with the Note 9 and the OP6T, with the latter offering 66 percent of the installed RAM to the user.
    It is also interesting to note the wide range of zRAM levels OEMs choose. The Mate 8 uses 0.5GB of swap, while the Note 8 is configured to use 2.5GB! Interestingly, OnePlus is so confident in the 8GB found in the OP6T that it doesn’t use any swap space.
    A device like the Pixel 3 XL can hold at least five “standard” apps in memory without swapping. This means you can switch between YouTube, WhatsApp, Spotify, Candy Crush, and Google Play without concern. If you start more apps then the Pixel 3 XL will start to use the compressed swap space more aggressively in an attempt to free up memory. This means in reality, you can run around eight “standard” apps and keep them all in memory and the swap space. Switching to an app that’s swapped out will swap it in. Swapping isn’t really noticeable. Often background process get put into the swap space first. If you start more than about eight “standard” apps, one of the previous apps will be removed from memory.
    If an app is pushed from memory, that isn’t necessarily bad — the app will reload on switch. However, there is an argument to be made that devices as expensive as the Pixel 3 should include more memory.
    The Note 8 and Note 9 have 6GB of RAM, with about 2.5GB available to the user on the Note 8 and 3.5GB on the Note 9. Both devices have at least 2GB of swap space, too. This means you can switch between a heavy game (or Chrome), a media-intensive app (like Instagram) and 5 or more standard apps and everything will remain in memory. If you start more apps, the phone will start using the swap space. This boosts the number of memory resident apps even higher.
    These 6GB phones can switch between a dozen or more apps, including some heavy duty ones, without seeing a single reload. This is the beginning of the sweet spot. Common apps remain in memory for long periods of time and the multi-tasking experience is seamless, most of the time.
    The sweet spot continues into the 8GB realm. Here you can keep at least a dozen apps in memory without reloading, including bigger apps like PUBG and Google Photo. Switching between apps is seamless. Over time, older apps will be removed from memory to make way for new apps. You probably won’t have touched the apps that get removed for days when that happens. Having said that, this is the top end of the sweet spot. The OnePlus 6T doesn’t include a swap space, so it will probably be hard for the average user to discern the difference between a 6GB device with swapping and an 8GB device without.

    See how it all works here


    Last edited by Kaykerry; 01-30-2019, 06:17 PM.
    Thanks for using Tecno mobile

  • #2

    i feel so good to read your shared information thanks for sharing such a nice information with us,
    Last edited by Kaykerry; 01-30-2019, 06:14 PM.

    Comment


    • missslimzy17 commented
      Editing a comment
      this is one of the best articles I have read

    • datyorubaboy commented
      Editing a comment
      this is very educative

  • #3
    Well understood, thanks for the education.

    Comment


    • missslimzy17 commented
      Editing a comment
      it is quite informative

    • datyorubaboy commented
      Editing a comment
      so much to learn

  • #4
    it,s a good idea

    Comment


  • #5
    Thanks to Gary, it's a good update.

    Comment


    • omoalajah commented
      Editing a comment
      very informative

  • #6
    love your information

    Comment


    • omoalajah commented
      Editing a comment
      quite educative

  • #7
    I like the explanation supplied above, because it truly stated the instances of the problems encountered during the shortage period of memory and equally provided solutions that can be used yo rectify these problems. Gary thanks for the classic solutions, they truly make my day!

    Comment


    • omoalajah commented
      Editing a comment
      nicely said

  • #8
    well understood, great idea ant good information

    Comment


    • #9
      thanks a lot Gary and thanks a lot dann jayden for shared this information I like it. pls my Tecno c8 is still a 5.0.2 android when will I get update this is my big problem this made me dislike Tecno in fact

      Comment


      • #10
        hi

        Comment


        • #11
          2 ok how will I get back my phone's fonts they no longer exists like before...

          Comment


          • #12
            Thanks for sharing.

            Comment


            • #13
              Hello there was once an android 6 update which was released in 2016 but it was later discontinued since it was not stable on the tecno c8<br />
              Originally posted by hesasan4
              thanks a lot Gary and thanks a lot dann jayden for shared this information I like it. pls my Tecno c8 is still a 5.0.2 android when will I get update this is my big problem this made me dislike Tecno in fact
              Thanks for using Tecno mobile

              Comment


              • #14
                On which phone<br />
                Originally posted by 0745606570
                2 ok how will I get back my phone's fonts they no longer exists like before...
                Thanks for using Tecno mobile

                Comment


                • #15
                  i feel so good to read your shared information thanks for sharing such a nice information with us, job alert
                  freejobalert - Find the Jobs Alert free, Updates all over the world jobs This site Provides the Jobs Free Alert, to your Inbox and Provide the Best job Alert

                  Comment

                  Advanced Options
                  Working...
                  X
                  Download the App for a More Fluid Experience
                  DOWNLOAD