[Q] force app to stay in memory? - Captivate Q&A, Help & Troubleshooting

Is anyone aware of any way to force an app to stay in memory, rather than getting killed when free RAM is running low? I'm aware of how android's memory management works, lowmemkiller and oom_adj and all that, but setting oom_adj isn't persistent... as soon as you open another app it gets reset. Anyone know how to make an oom_adj setting stick? (or achieve the equivalent via some other method)?

Sure wish someone could come up with a solution for this!!

I am on Galaxy S but also very interested in this.
I found some thread where I saw explanation about how to keep default launcher in memory ( also lowering oom ) using terminal.
But I don't know how to apply same thing on any application.
I mostly need it to keep Phone.apk in memory (cached process)...
So if anyone can help that would be great.
Cheers

Related

[Q] Fix_Permissions - needed?

I am on CM 4.0.2. All my apps seem to work fine, but there seems to be some slight hesitation when lifting the app drawer - just slightly choppy. I saw a lot about the fix_permissions in console, does this address that? Or is that solely for apps that are not working? I am under the impression it does NOT help this.... but wanted to be certain. Does this mean I perhaps need to adjust my SD partitions?
Should one run that code even if all of the apps appear to be working correctly?
I did not see steps for running the script in all of the posts I saw... any help on this?
This will not help. You fix permissions to possibly help with FC.
Choppiness comes from not enough memory. Check what's running in the background and adjust accordingly. Check your comcache settings, adjust. Check your swap settings, adjust. Be advised though... there's only so much you can do, we are working with very limited hardware here.
FYI... I would really look into what's running in the background first. I run cm 4.02 with default comcache, no swapper. I have 7 widgets and it only stutters occasionaly, I barely notice. I would REALLY look into your backgrouds. Also, don't forget about GPS/Wireless location issue, that may be causing it too.
Good luck
Interesting... i use advanced task killer prior to rooting and when apps were killed i was around 55MB. Now, after root i can only get around 41MB. I never understood what made this lower... i assumed it was stuff cyan added to make his rom open. I do not use many widgets (3 maybe) and generally leave wifi and gps off.
Thoughts?

Auto Memory Manager 1.0.3

Hi guys. Just wanted to plug my app here. It's based on the work that has been happening in the "auto task killer" thread.
In a nutshell this app lets you configure Android's internal memory manager to help define when to shut down different types of apps.
Features:
- Presets and custom settings
- Works with Android 1.5+
- Sliders for easy setting of the apps.
If you have any questions just pop me and email or hit me up on twitter. This is very much a work in progress so I'll be updating it fairly often. So give it a try (QR code below) and I hope you find it useful.
Requires root access
Another good reason to root my Hero. I'd probably do that before upgrading to 2.1.
sanderg said:
Requires root access
Another good reason to root my Hero. I'd probably do that before upgrading to 2.1.
Click to expand...
Click to collapse
Sorry. forgot to mention that it requires root. If you are rooting then I would recommend flashing a 2.1 ROM since that's faster than the 1.5 ROMs. There are caveats of course since not everything is working perfectly on the 2.1 ROMs but it's working good enough for me. Call me shallow but I LOVE live wallpaper.
Could you perhaps give more information? I have set it to mainly 120MB (to test) and nothing is happening. Does it happen every x mins or something?
G8D said:
Could you perhaps give more information? I have set it to mainly 120MB (to test) and nothing is happening. Does it happen every x mins or something?
Click to expand...
Click to collapse
This works differently than a task killer. What you are doing is setting thresholds for each application type. So if you set the threshold for Empty Apps to be 120MB then Android will kill these apps when there is only 120MB left. This would be most of the time.
However these thresholds are soft settings. So if Android needs to start an app/service or the user manually initiates an app/service then these will still start as normal.
This is my understanding of how it works. (I am not an expert regarding this.) However I have noticed that Android is still starting up certain apps that seem to be useless and I haven't used either e.g. Amazon MP3. This could be something to do with the out-of-memory priority of the app. (will need to investigate this)
For me at least, I have found that using a task killer to kill all apps after you apply your settings works the best. But the app should keep things much tidier in terms of memory usage.
As mentioned above these are soft settings and I have tried setting all bars to 120MB and everything still works fine. You may or may not get the same experience but these are soft settings so the worst that could happen is that you have to reboot your phone and revert to the default setting.
In the next update the settings will be saved after reboot but you will still able to go into the app to change the setting anyway.
I hope I answered your question.

