[Q] Memory Management Question - One (M8) Q&A, Help & Troubleshooting

I'm running a stock Sense 5.0.1 ROM with the ElementalX kernel. For ages I've been annoyed at how apps (the 5th last used and above) require reloading when going back to it. I thought 2GB of RAM would be enough for multitasking of around 9 apps or more. I recently noticed in the running apps screen, in the cached apps menu that it shows ~450mb free and it will always hover around that value no matter which apps have been running or how many.
I was wondering whether this is due to the memory issues I've heard from 5.0 builds of Lollipop, poor memory management of Lollipop or HTC's LMK settings. Is there any way of decreasing the amount of free memory available?

Related

[Q] Which custom ROM offers the best ram management?

Is there a particular rom which offers better ram management to allow for apps to stay in the memory longer, and cached apps get less priority?
I'm getting annoyed of apps that are suppose to be running all the time in the notification bar, but they are constantly restarting because the ram gets too low, but in fact, there is enough ram, but it's being taken up by cached apps instead!
Maybe I'm asking too much. Are there ROMS which:
1) offer more ram by being "trim"
2) manage memory better for multitasking
I really wanted to keep this phone stock, but this is pathetic! I feel that my old phone, with a "huge" 256mb ram chip was able to run more software in the background than my GN is! I've stripped all the useful apps off this phone and memory management is still an issue.
isn't the kernel responsible for that and not the rom?
zephiK said:
isn't the kernel responsible for that and not the rom?
Click to expand...
Click to collapse
Good question. I figured some roms are made lighter by removing stuff on it you don't need, and when it's done on a system level, I assumed that less ram would be needed for the os to operate.
Maybe someone can explain this?
Sent from my Galaxy Nexus using Tapatalk
I mean yeah, to a extent.. I'd believe that ROM and Kernel both contributes to it but kernel is the bigger player when it comes to optimizing "RAM."
I use AOKP + Franco Kernel if that helps. No lag problems, never even had it when it came to stock ICS. You'd might want to check your apps and see if there's a bad app causing memory leaks.
EP2008 said:
Is there a particular rom which offers better ram management to allow for apps to stay in the memory longer, and cached apps get less priority?
I'm getting annoyed of apps that are suppose to be running all the time in the notification bar, but they are constantly restarting because the ram gets too low, but in fact, there is enough ram, but it's being taken up by cached apps instead!
Maybe I'm asking too much. Are there ROMS which:
1) offer more ram by being "trim"
2) manage memory better for multitasking
I really wanted to keep this phone stock, but this is pathetic! I feel that my old phone, with a "huge" 256mb ram chip was able to run more software in the background than my GN is! I've stripped all the useful apps off this phone and memory management is still an issue.
Click to expand...
Click to collapse
AOKP and a few other roms have the option to change the minimum ram before android os starts killing background apps. The default is about 80MB I believe. You can decrease it (do not forget to check set on boot), but I do not think it is recommended to go too low.
If you are having low memory issues its probably because of a rogue app. Install System Tuner and check for background apps that use more than ~10-20MB of memory.

[Q] Stock RAM management as compared to CM

I was a long time stock user. I feel the stock UI is nice and everything works just great. But the Stock ROM eats up RAM like crazy. I just don't get it. Currently I'm using OpenSEMC. I'm aware AOSP roms are debloated and lighter than stock ROMs but even debloating a stock ROM, multitasking is simply below average on stock ROM. I usually remove all Sony apps(Album, movies, DLNA, Timescape, Small apps, widgets, etc.) along with the usual(Facebook, Twitter, etc.). So I have basically the same apps installed on my Stock ROM and CM ROM. But RAM is so much better handled in CM.
For example, RAM usage on stock ROMS by apps:
Contacts/Dialer - uses around 45-50MB of RAM
Hangouts - always around 50MB
Whatsapp - around 30MB of RAM
Swiftkey - around 45MB
on OpenSEMC, these same apps use
Contacts/Dialer - uses around 20MB of RAM
Hangouts - always around 35MB
Whatsapp - around 20MB of RAM
Swiftkey - around 35MB
I can switch between 5 apps in CM and none of them will get reloaded, at least untill I open a heavy app like Chrome or Google+. Dialer, Whatsapp and Hangouts(my 3 most used apps) are ALWAYS residing in memory. They open instantly and almost never get killed off.
On stock ROM, swtiching between these 3 apps and still the third one will get killed off very soon. I just don't get it. It's like the ROM is giving priority to apps and services I barely ever use, instead of giving it to apps I frequently use.
They are the same apps; why do they consume more RAM on stock(OK apart from the Contacts app)? Why do they get killed off faster? Does anyone have an explanation?
Stock has better ram management but aosp and cm10 have better ram consumption
Aka
Cm10 settings - 34mb
Stock sony - 53mb
aosp - 47mb
Stock is better for ram heavy but it self used alot ofbram cm10/aosp is better for gaming for cpu intensive, not so good for ram but its eficient ram consumption makes overal for better
Apps being killed is a lack of ram, dont use dodgey or poorly designed apps, also avoid intrusive advertising
Also avoid ram cleaners
You could also fix by changing your oom values to be less agressing for killing apps

