[Q] Resident in Memory - Galaxy Note GT-N7000 Q&A, Help & Troubleshooting

Hi. Just a general question about resident in memory. I noticed in the Xposed Apps Settings Module there is a "resident" option you can select.
As I understand, this allows you to keep your program in memory, presumably so that it starts up faster. Are there other good reasons to keep programs resident? For example is this a way to improve multitasking experience? Can it hurt performance because, if overused, you can start hogging too much memory? Another situation: sometimes I would edit a file using Polaris and then put it in "background" by pressing home button. Most of the times I can return to where I left off in Polaris via recent apps but sometimes the new changes are missing. This usually happen after some heavy usage or after several hours had passed. So, besides just saving changes, would selecting "resident" for Polaris prevent this from happening?

Related

Does keeping your home app in memory drain more battery?

I don't know if it's me or setting "Home app in memory" on CM drains waaay more battery.
I have 1600 mAh battery that usually lasts 8 AM to midnight and still has 20-30% left. Whereas when I set my phone to keep home app in memory, the battery is under 50% before noon.
It sure will!
And this is why:
When you run a new program and the memory is filled, things need to be dumped from ram to make space.
The home application ONLY needs to be run while you are on the desktop -- it doesn't actually do anything when you have some other application in the foreground. If you force it to stay loaded in memory, then other things (background processes) will get dumped from memory instead -- things that need to be running more or less all the time. So what happens when you force the home application to stay in memory, is that these background processes get into a crazy cycle of constantly trying to RELOAD. Maybe bumping some other stuff out of memory to do so, causing those other things to get into constantly trying to reload. In other words, it causes a much higher CPU load and eats up your batter.
Makes sense, but is there anything that could help, like enabling compcache or swap?
lbcoder said:
It sure will!
And this is why:
When you run a new program and the memory is filled, things need to be dumped from ram to make space.
The home application ONLY needs to be run while you are on the desktop -- it doesn't actually do anything when you have some other application in the foreground. If you force it to stay loaded in memory, then other things (background processes) will get dumped from memory instead -- things that need to be running more or less all the time. So what happens when you force the home application to stay in memory, is that these background processes get into a crazy cycle of constantly trying to RELOAD. Maybe bumping some other stuff out of memory to do so, causing those other things to get into constantly trying to reload. In other words, it causes a much higher CPU load and eats up your batter.
Click to expand...
Click to collapse
Wow...great explanation. Thanks! I'll disable this setting then.
Neejay said:
Wow...great explanation. Thanks! I'll disable this setting then.
Click to expand...
Click to collapse
It's a trade-off. For me returning to the home from any app is way to slow unless I have that feature enabled.
Maybe it's because I have a widget and 8 icons on the main screen?
I have 2 widgets and 4 icons on home screen (total of 7 widgets and 25 icons on 5 screens) so for me disabling "keep home in memory" is not even an option lol
Even just having a lot of applications installed will make it take longer for launcher to start up.... it has to scan through all the programs installed, figure out what icon to use (and deal with it), figure out what name to use, build the menu, etc., etc., etc.
wheres the option for this?
You can find it in Spare Parts app on several ROMs (I use CM).

Effect of installing many apps

I've downloaded to my LG Optimus Black 30 apps til' now, I'm on Zeus V2.1
When I had the stock rom I had 100 apps!!
Does installing many apps necessarily slow down the phone? or It doesn't have to affect on the phone memory and speed?
On the one hand, I know that the phone is a lot faster when It has only few apps, and on the other hand, I have an Android Phone, Why not to have funny apps like lighter and games. What's your opinion?
Short answer: Mostly less is more...
Means: A lot of apps stay in memory and slow down ur phone, as u alread answered to urself, some even keep running in background and can keep the cpu from going to deep sleep mode, if they are not programmed well.
So yes, many apps slow down ur phone
Well, to describe it correctly, i would like you to explain that it's not the "numbers" of applications that matters.... I mean, we have a whole one GB of internal space, so we can easily afford 100+ applications.
So, it's actually the "type" of applications that give you a considerable effect on your device's performance.
# Example : i have installed TorrentFreak reader application. When i open it to read TF articles, it opens... when i exit it, it exits... shuts down completely. Now, i have installed UNO game from glu, which even if i don't open, it brings me advertisement notification.
So, the moral of story is, if i have installed hundreds of applications like TFreader, they won't cost me any RAM or any battery usage if i don't use it. But if i install just 10-15 apps like UNOgame of glu, they will use my data connection, RAM etc. in background even if i hardly use them.
So, always choose the application wisely, that's the point. Check their permissions, see if they add any "services" that may keep consuming your cpu cycles..... and you are good to go.

How to stop "running" and "cashed processes"?