Auto Memory Mangager

Not sure if you all are familiar with this app, I haven't seen anyone speak upon it on XDA yet, so just thought I'd share my experience with it.
http://www.androlib.com/android.application.com-lim-android-automemman-wBjq.aspx
IMO, this app is pretty cool. Very simple and easy to use, although it doesn't come with detailed instructions on how to use, so I felt the need to explain a little bit about it:
Tired of lags to and from Dialer/Contacts/Call Log?
Have you ever pressed the call button to dial a number/contact and nothing happens for 10 to 15 seconds then finally the call goes through and starts to ring?
Ever went back to home screen after fooling around with an app, or web surfing the browser only to find that a widget or two is missing or is not loading/refreshing properly?
Gmail not syncing daily as it usually does?
Market taking forever to load up the downloads page or lagging connection with G-talk to promptly start the download/updates you started?
Well these are the memory/background/content provider situations that need to stay snappy if nothing else does, agree?
Then this app may or may not be the answer to all of your problems.
For me it was. First and foremost, it is a FREE app, yay! (at least to my current knowledge, unless developer has changed it)
*FYI* This app does require root permissions, so if you are not rooted this will be of no use to you.
After installing, when first opening the app, super permissions should pop up, just check the always box and press allow for root access. Close the app, then re-open.
Now, there are 4 options you may choose, DEFAULT< CUSTOM< MILD< AGGRESSIVE
Default settings will be what you see on first use, those are the default Android memory settings for your G1
Custom- self explanatory, you move the bars of each memory category according to how you prefer- *Note* the amount shown is not exact memory, it is a threshold, basically a set amount not to exceed, Your phone will automatically choose how much to use according to how much it needs, but its limitations will be set by the threshold you choose. Go ahead and make your adjustments, then click the custom button, this will save these settings. So the next time you want to re-enter those settings, just hit the custom button, and it will restore.
Mild- Simply a preset application setting
Aggressive- Another preset app setting
You choose what works best for you, I would suggest playing around with different settings until you have achieved a memory usage that gives you the most improvement, *Note* Do note mistake this as a speed app, it only controls memory, so don't expect some super fast change, but if you set it up properly, and memory is being managed to the best case scenario of your usage, speed will increase, believe me.
Start with the presets, see how they work throughout the day, if you notice no difference, or worst than it already was, change it to something else.
Personally, my best experience has been with the Aggressive preset. Its been the most effective for my phone, however; this won't be the case for everyone. Aggressive basically raises the threshold for background data(widgets,home, cache, etc.) And content provider (google apps, settings, G-talk and stuff) And Empty application- this means, IMO, the amount of free memory sitting around available, for soon to come data or apps that you might open later, I.E.- multi-tasking, Call screen, new mms or sms
It also lowers the threshold of the foreground and running apps, so that they don't suck up so much memory the phone lags before it can open other things in memory. Get it? But as I stated, different people will have different preferences.
If you haven't already, try it out! If you don't like it, or don't need it...maybe results won't change things enough for you to have any use for it, you can always uninstall, and it won't harm any memory or data on your phone.
Also, regardless of threshold settings, if you open or use more memory than threshold limits, it will not break or crash you phone causing reboots or anything like that. So don't worry. The app does not prevent you from doing anything on your phone, it simply manages it according to your use.
I hope this comes in handy for someone, as it has been more than useful for me on a daily basis. You can find more information via market or the link above.
Don't take offence to this, but any "speedup" you think you are getting from it is entirely a function of the placebo effect.
There is no advantage to forcing memory to remain "free", and in fact, doing something like this will actually make the phone SLOWER than it would otherwise be.
Android has a VERY well thought out memory management system. It keeps a record of processes running and their priorities. In the event that more memory is required for a higher priority application, it will automatically select some other application to kill off in order to get that.
What this does is it ensures that you ALWAYS have the memory FULLY utilized, which means optimal performance under every circumstance.
An unfortunate trap that you are falling into is the traditional view of memory -- for example on a DESKTOP system, you don't have anything killing off unused processes, which means that every program you open will use up more memory, so the more FREE memory you have, the more new programs you can open before it starts swapping, and therefore you aim to always have a big chunk of free memory because more free memory means more applications can be open.
Android doesn't work like this!!!
What you are doing is forcing a memory utilization threshold on the thing. This has the same effect as simply reducing the total memory available on the device. That means that important applications are *MORE LIKELY TO GET KILLED OFF*.... which has exactly the OPPOSITE effect from what you seem to be after, which is to ensure that these important applications are NOT killed off.
I could be wrong, but I believe the intent of this is to allow the Android internal memory manager to be tweaked so that certain applications/processes have a higher priority and remain in memory and those that you deem as "less important" are removed first.
Here is a thread on the Hero forum about it:
http://forum.xda-developers.com/showthread.php?t=622666
Also, here is another App that does the same thing... only it will allow the settings to persist through a reboot...
http://www.androlib.com/android.application.com-rs-autokiller-wEwp.aspx
With this App, I do not notice an increase in free (meaning useless) memory... I do notice that key processes that I deem important are still running on CM 4.2.14.1... Even after running many of the ~160 apps I have, including games...
Individual results may vary... Nobody runs the same exact configuration and apps on their G1...
L8r
@Ibcoder
That means that important applications are *MORE LIKELY TO GET KILLED OFF*.... which has exactly the OPPOSITE effect from what you seem to be after, which is to ensure that these important applications are NOT killed off.
Click to expand...
Click to collapse
But it doesn't do that, the threshold simply states a measurable amount of reserve...but not a limitation. Theres a difference. Limits and thresholds are not the same, So what you are saying is not how the app works. All apps open in memory remain in memory, of course you still have to use kill switches and task managers to control unwanted memory hogs, but the app basically controls the memory in use, thats all Im saying, so if that memory is being divided properly, responsive times will increase, I know android had its own setting of doing this, hence the word *DEFAULT*...that is what the app is for, if you don't want to let Android control your memory usage, the app gives you the option to customize it
Also, here is another App that does the same thing... only it will allow the settings to persist through a reboot...
http://www.androlib.com/android.application.com-rs-autokiller-wEwp.aspx
Click to expand...
Click to collapse
Cool app! Thanks for the link, never seen this one.
But wouldn't auto kill be the same as all the other task managers and explorer apps? Its made to kill off unwanted apps, processes, and background services to free memory right? Well, I have plenty of those, and they all work quite fine.
The app I am discussing above is not a killer, its only a manager, it just gives the proper amount of memory to the category you specify to be more important memory users, thus for saving wasted memory. It doesn't specifically kill off or make memory, just manages it.
thanx though, I will try that out.
I recently saw this new app in the Market, but was unsure what advantage it will have on performance, if any. I'll pay attention to this thread to see where the discussion leads on it's usefulness (or potential lack thereof).
TeeJay3800 said:
I recently saw this new app in the Market, but was unsure what advantage it will have on performance, if any. I'll pay attention to this thread to see where the discussion leads on it's usefulness (or potential lack thereof).
Click to expand...
Click to collapse
Ok, and I don't blame ya, that's how I test everything on xda, roms,apps, hacks, you name it....but only after I review enough good responses (preferably 3)
But on the contrary, there have been times that something was reviewed poorly, but after my own experience turned out to be great! You'll see that a lot in the android market as well, great apps with two star/3 star ratings all because some asshole didn't know how to use it, LoL
Try it dude, you got nothing to lose...won't break ya phone, but if ya want to play safe nandroid your current stuff first.
Klyentel said:
Cool app! Thanks for the link, never seen this one.
But wouldn't auto kill be the same as all the other task managers and explorer apps? Its made to kill off unwanted apps, processes, and background services to free memory right? Well, I have plenty of those, and they all work quite fine.
The app I am discussing above is not a killer, its only a manager, it just gives the proper amount of memory to the category you specify to be more important memory users, thus for saving wasted memory. It doesn't specifically kill off or make memory, just manages it.
thanx though, I will try that out.
Click to expand...
Click to collapse
As far as I know, they are pretty much the same... The XDA thread I mentioned above has both the Dev of the App you posted and the Dev of the App I posted... They both created one at around the same time... One with sliders and one with fields... The only difference I think is that AutoKiller uses a service to write the settings on a reboot...
Still playing with this to see if it makes any real difference... I know if I set the values too aggressive, then the browser reloads every time I come back to it...
I know if I set the values too aggressive, then the browser reloads every time I come back to it
Click to expand...
Click to collapse
yeah that has happened to me too.
The linux kernel keeps a buffer cache of recently used files in RAM. So whenever an application wants to access something on the flash, instead of going to the flash file system, it can just get it from the file buffer cache in RAM, a significant speed increase.
If the RAM is currently being taken up by unused android apps, then that leaves less room for the buffer cache, so in theory, by killing off unused android apps more quickly, that will allow the linux kernel to allocate more space for the buffer cache and thus speeding up the system.
Am I way off here?
Dave
lbcoder said:
Don't take offence to this, but any "speedup" you think you are getting from it is entirely a function of the placebo effect.
There is no advantage to forcing memory to remain "free", and in fact, doing something like this will actually make the phone SLOWER than it would otherwise be.
Android has a VERY well thought out memory management system. It keeps a record of processes running and their priorities. In the event that more memory is required for a higher priority application, it will automatically select some other application to kill off in order to get that.
What this does is it ensures that you ALWAYS have the memory FULLY utilized, which means optimal performance under every circumstance.
An unfortunate trap that you are falling into is the traditional view of memory -- for example on a DESKTOP system, you don't have anything killing off unused processes, which means that every program you open will use up more memory, so the more FREE memory you have, the more new programs you can open before it starts swapping, and therefore you aim to always have a big chunk of free memory because more free memory means more applications can be open.
Android doesn't work like this!!!
What you are doing is forcing a memory utilization threshold on the thing. This has the same effect as simply reducing the total memory available on the device. That means that important applications are *MORE LIKELY TO GET KILLED OFF*.... which has exactly the OPPOSITE effect from what you seem to be after, which is to ensure that these important applications are NOT killed off.
Click to expand...
Click to collapse
@dwang-agreed, as I stated @lbcoder, what he is saying is that the app holds everything in memory which slows down system, but it does not do that, and he implied that I stated it limited use of apps, which is incorrect, it does not operate as a limiter, or a kill switch, only a manager. Sort of like, organizing processes by priority based upon setting of threshold tolerance. Of course killing off unwanted apps and processes have to be done manually, via kill widgets or file explorers, When I first posted about this app I assumed that concept to be in mind of the reader....sadly I was wrong. I guess everything around here has to be put in perspective as if the reader knows nothing...sort of like an "101 handbook for Dummies" type thing.
What you are suggesting is incorrect, contrary to the product description, and quite frankly, impossible.
And you can't read.
There is no "I" in lbcoder.
Klyentel said:
@Ibcoder
But it doesn't do that, the threshold simply states a measurable amount of reserve...but not a limitation. Theres a difference. Limits and thresholds are not the same, So what you are saying is not how the app works. All apps open in memory remain in memory, of course you still have to use kill switches and task managers to control unwanted memory hogs, but the app basically controls the memory in use, thats all Im saying, so if that memory is being divided properly, responsive times will increase, I know android had its own setting of doing this, hence the word *DEFAULT*...that is what the app is for, if you don't want to let Android control your memory usage, the app gives you the option to customize it
Click to expand...
Click to collapse
lbcoder said:
What you are suggesting is incorrect, contrary to the product description, and quite frankly, impossible.
And you can't read.
There is no "I" in lbcoder.
Click to expand...
Click to collapse
First and foremost buddy, I quite frankly don't give a dam how you spell your name with an "I" or an "L"
Secondly, what I am stating is not incorrect, and is possible, because I have the app, use it everyday, and does exactly what I said it does via OP. Thank you very much. If you disagree, then don't download the app. Simple as that.
or heres a better idea create one of your own. I will be more than happy to try it if you feel you can do better, but don't downsize the quality of this one, straying other users away from trying it, as it may be as useful to them as it is me. Got it?
Now get ya DREAM on...(with android that is )
and leave me alone.