[Q] Excessive RAM Usage?

Hi Folks,
I've got the ZE551ML 2.3Ghz/4GB RAM/ 64GB ROM/ USA Version.
I picked up this phone mainly because of the 4GB RAM- I'm sure many of you did the same.
I multitask a lot and would rather not have to quit/close apps and let the memory management handle that.
I've noticed that the default RAM use by the phone (immediately after bootup), is TOO high (about 2GB used), with no background apps but a few background processes running (your FB/ Messenger/ Whatsapp/ Twitter - not too many, just these).
Have noticed that opening several 'light' apps (non- CPU/GPU/RAM intensive apps, fills up the RAM usage significantly). Last night, with less than 50MB free RAM left, the phone froze up and re-booted. This is a sign of very bad coding. Shouldn't the OS be able to kill tasks that have not been recently run to free up RAM?
Do any of you face similar issues? What are your workarounds? I'm aware that ZenUI is extremely RAM intensive itself.
P.S I am aware of 'Memory Leaking Issues'
I get the same. It starts using around 2GB. I had also noticed some apps, like WhatsApp/Snapchat growing to consume 4-500MB over time. That said, it has never froze up on me. I didn't notice Zen UI taking up a lot of RAM at any point, but I started using Nova pretty early on and have frozen most of the ASUS/Zen stuff through Titanium. I'd suggest you root it, if you haven't already, and start freezing out apps you don't use/prevent apps from auto-starting. That helps a lot.
Even leaving 2GB to start with, that's a ton of RAM for multi-tasking, unless you're using especially RAM-intensive apps (aside from the leaking issue). As for a fix, I'm not aware of any yet. We're all pretty much waiting for a new update so we get 5.1.x, where the leak is fixed. Even better, waiting for an AOSP/CM ROM to be released so we can be done with this ASUS stuff to begin with. IIRC there is an Xposed module for the memory leak issue, but last I read it wasn't working (for this device at least).
There must have been some optimizations made with the most recent two updates because the apps I noticed issues with before aren't consuming anywhere near as much RAM as before. WhatsApp/Snapchat are currently using ~220MB combined, whereas before it could get close to 1GB.
Thanks for the Reply.
I'd love to Root the device but unfortunately with corporate email and Mobile-Iron, this is an impossibility. (Consequently even Mobile Iron hogs a portion of the RAM).
Considering that a lot of devices even being released at the moment have 2GB RAM and this is allocated to System resources as well as back-grounded apps. How do those companies manage the memory in half the RAM as the ZF2 (considering they would also face similar memory leak issues)
If you are thinking of RAM usage from a Windows user's perspective, you might be feeling this way. There is no harm in RAM being used. In fact Linux or Android loves caches so much that they fill it up most of the time. And since we have 4GB, why not fill up about 3GB? If a device has lower memory altogether, say 1GB, it will only fill up about 700MB. But of course the memory leaks in 5.0 cause major irregularities.
Bottom line is RAM hogging isn't really an "issue" as far as i am concerned. The issue would be if the RAM does not get released for important tasks and the device starts to lag. But I don't see this happening, so why complain right? However this is just my opinion.
after updating to 2.19.40 my phone also started to consume a lot of ram .....even goes to 645 mb free sometimes
That's perfectly fine. Free RAM is wasted RAM. The OS wants to keep about 500MB or more free because beyond that you do experience slowdown. Above that, it's all gravy.
The system generously allocates that much RAM to itself because it can and to ensure core processes and ZenUI don't slow down. Android caches aggressively so switching between apps will be faster.
Auto-start Manager and Clean Master app, can help free up RAM
Sincerely,
ASUS_USA

What is eating all the S6 edge memory?

