[Xiaomi Redmi Note 4 [Snapdragon] ROMs, Kernels, Re] arvindbadri:
Seriously, it is just a number. Trust me. This is approximately how RAM works-- when you open an app and then switch to another app or go back home, provided that there is enough RAM, the current state of the app you last used will be saved in the RAM, which means when you switch back to it, it gets loaded more quickly.

So at any point, you only need enough RAM to open a new app. That's all. 500MB of remaining RAM is more than enough to open two or three apps at once without removing anything from your cached list of recently used apps.

If there's less than that amount of RAM remaining, what the OS does is simply remove the state of the Least Recently Used app from the RAM to free up RAM space. This means that the app will still show up on your recents screen, but when you touch it, it'll open from scratch because it is no longer available in RAM.

Watching the "remaining RAM" number is kind of a placebo and actually a misleading statistic but still people like seeing a bigger number on RAM left, so a lot of operating systems and apps (no matter if they're legit like Greenify or shady like Clean Master) forcibly remove recently used apps from the RAM, unnecessarily. In the long run, this does not save battery life.

In fact, some chinese manufacturers are so invested in this placebo of showing lot of remaining RAM that their entire framework, hardware, hardware-software interface is optimized to use less RAM than recommended; that is why even with a pragmatic custom OS like LineageOS, you see that recently used apps don't stay in RAM for a long time.

Now you may ask why so much RAM is used while booting up. Well, the system also runs apps, right? Google play services is an app. Your dialer is an app. These things need RAM, too. Imagine if you had to open the "settings" app from scratch every time, without any context being stored in the RAM. It'll take so much time that the OS will not feel buttery smooth like it does now. The OS is smooth while running because it has so much stored context, and that is what shows up in the "used RAM" statistic.

Don't worry about it. It doesn't matter. Until you're unable to open apps, don't even worry about it. The android OS has been built over years and years of optimization. It is smarter than you, me, and the next shady "cleaning" app.

About battery-- storing apps in RAM takes far far less energy than opening an app. Opening an app is an energy-intensive activity, it involves creating the context of the app. Bringing it up from RAM is an energy-efficient activity, it involves reading the context of the app from the RAM. If the app is something that you're going to be using often (the perfect examples are system apps) then you absolutely should not be closing and opening the app every time. That'll kill your battery much faster than just storing it in the RAM.

This is also why greenify should only be used selectively. Using greenify on, say, the Amazon app is a great idea because once you're done with your purchase, you don't want it running on the background; you'll open the app if you want it again and you'll want it again after a long enough time that you don't mind the app opening time. Using greenify on, say, the messaging app is a dumb idea because you'll need to open the messaging app over and over again in daily usage, and the focus is on it opening fast, and you'll lose more battery in opening it so many times, than you would save in clearing it from RAM.