Crippled Multitasking in Stock 5.0.2 (XT1032) - Moto G Q&A, Help & Troubleshooting

Hey all,
After a frustrating month or two and a weekend of tinkering and troubleshooting I've lost patience and posted the below on the Moto support forums at https://forums.motorola.com/posts/c5fb348e02
So if you are experiencing similar issues please weigh in. If you have any ideas or a fix /workaround that doesn't involve rooting or custom Rom installation please let me know (I need access to my internet banking apps so root is a no no for the time being).
Hey Moto,
Why is the OOM/LMK with 5.0.2 so aggressive (XT1032) ? Multi-tasking wasn't great under KitKat but under Lollipop it's pretty much impossible. The most obvious and irritating symptom for me is music playback being killed within a few minutes (Play Music) if something like Chrome or Maps is open in the foreground. I used to be able to have navigation and music running in the car at the same time - no more.
So I've been on Lollipop for about 2 months now. The phone has been factory reset three times since and the last time I didn't use Google's Restore service post reset.
The observed symptoms are: The phone is quite happy whilst free memory is above about 250MB-300MB, nothing is killed and the phone maintains a healthy stash of cached apps. If free memory drops below about 250MB Android starts killing rather than caching and Developer Options/Process Stats reports the phone to be in a near permanent memory critical state. Why? There is still 1/3 of the installed RAM left - it shouldn't start killing background apps until sub 50MB is left surely?
I've uninstalled some of my less essential high priority user background apps (bye bye Muzei live wallpaper, by bye Dash Clock Widget) to make things bearable - it's memory critical about 20% of the time rather than 80% now - but it's ridiculous to have to limit oneself so much - 1Gb of memory should be sufficient to run a live wallpaper, a widget and one or 2 other relatively heavy background apps without crippling the device and it was sufficient under KitKat.
So can we expect a fix for this with 5.1 if it is coming our way? One potential clue - CyanoMod Developers have noted odd permissions, and if the permssions are fixed some crappy values in /sys/module/lowmemorykiller/parameters/minfree - the permissions make the files unreadable. CM12.1 reportedly patches this and cures the crappy multitasking.
I've checked on my unrooted stock device and sure enough these parameter files are unreadable (other parameters in various parts of system / sys etc can be opened as read only).
Click to expand...
Click to collapse

Related

[Q] RAM observations