My last phone, the G3, has 3 GB of RAM. The G3 runs Lollipop perfectly. The S6 edge has 3 GB of RAM and there's never any of it. I understand that there's a very aggressive low memory killer but it is ridiculous that a top of the line phone needs to reclaim my podcast app or Audible while they're playing. There should be a ton of free memory and a ton of cached apps in it but the memory is full and there is nothing cached. I've never been so frustrated with a phone. I spend a lot of time sighing at it when it does something stupid. Anyway, if anyone knows where this mysterious memory is being used, please chime in.
There are suspicions that it could be related to the touchwiz launcher, try a different launcher just for the heck of it and see how it goes.
Pp.
gunslingerfry said:
My last phone, the G3, has 3 GB of RAM. The G3 runs Lollipop perfectly. The S6 edge has 3 GB of RAM and there's never any of it. I understand that there's a very aggressive low memory killer but it is ridiculous that a top of the line phone needs to reclaim my podcast app or Audible while they're playing. There should be a ton of free memory and a ton of cached apps in it but the memory is full and there is nothing cached. I've never been so frustrated with a phone. I spend a lot of time sighing at it when it does something stupid. Anyway, if anyone knows where this mysterious memory is being used, please chime in.
Click to expand...
Click to collapse
Hi gunslingerfry,
I was just reading about this on forbes. Here is what their author says to explain the poor memory usage and how to fix it "What should happen is RAM used by apps and services is released when those apps and services are not in use. Instead it is not being released which means each new app or service has to eat into additional memory until there is no more available, at which point the slowdowns and crashes begin.
The only half solutions at present are a) to hit the ‘Close All’ button in the multitasking card menu to dismiss all apps to try and claw some memory back, or b) to reboot the device. Interestingly the latter is expected to have helped keep the issue under the radar in reviews as performance testing is always done from a fresh boot."
So it sounds like you are sort of out of luck for now, but I am sure there will be some update that fixes the issue shortly.
I'm experiencing this myself but apps that I reopen from the multitask window have to reload and I lose where I was previously.. Very annoying to say the least.
Sent from my SM-G925T using Tapatalk
PanchoPlanet said:
There are suspicions that it could be related to the touchwiz launcher, try a different launcher just for the heck of it and see how it goes.
Pp.
Click to expand...
Click to collapse
I never use the TW launcher because I don't enjoy using it. I use Action Launcher. It's very lightweight.
Goldmeyer said:
Hi gunslingerfry,
I was just reading about this on forbes. Here is what their author says to explain the poor memory usage and how to fix it "What should happen is RAM used by apps and services is released when those apps and services are not in use. Instead it is not being released which means each new app or service has to eat into additional memory until there is no more available, at which point the slowdowns and crashes begin.
The only half solutions at present are a) to hit the ‘Close All’ button in the multitasking card menu to dismiss all apps to try and claw some memory back, or b) to reboot the device. Interestingly the latter is expected to have helped keep the issue under the radar in reviews as performance testing is always done from a fresh boot."
So it sounds like you are sort of out of luck for now, but I am sure there will be some update that fixes the issue shortly.
Click to expand...
Click to collapse
Goldmeyer, this doesn't explain why it's 75% utilized on boot but with no running apps (according to the smart manager app). I've tried the build.prop tweaks posted around here and there is a significant difference. Smart manager reports there are dozens of apps being pre-loaded on boot (which is normal, this is what we want!) but with the same 75% utilized. Those tweaks tended to lag the device after a couple hours, which may be a manifestation of what the Forbes article is referring to. So I guess the thing I don't get, and maybe a better understanding of what the dha/lmk values that are being tweaked would help, is what is currently allocating all that excess memory? Is TW just allocating ridiculous amounts of memory to make sure it runs smoothly? Is Android hoarding it for its own uses? And if so, how can any device with less than 3 GB of ram possibly function on Lollipop?
On a much more technical note, I understand that running 64 bit means using a little more ram. Addresses are twice the size and integers will be twice the size but that doesn't explain 2.3 GB. It shouldn't be loading the entire system partition into ram.

How to stop apps getting killed when switching