[Q] All apps seem to load on startup

Hi,
It appears that any time I reboot the phone, it starts with all applications loaded.
Unless I go to Advanced Task Killer and kill all, my phone is very slow. Also free memory jumps from about 90M to 150M after the kill.
Does anyone know ho to stop that from happening? Is there some kind of startup list that can be edited?
I am using rooted UCJH7 but no other tweaks and fixes.
Thanks
You could have just searched the market for 'startup'.
There are quite a few startup editor apps in the market, I haven't tried any, but most of the reviews seem pretty hit or miss. Just search "startup" in the market.
Well android handles memory management really well. Those apps load up and take a very small amount of memory and when you open the app it will increase the memory usage and when you close it it will run in the background again and take up very little memory. The fact the apps are open in the background shouldn't slow down your phone. The fact you have 90mb free is good. This isn't windows mobile where the more free memory you have the faster your phone is. There are apps u can use to see if your apps are running in the background or foreground when your not using them. If they are running in the foreground and taking up alot of memory then there's a problem. Hope i explained the memory management well enough.
And btw for future reference, read the stickies. You posted this in development. Should be posted in Q and A
jasonyump said:
Well android handles memory management really well. Those apps load up and take a very small amount of memory
Click to expand...
Click to collapse
The fact remains, free memory almost doubles after I kill them.
>The fact the apps are open in the background shouldn't slow down your phone.
The fact is that they do slow down the phone a lot.
The problem is that it seems that all applications get fired indiscriminately. And the question is if someone with some knowledge of Android internals can shed some light on that.
I will post specific numbers on memory after I reboot it next time.
alexnoalex said:
Hi,
It appears that any time I reboot the phone, it starts with all applications loaded.
Unless I go to Advanced Task Killer and kill all, my phone is very slow. Also free memory jumps from about 90M to 150M after the kill.
Does anyone know ho to stop that from happening? Is there some kind of startup list that can be edited?
I am using rooted UCJH7 but no other tweaks and fixes.
Thanks
Click to expand...
Click to collapse
i too thought so initially. but when i started observing, i observed that the apps that load up at start up are generally the apps that i frequently used.