I know that android is very good at handling background processes and ram but I have so many apps that I don't use at all. They consume big amount of ram and for instance, sometimes browser loads pages again when I get back to it from another app. I assume this is because of ram. So I guess, if I can shut down some running apps in the background, available ram would be more.
I can see them at settings-apps-running(or cached processes).
For example, right now in "running" section I have 9 processes and 3 of them are poweramp, awesome beats, accuweather.com and in "cached processes" I have 10 processes and 6 of them are beautiful widgets,calendar storage,google account manager, google search, calendar, google play store. Other processes are system services that I have no problem with. When I go to developer settings-background process limit and block them, there are no cached processes anymore but that probably has a side effect. I wish I could choose which apps I want in the background.
I can shut down these apps manually but every time I restart the phone, they are there again. How can I stop them?
if you rooted, you can use Autostarts or ROM toolbox from the playstore. it can change the receivers of the apps not to start at boot
CooLasFcuK said:
I know that android is very good at handling background processes and ram but I have so many apps that I don't use at all. They consume big amount of ram and for instance, sometimes browser loads pages again when I get back to it from another app. I assume this is because of ram. So I guess, if I can shut down some running apps in the background, available ram would be more.
I can see them at settings-apps-running(or cached processes).
For example, right now in "running" section I have 9 processes and 3 of them are poweramp, awesome beats, accuweather.com and in "cached processes" I have 10 processes and 6 of them are beautiful widgets,calendar storage,google account manager, google search, calendar, google play store. Other processes are system services that I have no problem with. When I go to developer settings-background process limit and block them, there are no cached processes anymore but that probably has a side effect. I wish I could choose which apps I want in the background.
I can shut down these apps manually but every time I restart the phone, they are there again. How can I stop them?
Click to expand...
Click to collapse
The simple answer is that you don't need to stop them!
As you say, Android is already very good at keeping track of background processes, to the extent that if a new program needs more RAM, Android itself will kill a background process that hasn't been used for a while to free up RAM for the new program.
The Cached processes screen SHOULD be full of recently used programs; it shows that Android is doing what it is supposed to do and is shifting inactive processes out of active RAM in case you want to load it again, without completely dumping the process memory.
Now, as for the side effect you mentioned, that would be a significant hit on battery life. By holding programs in RAM as it is supposed to do, the OS can load the program quickly and cleanly and more efficiently by simply reading the RAM rather than reading flash, writing to RAM, then reading from RAM. The general mantra for UNIX based systems is that unused RAM is wasted RAM.
Another thing to note is that if you do not close tabs when switching active programs (including going to homescreen) then the Browser is designed to hold that tab in memory. Even if you close the Browser (excluding closing the tab specifically with the "little x"). Even if you reboot the damn phone, it will still load the tabs/pages you had open last. The pages are not held in memory as such, just what was open and what tab order, so if you do open the browser after a while, it will load the last page from scratch.
TL;DR version: The running and the cached processes will remain exactly where they are until a new program needs more RAM than is available, at which point Android will kill something to make room. You do not need to do this manually. It will cause more power drain by making very inefficient use of RAM/Flash memory. Empty RAM is wasted RAM.
whilst Chaos is right, I notice severe performance drops when ram is filled, despite Androids theoretical advantage. It doesnt work...
Best to prevent from loading altogheter.
Root, lose warranty, backup apps, uninstall or freeze apps so the bloatware is removed.
For others, change autostart settings in Romtoolbox. So they wont start on boot.
Search for safe stuff to delete. There are lists for that
Sent from my GT-N7000 using Tapatalk 2
Or just dont install the apps that you dont really need.
Via GtN7000
LoVeRice said:
Or just dont install the apps that you dont really need.
Via GtN7000
Click to expand...
Click to collapse
Lol, even then you might still need to remove bloatware lol
Sent from my GT-N7000 using Tapatalk 2
Thanks so much for detailed answers.

How much of a difference does closing apps make?