I can live with the Nexus 5X' relative sluggishness when compared to the Nexus 5, but what really stops me from doing my work is the phone killing apps when I switch between them.
Example: I may be filling out a form on a website in Firefox for Android. I need to look up a word in the dictionary, so I switch over to the dictionary and look up the word. When I switch back to Firefox, the application has obviously been killed, as it reloads the page.
Example2: I'm listening to the Audio version of the Economist via the Economist app. The speaker mentions a certain placename and I open the Google Maps app in order too find where it is on the map. Suddenly the audio will stop playing - the app has been killed.
The above gets considerably worse when switching between more than two apps and is really hindering my work and productivity.
Now this almost never happened on the Nexus 5, which also only had 2 GB of RAM. So is it the power saving feature of the Nexus 5X kicking in? Is there a way to stop it from happening?
Marshmallow simply has very bad RAM management from what I've seen. I used to have the Nexus 5 too and as you said, multitasking was a very good experience on it (especially on Kitkat). Google's OS takes more of the phone's resources after each update (with no major new features or improvements). Marshmallow looks exactly the same as Lollipop, except for the tiny feature of apps permissions, and the Now on tap that I barely use (same for Android pay which I'm sure most of Nexus 5x owners won't even be able to use it outside the US). So I still don't understand why they had to jump so fast to a new version of Android while Lollipop still had a ****load of bugs that need fixing, they could've worked more on Lollipop to perfect it first then give us Marshmallow after 2 years maybe, we're not in a hurry.. I just hope they don't stop again at Marshmallow 6.1/6.2 or something and introduce Android N *sigh*
Sounds like you have more user installed apps with constantly running background services installed that the phone can comfortably handle with 2GB memory.
Check the memory stats in Settings - if the average over all the time options is 1.6GB or above used then your phone is going to struggle and cached apps are going to be getting cleared out when switching regularly. Look down the list particulary for apps running close to 100% of the time with a big RAM fingerprint. Also check running services in developer settings to get an idea of what is running a service all of the time.
Once you've identified the worst offenders make that difficult decision - is the apps utility worth it for the impact on performance. Consider reporting the memory use to the developer, particularly if it's much lower after a reboot and increases over time. Plenty of playstore apps ship with clear memory leak issues.
Other than that the other option is reasonably regular reboots to keep the system fresh and clear out any memory leaks.
thanks for the suggestion. Well here's the top 5:
Android operating system 524 MB
Wechat 156 MB
Firefox 117 MB
System UI 105 MB
Android system 99 MB
Clearly it's mostly the system using all resources. Firefox and Wechat, sure, I find them rather essential to my life, but together they don't even use as much as the OS.
Thing is, I can't remember this happening on the Nexus 5.
Sounds like you may have some apps using up a lot of your memory. I haven't been seeing any redraws with my apps, even 24+ hours of sitting in the background. The other day I was switching between gaming, streaming a live sporting even, and text messaging and the phone didn't drop a beat despite the game alone using 600MB of RAM.
Are those the average RAM or peak?
that's what shows up when I get the details of the RAM usage through settings
still this never happened on the Nexus 5, at least I can't remember
Yeah, I have a hard time believing it's the apps. I never had this issue come up in my Moto X 2013 (also 2 GB of RAM) using the same apps. We're seriously talking about one app open, switching to another app. No reason switching back to the first app should have everything reload.
Unless by "some apps," you mean that they have somehow not been optimized for Marshmallow in some way or other. But the apps simply running a process? A smartly-made OS (Lollipop, KitKat) will know "Hey, we have to kill something to free up RAM? Why don't we kill an app that hasn't been used in a while?" and a less-smartly-made OS (perhaps Marshmallow...?) will think "Hey, we have to kill something to free up RAM... why don't we kill the app the user just used?"
And there are two figures there - average and peak - which are those?
If there are the averages rather than peak then both Firefox and Wechat have got a problem.
---------- Post added at 06:42 AM ---------- Previous post was at 06:34 AM ----------
Marshmallow and Lollipop low RAM behaviour is pretty much identical and quite aggressive (the OS tries to preserve quite a chunk of free memory which is uses on the sly as a display buffer), KitKat was less aggressive.
I don't have any problem multitasking on my Nexus5x, but then again for the apps I've got when I check the memory tab I'm normally averaging 1.2-1.4GB used and 400-600MB average memory free so there is plenty of space for the OS to gracefully cache and uncache processes. If the phone is normally running at 1.5GB-1.6GB used and 200-300MB then the LMK is going to be kicking in frequently. It kicks in at around 250MB free on a Nexus5x.
It was the default setting, i.e. average. HM ok good to know. It's happening quite often when listening to the Economist too. Which is really bull****, it should treat it as audio playing. Why would Android kill your music.
I agree music players don't get the priority they should, although that particular 'bug' at least gives a clear symptom that lack of free RAM is an issue, if not the cause of the issue e.g. the OS, to many running services from user apps, or a particular user app with memory leak issues.
I came to the Nexus5x from a 1GB Moto G where it was almost impossible to keep background music running in combination with navigation after Lollipop without uninstalling pretty much everything else user installed and have got used to monitoring the RAM footprint and behaviour of apps as a result.
I've suffered the problem once since I've had the Nexus5x and that was due to the music player (Soundcloud) being a memory hog (120MB+) with it's background music player service coupled with a memory leak in the driving app I was testing at the time - Automate - it was peaking at 460MB use.
I'm not so precious about what is installed now but anything that wants to run a constant service either has to be tiny when running that service or absolutely fundamental to my use of the device.
I find this to be the worst problem .We want to kill our apps like we are use to.Switching between email and chrome is horrible especially when you have to start your application all-over again (submission request) Hopefully some XDA member will figure out how to solve this issue. For now I am testing DEVELOPER OPTIONS allow running
apps in background ? Anyone know what the default value is??

Categories

Resources