I have my Nexus S for over two weeks now, and I'm incredibly happy with it. Theming is a lot of fun, and you can do very cool stuff even without root and custom roms!
However, there is one (strange) thing I've noticed. It's about the RAM.
For your information: I use Go Launcher which has a tab in the App Drawer with running applications, and a button to close all (you can exclude certain apps). When I boot up my phone, I have 170-180 MB free RAM. The following programs (and widgets) are running in the background (I have excluded them from the close all list): Go SMS Pro (widget, notifications), WhatsApp (notifications), Lookout, Extended Controls (widget), Wiget Locker (I made it look like the MIUI lockscreen) and Clockr (widget).
There are two more apps that are on constantly, and those are the Miren Browser and PlayerPro. I don't know why Miren Browser keeps turning itself on. When I check how much MB it uses, it says 0,00 dB... As for PlayerPro, I use a widget called Phantom Music Control, a widget that hides itself when no music is being played. I also use it on my lockscreen. This widget controls PlayerPro, so that is probably why PlayerPro has to be running all the time (so that it can start up quickly when needed).
There are some Google apps that turn themselves on, like Gmail and Places, and they actually use RAM according to Go Launcher. I don't want them to be running, and synchronization is turned off with Gmail. When I want to know if I have mail, I open Gmail. It doesn't have to be running all the time. I've never used Places, and I never will use it, so I don't know why that has to be running all the time.
Every once in a while I hit Close All (with Go Launcher). However, I've noticed that over time my free memory keeps lowering. When I boot up my phone it is around 175 MB, but at the end of the day the free memory is 100 MB, 70 MB or even 50 MB, and yes, even after I've hit the 'Close All' button.
I know I don't use my phone very efficient, with programs like Go SMS, Widget Locker and that Music Control widget, and I will flash a custom rom later. My RAM memory will probably increase then (I've read something about Supercurio's kernel including a boost RAM management). It just bothers me that I don't have control over what programs are running (Gmail and Places), and that my free memory decreases over time. I haven't noticed any slow downs, I'm just worried. Or shouldn't I?
I don't know about the rest, but you shouldn't be concerned about free memory.
Android is designed in a way that all programs keep running (sleeping actually) in the background even when you don't use them at the moment. They are automatically killed when the system needs memory for something else. Any program that is sent to the background (e.g. by pressing back or home) can be killed by the system at any time and is (should be) ready for it.
Basically, the less free memory you have, the better. That means that many of the apps you use are running and you can return to them without delay.
There are some articles floating around the web about the architecture of android and process/application life cycle. They explain that better then me, and in more detail.
cgi said:
I don't know about the rest, but you shouldn't be concerned about free memory.
Android is designed in a way that all programs keep running (sleeping actually) in the background even when you don't use them at the moment. They are automatically killed when the system needs memory for something else. Any program that is sent to the background (e.g. by pressing back or home) can be killed by the system at any time and is (should be) ready for it.
Basically, the less free memory you have, the better. That means that many of the apps you use are running and you can return to them without delay.
There are some articles floating around the web about the architecture of android and process/application life cycle. They explain that better then me, and in more detail.
Click to expand...
Click to collapse
First of all, thanks!
So I don't have to be afraid of any slow down? And what about Gmail and Places turning themselves on every time, even if I don't use them?
And why does the free memory decrease over time, but increases again when I turn off and boot up my phone?
Androyed said:
So I don't have to be afraid of any slow down? And what about Gmail and Places turning themselves on every time, even if I don't use them?
Click to expand...
Click to collapse
More like the opposite: your RAM is being put to good use.
When your PC get's low on RAM it will start swapping and trashing around. Your smartphone has no swap and is optimized for it. If it get's low on RAM, it will just kill some stuff in the background. All this happens without you noticing anything (if the app is programmed correctly).
I don't know about Gmail and Places. Most likely they are running because they registered broadcast receivers or something.
Androyed said:
And why does the free memory decrease over time, but increases again when I turn off and boot up my phone?
Click to expand...
Click to collapse
Every app is running in its own dalvik virtual machine process. Since creating a new VM process is expensive (in terms of processing time), the VM processes are reused to some degree. One app is unloaded, the new one is loaded.
There is more stuff going on behind the scenes, of course. There are likely some spare VMs sleeping in the background waiting for an app to use them.
However, the heap (dynamically allocated memory of a process) of a VM can only grow and never shrink (don't ask me why). So after a few apps or so a VM process is restarted, too.
To come back to your question: When your device boots up, only the processes needed for boot are running. That will be the launcher, some widgets and so on. So basically, this is the moment with the most free RAM. However, this is also when your device is slowest, because every new app you launch has first to be loaded into memory and executed.
While you use your device, many of the apps you used will be kept around in the background, so when you start them again, they will reappear instantly, because the whole "create vm process --> load app from storage --> execute and initialize app" chain has already happened.
"Free memory is wasted memory."
When you open an app, the system loads it into ram. When you close it, the system should not bother to remove it from ram because there is a good chance you will use that app again and having it pre-loaded makes it open significantly faster.
Just because ram is "used" doesn't mean it can't be re-allocated for something more important.
That being said, it is entirely possible that some of your apps have memory leaks. Does it get worse after two days, or three days?
d-h said:
"Free memory is wasted memory."
When you open an app, the system loads it into ram. When you close it, the system should not bother to remove it from ram because there is a good chance you will use that app again and having it pre-loaded makes it open significantly faster.
Just because ram is "used" doesn't mean it can't be re-allocated for something more important.
That being said, it is entirely possible that some of your apps have memory leaks. Does it get worse after two days, or three days?
Click to expand...
Click to collapse
I turn my phone off every evening, so I don't know. It's not a problem by any means, I'm just curious.
I've left my RAM alone today, and I didn't noticed any slow down. It was on 110 MB free RAM when I left it alone, and when it was at 35 MB RAM, I decided to hit the close all button (there was no slow down btw). Guess what? My RAM went back up to 140 MB! Not as much as when I boot my phone up, but it's still strange: when I hit close all when the free RAM is very low, I get more free RAM then when I hit close all when my free RAM is around 100 MB (I only get 5 or 10 MB free RAM extra then).
Thanks by the way, good first post!

Autokiller memory opimizer (not a task killer)

What is the verdict on these memory optimizer type apps?
http://andrs.w3pla.net/autokiller/faq
I can't recommend Autokiller highly enough on Samsung Froyo phones. It was a must use, even with Voodoo, on my old SGS i9000, and the same thing on my Droid Charge.
True story: just this morning I was ready to throw my Charge against the wall in frustration. Ever since upgrading to EE4 the damn thing was LAG LAG LAG city, even with Voodoo. Phone was snappy as heck after a reboot, but after a couple of hours use, it started to lag, and then would get so laggy it was almost unusable. Seriously, opening apps would take 10 second. Auto-rotate the screen took 4-5 seconds.
I enabled Autokiller, set it "aggressive" and the phone's a speed demon again.
Try it, can't hurt your phone with it, might help it exponentially.
waiting for the phones built in lowmem killer is useless, use autokiller and you will notice an immediate improvement in phone response time. heres a point for ya, without it installed i have 78mb ram free,,,with installed 158ram. thats huge. for a phone. plus they dev just updated to reduce memory usage of the app itself, plus there are tweaks in the settings menu to make the IO scheduler more aggressive, improve sd card reads, battery life, wifi, networ,...its layered man. and free....whats more to love. the only other way i have found to improve phone speed feelwise is with kangfucius kernel and set that terd up to 1500hz with cfq. shazaam.
elucid said:
What is the verdict on these memory optimizer type apps?
http://andrs.w3pla.net/autokiller/faq
Click to expand...
Click to collapse
Basically what you're doing is tweaking the settings for how Android frees up your memory. In theory, it should be good, because the defaults that were picked with the Android release aren't going to be appropriate for everyone. Just be careful not to be too aggressive or you might start losing functionality you want, such as alarms or background email checks.
chadness said:
Basically what you're doing is tweaking the settings for how Android frees up your memory. In theory, it should be good, because the defaults that were picked with the Android release aren't going to be appropriate for everyone. Just be careful not to be too aggressive or you might start losing functionality you want, such as alarms or background email checks.
Click to expand...
Click to collapse
Good point on not being too aggressive. The higher you set it, the more sticky sports ate pushed out of memory, so with the settings I have right now the phone kills some things that in the oat would have been running when I went back to them. I'm going to drop down from aggressive to strict and see if that's a better balance for how I use the phone.
Sent from my SCH-I510 using Tapatalk
Call me crazy but...
Android is linux based right? I.E. it uses a linux kernel? I was under the impression that was true. If so, unless you're running into the problem of completely filling RAM and having to wait for stuff to be cleared, this kind of thing will not help you!
Linux intentionally leaves commonly used items in RAM in order to decrease access time. It is perfectly normal for such a system to run at 70-80% memory usage. It is, in fact, a GOOD thing, because it means more memory is actually being put to a potentially useful purpose.
That being said, if you're actually running out of RAM I suppose something like this could help.
slight23 said:
Android is linux based right? I.E. it uses a linux kernel? I was under the impression that was true. If so, unless you're running into the problem of completely filling RAM and having to wait for stuff to be cleared, this kind of thing will not help you!
Linux intentionally leaves commonly used items in RAM in order to decrease access time. It is perfectly normal for such a system to run at 70-80% memory usage. It is, in fact, a GOOD thing, because it means more memory is actually being put to a potentially useful purpose.
That being said, if you're actually running out of RAM I suppose something like this could help.
Click to expand...
Click to collapse
Yes, yes, I frequently give the "in linux free memory is wasted memory" whenever people want to use some taskkiller app because they want a lot of free memory. This isn't about shooting for some high free memory number because we're Windows minded and think we need a lot of free memory, this is about finding the right settings for Android's own memory manager to keep the phone responsive. There's been something about my Samsung phones (except the Nexus S) where they just get laggy as hell with the stock memory manager settings.
As described above, my phone was almost unusable after a couple of hours booted up until I enabled Autokiller. Maybe something I'm running has memory leak; could be, but I pretty much run the same apps on all my phones, and the HTCs and Nexus S don't get laggy like the i9000 and Charge do.
This app, or the one named MinFreeManager really help. In the early days of the i9000 on MoDaCo site we were using the cat command to tweak the settings manually in our efforts to find a way to stop RFS lag before Voodoo came along.
I just installed this yesterday and configured it for strict mode. I also enabled all of the advanced system tweaks and so far I haven't noticed much if any difference, perhaps it depends on your individual usage and what apps, launcher, etc you're using. I'm going to leave it on and see how it goes though.
Any still using this? Any want to share what settings they use?

Performance questions - swap, RAM; Google Play Music

Hello!
I've been using XT1032 for a while as someone that's mostly new to smartphones - it's an upgrade after heavily worn out LG GT540. However after rooting it, installing official CM and updating to the latest nightlies every second day or so, I still have several problems. I'm sorry if there's too little detail in this post, I'll try to add detail later on.
First off, I don't understand how the storage space works. The phone is supposed to have 8GBs of internal memory, however only 5.5GBs are accessible to the user. Additionally, applications refuse to install when the system reports that there's ~400MBs of "space" left. Is this because of a partition being filled up? The Apps panel of system settings isn't specific what is taking up too much space and I'm afraid the DiskUsage app doesn't help either.
Second thing is the actual available RAM. It's supposed to be 1 GB, but Z-DeviceTest reports only 885MBs being available. Where's the rest? There's also swap of 255MBs that I don't know where it came from. I thought that on a low-end smartphone they wouldn't waste internal storage on swap.
There's a trick to increasing available storage space by linking the /cache folder to root. How does that work? How do I know if the folder is being used or not, and if it's safe to do this? DiskUsage doesn't show this folder normally, and when switching to it in root it's being 651MBs large, with "System data" taking up 11.2MBs and pds-CM10.img 3MBs. There's also recovery and backup folders, 56KBs and 16KBs respectively. Why is it this big anyhow, if it's not being used?
The most immediate problem, and the one that annoys me the most since I bought the phone for a certain purpose, is that Google Play Music is lagging terribly. It uses ~110MBs when I switch to the Running Apps screen from the settings quickly enough to check its stats, each song takes several seconds to load even on WiFi, no matter the quality, and the worst part is that even if it "loads up" it takes several additional seconds to scroll around it! It's not just the playing affected, the whole interface is sluggish. Screens take seconds to switch between each other, returning to the app after opening two applications makes it either "restart", where it still plays music, but you can see that the interface is now several screens back. How is it possible that in 2015 an operating system developer can't make a performant app that's not a game, that's not a video editor, but a god damn music player? The only quirk is that it's streaming the music from the net instead of playing a downloaded file. It has a cache that uses over 700MBs already, no excuses. I checked that with DiskUsage.

how to increase ram of android device

When you've had a smartphone for a while it can start to feel slow, and RAM — random access memory, which is where your phone stores its stuff as it's using it — can be part of the problem. If your phone doesn't have enough RAM it can struggle, but there are ways to address that. You can even create extra RAM without cracking the case or reaching for a soldering iron.
Find out how to increase your smartphone's RAM right here!
How to fix phone lag on Android
Android Lollipop tips and tricks
What is RAM (Random Access Memory)?
RAM is what your device uses when it's doing something. For example, when you're editing a photo both the photo and the app you're using to edit it are in the device's RAM; when you finish editing the photo is then saved to your device's storage so it can't get lost. The more RAM you have the more you can do, so for example you can have more browser tabs open, more apps running or more system features doing their stuff.
The problem with RAM is that it isn't always emptied properly, and apps don't always behave. Some apps and system processes run when you don't need them to, and others don't clean up after themselves when they quit. After a while those issues can produce noticeable results such as slow performance, lagging and stuttering, and the odd crash.
Like internal storage, RAM is a physical component of your device so you can't just stick more in. What you can do, though, is use it more efficiently — or use some clever tricks to create RAM from other kinds of storage.
RAM — shown here in desktop form — is physically limited in every device. Unlike PCs, you can't just stick more memory into your phone or tablet. / © Taringa
How to increase your RAM without root access
Now that you know ​​what RAM is, we'll show you how to preserve it. In this first part, we focus on tips for non-rooted devices. For those devices you can't magically add more memory, but you can make better use of what you've got. As a rule of thumb, the more your phone is doing the more RAM is being used, so if you can reduce what's running you can free up more memory for the tasks that really matter.
Limit widgets and live wallpapers
Widgets and live wallpapers are both pretty greedy when it comes to RAM usage. Many refresh often and occupy bandwidth, while some are continuously active. This can also cause your battery to drain faster. So remember to limit the number of them in effect to optimize your current available memory.
Animated wallpapers can take up a lot of RAM.
How to root your phone without voiding the warranty.
Disable applications
Some applications take up RAM even if they aren't currently being used, so you're getting all the downsides of unnecessary RAM use without anything to show for it. Organizing which apps should and should not be running in the background can take time, but it's worth it to improve your smartphone performance.
To disable an application, go to Settings and then Apps or Application Manager. Next, go to the All tab to get the list of all the applications currently on your device. To disable an application, tap on it, then tap Disable and confirm. Be careful not to disable everything and anything, unless you want to end up with an unstable system, but most apps that don't come pre-installed on your handset are pretty safe to disable (or delete entirely if you never use them).
Head to your device settings menu, then the apps page.
Next, tap on the app you wish to disable and tap Disable.
Disable animations
Animations often steal RAM and are quite inessential; you can manage these in the developer options. To enable Developer Options on your device, go to your Settings, then About Phone and then tap on the build number about seven times until it notifies you that you have become a developer. (Please note that this has no negative effect on your device, it just adds the developer options menu in your settings. You just need
???
tra_dax
Nice copy pasta
This is straight off Android Pit
HMpenguinify said:
This is straight off Android Pit
Click to expand...
Click to collapse
Yeah it is not even copied completely. The text is missing the last part
Why don't you post something from your own experience or your own thought, please don't copy from other sites.
I think it's called ram optimization and not increasing the ram. BTW.
max24328 said:
I think it's called ram optimization and not increasing the ram. BTW.
Click to expand...
Click to collapse
https://play.google.com/store/apps/details?id=com.swapit.expander.de&hl=en
Can't post from other sources without due credit. Thread closed.
Also given lower post count of OP, this is potentially posted to increase post count.

Few questions about RAM management on Android

Hello. First of all, sorry if I got to the wrong forum section and not writing to general topic for questions. I wanted more details/opinions on these questions.
So I have a low-end android phone (Nokia 5) (hopefully topic is not phone specific) which only has 2 GB of RAM. When phone is just booted, it can store up to like 15 applications in the background (I actually managed to store 20 applications there at some point). It doesn't matter what apps are there (heavy or light (excluding Camera (later on that))) it manages up to 15 without closing them off. But after few hours (let's say like 20 hours) the amount of apps it can hold is reduced to like 5 (it varies). Like.. I can close all the apps and reopen them again, but as soon as 6th app is opened, first opened app is closed. Simply.. The idea is that I find myself reopening apps more and more often as the time since last boot increases. I understand that my phone is limited on RAM and it couldn't hold 15 applications in the background all the time, but why exactly is this happening? What gets stored so heavily in RAM as the time since last boot increases? Settings show that amount of memory used is 1.4 GB out of 2GB (which is why I never trust that number). I've tried force closing all the applications to see if that is some app-specific, but only rebooting device "fixes" it back to 15+ apps.
And second question is: can it be that the time (those 20 hours) is shorter on Oreo? I mean.. On android 7.1.1 I would restart the device like once per 2 or 3 days to get it back to the best performance. In other words.. Time since last boot would be longer before it reduces amount of apps that can be held in the background. But Oreo is using lot less RAM on it's own which makes it weird. And my device had some issues on RAM management between android 7.1.1 and Oreo that were 'fixed' so I was wondering if it's just Oreo 'function' or those issues never were fully fixed.
Also, I was wondering if Camera applications usually take much RAM (when not in background). My phone is holding like 10 apps and as soon as I open Camera/take a picture (either stock or 3rd party) ~5+ apps are closed.
I know that my english is far from perfect, but hopefully somebody will be able to understand this scribble
Benderisas said:
Hello. First of all, sorry if I got to the wrong forum section and not writing to general ....
Click to expand...
Click to collapse
Hi ,
The RAM management on Android is very smart in Android , since an app requires more RAM , Android will close himself some app state saved in the RAM ( what you called "App Running in background") so free up RAM and allocate it to the Game/Camera/Heavy RAM usage app.
15 app running in background is a proof of the power enclosed by the Android RAM management system.
When you reboot, the RAM memory is fully cleaned and the cache files (accumulated as you open and use apps) stored in it is cleared . That's why you can store more app running in background at the boot than after 20h.
So to answer your question , yes the camera app uses a lot of RAM , since it uses the kernel a lot and fully controls camera .
I don't know which is the best in RAM management between Nougat and Oreo but keeping at mind that Android improves most of the time at each update , I will advice you Oreo.
How this helped a bit
If anything I said above is incorrect or not complete , feel free to explain why it is and correct me :highfive:
That answered my third question about camera. First question was more of what is stored in RAM that it fills up. As far as computers go as I understand is that CPU cache has separate physical location away from RAM and unused files are stored in storage.
And second question is more about likeliness if Oreo could actually be worse even though it uses less RAM.
Benderisas said:
That answered my third question about camera. First question was more of what is stored in RAM that it fills up. As far as computers go as I understand is that CPU cache has separate physical ...
Click to expand...
Click to collapse
I don't think Oreo will be worst than Nougat , because most of the changes for this update was "behind the scene" , so I think it can be better.
For the RAM memory , she's filled by the data of the apps running in background , and when you use them , they store more and more data in it that's why at the end of the day your phone can be less powerful than at the boot up.
And I don't think CPU can store anything , it's doing task rather than store the memory , that's his role.

Categories

Resources