Hi, i'm thinking of buying an HTC one and i can't wait for it and i wonder how much of a difference does closing apps make in terms of battery life because it is obvious that having apps running in the background makes the OS feel a lot faster and if it's a minor downside than i'd rather have the upside of having those running in the background.
Hahaahahahahahahahahaahaha. Closing them neither increases battery nor makes the system feel faster... Have you come from an iPhone? (It doesn't make a difference on iPhones either)
nope im coning from glaxy nexus and it does make a difference in it though
According to what I've read, the newer android systems freeze the apps while in the background. I don't know what apps you'd keep open in the background, though. The only one I have keep running is my browser.
Im asking that if im surfing on net and then have to go somewhere, do i have to close apps and then put the phone in my pocket or is just locking your phone and putting it in your pocket is fine.
battle1 said:
Im asking that if im surfing on net and then have to go somewhere, do i have to close apps and then put the phone in my pocket or is just locking your phone and putting it in your pocket is fine.
Click to expand...
Click to collapse
I just lock the phone and put it in my pocket. Does fine for me. I get awesome battery life. Usually your screen is what eats up your battery anyways, again I say usually ;p (always an exception somewhere). Out of all the android phones I've had, this one has the best battery life. Not saying there aren't better, but I can go a whole day with moderate use and still have a little juice at the end of the day. Now granted, if you were playing music, you may want to stop that first, but I figured that was common sense...
battle1 said:
Im asking that if im surfing on net and then have to go somewhere, do i have to close apps and then put the phone in my pocket or is just locking your phone and putting it in your pocket is fine.
Click to expand...
Click to collapse
Just minimize it to the recent apps tray, you can just restore the app where you left off ... Android manages apps extremely efficiently so you don't need to close them, force stop them in settings, use a task manager or any of the above. It actually drains your battery more to kill apps and have them start again, especially system apps that constantly run, than it does to just leave them running.
when you pause an activity (hit the home button, rather than the back button - or venture off to a different activity)
The app does not continue running, however it does preserve the application state (as long as dalvik doesn't kill it, due to higher priority memory allocation requests)
Apps can launch background services, which are NOT paused in the same way (depending on how they are created, of course). In order to force kill all services associated with an app, you'll have to use the app manager.
---
As far as performance/battery impact:
- You'd think "Oh, if i pause 50 apps then i'm going to run out of memory?" NO - the dalvik will kill them in the order it deems necessary to ensure a certain amount of memory is always free.
- This also means you cannot count on a paused app ALWAYS being where you left it off. In the middle of writing an important email? pause the app, go look something up in chrome, and come back to the email it MAY or MAY NOT BE where you left it off. (The dalvik could have killed it)
- Paused apps do not account for any CPU time, therefore there is no battery impact.
Services MAY account for cpu time depending on what they're doing - and they will run even when the app is killed depending on how they were registered.
So even in my Galaxy Nexus it's actually better if i don't swipe all the recent apps?

Over-aggressive background task and notification killing on Honor 7 Lite (NEM-L21)

I'm on Honor 7 Lite (NEM-L21C432B356), I love the phone hardware itself but the stock OS (EMUI 5.0.2) is driving me crazy. Background tasks get killed really quickly and often notifications get deleted before I can even see them. I've tried factory reset and everything I've found on Google to no effect.
This isn't about the known push notifications issue. Notifications do work, but then they usually disappear almost immediately. I sometimes hear the notification tone, pick up the phone and unlock it to see a notification icon in the top bar for less than a second and then it's gone. Or if a notification comes in when I'm using the phone, I might see the notification in the list briefly and then it just vanishes.
Background tasks like Twilight or JuiceSSH with statusbar icons seem to get killed really aggressively. This seems to happen more to some apps than others, but I can't figure out any common denominator for the apps. It happens to both online and offline apps.
I've disabled everything related to Huawei's task killing/battery saving settings and added all apps to all exception lists that I've been able to find. Free memory seems to hover consistently around 500-700MB, I don't think I've ever seen free memory dip below 500MB.
It's hard to get good memory stats out of Android 7 without root, but it almost seems like the OS is pre-emptively keeping that 0.5GB of RAM free in case some foreground app wants a lot of memory, and it's willing to pre-emptively kill background tasks, even ones with status bar icons, to achieve it. I don't know if this is true, but Huawei doesn't seem to trust Android's own memory management much in general, with all their dumb "memory cleaning" and "battery optimization" stuff.
I'm at my wits' end here. I rely on seeing all notifications to keep up with reminders and other things, and I need background apps to stay there when I multitask. Custom ROMs aren't really an option, since I want everything on the phone to Just Work without any extra fiddling and hassle and I can't risk my only phone. I appreciate custom ROM developers' work though.
Thanks in advance for any useful answers.
On the P9 Lite with 2 GBs of RAM they are using more than 1.5GBs of zRAM which is crazy. I don't think that's needed at all. If your phone is rooted, you can install a Magisk module called Swap Torpedo to disable swap and maybe change some LMK values. Also you can disable the Power Genie app if you don't have root access.
erayrafet said:
If your phone is rooted, you can install a Magisk module called Swap Torpedo to disable swap and maybe change some LMK values. Also you can disable the Power Genie app if you don't have root access.
Click to expand...
Click to collapse
I'm not rooted, because unlocking the bootloader and rooting would trip SafetyNet, which I can't afford because I need some apps that depend on SafetyNet and I don't want the whole cat and mouse game with Magisk trying to keep ahead of Google on that.
Thanks a lot for the Power Genie tip (called Power Genius on my phone), I haven't seen that mentioned anywhere else and will try it out. I hadn't noticed that process at all since it's running under AndroidSystem.
Edit: unfortunately the "Disable" button is grayed out on Power Genius, so disabling it doesn't seem like an option. I can stop it manually, but I assume it'll just get autostarted again. I don't seem to have permissions to hide it from adb shell either.
Same problem here (NEM-L51C432). It aggressively kills all background applications. This prevents multitasking. It is annoying to see a lot of RAM is free and will not be used. RAM is there to take use of it and not to keep it free.

Categories

Resources