[Q] ROM with much RAM free

Hello,
I'm looking for a good ICS ROM with much RAM memory free.
I know there are many good ones like RocketRom, but the RAM is priority for me, as I use a lot off apps and I don't want them to get killed every time I exit them.
The ROM may be stock based (best) or even some other type.
Do You know some You could recommend?
PS. They don't have to be fast as hell.
Admin please don't close this thread.
try bulletproofing them and freezing/removing unwanted apps.
Also try to set autostarts off for apps you only want to run on request as well as proper exiting them to prevent running ram.
granted its android that should optimize ram usage which is why amount of free ram shouldnt impact, but yet it does.
maybe you have set dont keep activities to on development settings if so, disable it. lol.
Other tweaking can be done with minfree and oom levels to lower values, stock however they are pretty low.
last random thing I can come up with is less memory footprint apps. Alternatives for ones you are using. Lol. Goodluck!
Sent from my GT-N7000 using Tapatalk 2
baz77 said:
try bulletproofing them and freezing/removing unwanted apps.
Also try to set autostarts off for apps you only want to run on request as well as proper exiting them to prevent running ram.
granted its android that should optimize ram usage which is why amount of free ram shouldnt impact, but yet it does.
maybe you have set dont keep activities to on development settings if so, disable it. lol.
Other tweaking can be done with minfree and oom levels to lower values, stock however they are pretty low.
last random thing I can come up with is less memory footprint apps. Alternatives for ones you are using. Lol. Goodluck!
Sent from my GT-N7000 using Tapatalk 2
Click to expand...
Click to collapse
I have used about 170 apps on my SGS2, now I've reduced them to about 120. I have also deleted some system apps, but the problem is android OS.
Killing apps is disabled for 100%, it's just due to 70MB memory free. The launcher is killing almost every time I turn on some other app (build.prop edit didn't stop it from closing).
Android just uses too much RAM. Fresh ROM uses 400+ MB, that's so much.
That's why I'm looking for some ROM that uses max.300MB. Are there any?
I wish I could have ROM from my xpiera x10, which used max 120MB hehe
jakuburban said:
Hello,
I'm looking for a good ICS ROM with much RAM memory free.
I know there are many good ones like RocketRom, but the RAM is priority for me, as I use a lot off apps and I don't want them to get killed every time I exit them.
The ROM may be stock based (best) or even some other type.
Do You know some You could recommend?
PS. They don't have to be fast as hell.
Admin please don't close this thread.
Click to expand...
Click to collapse
These type of threads are not allowed....as the best is up to the individual to figure out, what is best for me, may not be best for you....

Categories

Resources