• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

cached apps - what/why/how???

dhworph

Android Enthusiast
So i keep getting apps popping up as cached, even after a force stop. (Settings> apps> running > show cached). If i stop all the cached apps they usualy just reappear... and seemingly randomly... i can clear them all out and they just come back... often different ones. Even upon a reboot, all sorts of apps appear as cached.

I know it shows those as using 'free' memory, but it still has to be wasting something to keep them cached. True?

can i limitwhich apps are allowed to get cached? Or limit the number of cached apps?
 
I know it shows those as using 'free' memory, but it still has to be wasting something to keep them cached. True?
Actually, not true at all. Linux uses extra RAM to cache filesystem metadata and data, process data segments, etc. The idea is, if you have the free RAM and there is no pressure from the VM sub-system, then use the RAM to cache things that are likely to be run again soon. On a traditional desktop, this makes a huge difference - try this experiment:

1. reboot computer
2. time how long it takes to launch firefox/chrome/opera (don't use IE as parts of it are cached in windows, if you're using windows)
3. close the browser
4. time how long it takes to open now

You could use ms word or some other application to test, too. Any relatively big app should demonstrate this.

It's more obvious on a desktop system with a mechanical (non-SSD) disk, since system RAM is orders of magnitude faster than a hard drive. So while the difference in read times from the internal flash memory is still slower than RAM on the Nexus, it is still much faster.

Bottom line, let the kernel do the right thing. Memory used for buffers/cache is immediately relinquished to the VM sub-system if a "legitimate" use of the RAM is requested (e.g. running a new app that isn't cached).

Should you want a very in-depth technical explanation, I'd point you here.

Particularly the "Life of a Page" section. :)
 
Very cool info. Thanks! It will take a careful read to understand...

So i guess it is nothing to worry about. However still kinda annoying when apps get cached that i wont need access to soon. I guess the most important thing is running apps... maybe they use more energy... my main concern is battery conserving... i dont want anything running unnecessarily...
 
So i guess it is nothing to worry about. However still kinda annoying when apps get cached that i wont need access to soon. I guess the most important thing is running apps... maybe they use more energy... my main concern is battery conserving... i dont want anything running unnecessarily...

Yeah, it's a bit counter-intuitive. But trust me, except for the roque app that keeps chewing up CPU or keeping wifi/data/GPS on when it should not be, the OS does a good job of keeping the apps inactive. If you find an app in your battery info chewing up a high %, check its settings and/or uninstall it if you don't need it.
 
Cached apps aren't using any battery. They're not running, they're just stored in RAM. They're not using any CPU cycles. And if the system needs the RAM, the RAM will be freed automatically :)
 
I figure it takes a bit of energy to store them in ram, but it may be very slight... it takes cpu to load n unload them.... most cached apps are ones i dont use often enough to justify it...


Interestingly mms crashes if its not allowed to be cached... i wish i could specifically set which apps can cache...
 
The process of killing them and the phone restarting them uses more power than just ignoring them in the first place.

Don't obsess and try to micro-manage the OS.
 
Back
Top Bottom