Android Memory Management - in detail for all those questions regarding task killing - Captivate Q&A, Help & Troubleshooting

This is now android works. The way I see this, this is very much similar to "pre-fetch" concept in windows 7.
I have a 6 GB RAM laptop. Base OS uses less than 1.5 GB of RAM. But like an hour or so when I see my RAM usage, its to the tune of 3-4 GB. What I have noticed is that my most frequently/recently used apps are loaded to RAM and kept there idle. Some amount of RAM is always kept free instead of using up all RAM. This way apps start faster. When I load a different memory heavy program, it pushes the existing one out and loads this.
More or less the same in android too. When u go to any task manager app n see the running apps, u'll notice that many of the apps loaded are the ones u use frequently.
These apps do NOT use any CPU. They are just loaded to memory and kept there for quick access.
When I boot up my phone I have like 190+ MB free RAM. Though left in standy mode, within an hour, I see my free RAM fall to 80-120 MB range. I never saw it go less than 80 MB. And the apps in memory are the ones I used the last time, and the ones I use all the time.
Even if u use a task killer to kill these "inactive" apps at intervals, they would be loaded again sooner or later. That's the principle of android. So by using task killers, though u feel u r freeing up memory, in fact, u r only draining ur battery. What's the use of memory if u r not using it effectively.
Don't worry abt free RAM amount. Let android manage it. Systems are intelligent enough these days.
Hope this helps. Below is more about the same in detail.
Android Memory Management
Android is a Linux based OS with 2.6.x kernel, stripped down to handle most tasks pretty well. It uses native open source C libraries that have powered Linux machines for years. All the basic OS operations like I/O, memory management, and so on, are handled by the native stripped-down Linux kernel.
How to use memory for each application
Android’s process and memory management is a little unusual. Like Java and .NET, Android uses its own run time and virtual machine to manage application memory. Unlike either of these frameworks, the Android run time also manages the process lifetimes. Android ensures application responsiveness by stopping and killing processes as necessary to free resources for higher-priority applications.
Each Android application runs in a separate process within its own Dalvik instance, relinquishing all responsibility for memory and process management to the Android run time, which stops and kills processes as necessary to manage resources.
Dalvik and the Android run time sit on top of a Linux kernel that handles low-level hardware interaction including drivers and memory management, while a set of APIs provides access to all of the under- lying services, features, and hardware.
Dalvik Virtual Machine Dalvik is a register-based virtual machine that’s been optimized to ensure that a device can run multiple instances efficiently. It relies on the Linux kernel for threading and low-level memory management.
The Dalvik Virtual Machine
One of the key elements of Android is the Dalvik virtual machine. Rather than use a traditional Java virtual machine (VM) such as Java ME (Java Mobile Edition), Android uses its own custom VM designed to ensure that multiple instances run efficiently on a single device.
The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality including security, threading, and process and memory management.
All Android hardware and system service access is managed using Dalvik as a middle tier. By using a VM to host application execution, developers have an abstraction layer that ensures they never have to worry about a particular hardware implementation.
The Dalvik VM executes Dalvik executable files, a format optimized to ensure minimal memory foot- print. The .dex executables are created by transforming Java language compiled classes using the tools supplied within the SDK.
Understanding Application Priority and Process States
The order in which processes are killed to reclaim resources is determined by the priority of the hosted applications. An application’s priority is equal to its highest-priority component.
Where two applications have the same priority, the process that has been at a lower priority longest will be killed first. Process priority is also affected by interprocess dependencies; if an application has a dependency on a Service or Content Provider supplied by a second application, the secondary application will have at least as high a priority as the application it supports.
All Android applications will remain running and in memory until the system needs its resources for other applications.
It’s important to structure your application correctly to ensure that its priority is appropriate for the work it’s doing. If you don’t, your application could be killed while it’s in the middle of something important.
The following list details each of the application states shown in Figure (see the attached image) explaining how the state is determined by the application components comprising it:
Active Processes Active (foreground) processes are those hosting applications with components currently interacting with the user. These are the processes Android is trying to keep responsive by reclaiming resources. There are generally very few of these processes, and they will be killed only as a last resort.
Active processes include:
* Activities in an “active” state; that is, they are in the foreground and responding to user events. You will explore Activity states in greater detail later in this chapter.
* Activities, Services, or Broadcast Receivers that are currently executing an onReceive event handler.
* Services that are executing an onStart, onCreate, or onDestroy event handler.
Visible Processes Visible, but inactive processes are those hosting “visible” Activities. As the name suggests, visible Activities are visible, but they aren’t in the foreground or responding to user events. This happens when an Activity is only partially obscured (by a non-full-screen or transparent Activity). There are generally very few visible processes, and they’ll only be killed in extreme circumstances to allow active processes to continue.
Started Service Processes Processes hosting Services that have been started. Services support ongoing processing that should continue without a visible interface. Because Services don’t interact directly with the user, they receive a slightly lower priority than visible Activities. They are still considered to be foreground processes and won’t be killed unless resources are needed for active or visible processes.
Background Processes Processes hosting Activities that aren’t visible and that don’t have any Services that have been started are considered background processes. There will generally be a large number of background processes that Android will kill using a last-seen-first-killed pat- tern to obtain resources for foreground processes.
Empty Processes To improve overall system performance, Android often retains applications in memory after they have reached the end of their lifetimes. Android maintains this cache to improve the start-up time of applications when they’re re-launched. These processes are rou- tinely killed as required.
How to use memory efficiently
Android manages opened applications which are running in the background, so officially you shouldn’t care about that. This means that it closes the applications when the system needs more memory. However, most android users are not very satisfied with how it does its things because sometimes it leaves too many processes running which causes sluggishness’ in everyday performance. We can use advanced task killer/task manager and it does its job very well.
Source:
Code:
http://mobworld.wordpress.com/2010/07/05/memory-management-in-android/

NICE!!
diablo009 said:
This is now android works. The way I see this, this is very much similar to "pre-fetch" concept in windows 7.
I have a 6 GB RAM laptop. Base OS uses less than 1.5 GB of RAM. But like an hour or so when I see my RAM usage, its to the tune of 3-4 GB. What I have noticed is that my most frequently/recently used apps are loaded to RAM and kept there idle. Some amount of RAM is always kept free instead of using up all RAM. This way apps start faster. When I load a different memory heavy program, it pushes the existing one out and loads this.
More or less the same in android too. When u go to any task manager app n see the running apps, u'll notice that many of the apps loaded are the ones u use frequently.
These apps do NOT use any CPU. They are just loaded to memory and kept there for quick access.
When I boot up my phone I have like 190+ MB free RAM. Though left in standy mode, within an hour, I see my free RAM fall to 80-120 MB range. I never saw it go less than 80 MB. And the apps in memory are the ones I used the last time, and the ones I use all the time.
Even if u use a task killer to kill these "inactive" apps at intervals, they would be loaded again sooner or later. That's the principle of android. So by using task killers, though u feel u r freeing up memory, in fact, u r only draining ur battery. What's the use of memory if u r not using it effectively.
Don't worry abt free RAM amount. Let android manage it. Systems are intelligent enough these days.
Hope this helps. Below is more about the same in detail.
Android Memory Management
Android is a Linux based OS with 2.6.x kernel, stripped down to handle most tasks pretty well. It uses native open source C libraries that have powered Linux machines for years. All the basic OS operations like I/O, memory management, and so on, are handled by the native stripped-down Linux kernel.
How to use memory for each application
Android’s process and memory management is a little unusual. Like Java and .NET, Android uses its own run time and virtual machine to manage application memory. Unlike either of these frameworks, the Android run time also manages the process lifetimes. Android ensures application responsiveness by stopping and killing processes as necessary to free resources for higher-priority applications.
Each Android application runs in a separate process within its own Dalvik instance, relinquishing all responsibility for memory and process management to the Android run time, which stops and kills processes as necessary to manage resources.
Dalvik and the Android run time sit on top of a Linux kernel that handles low-level hardware interaction including drivers and memory management, while a set of APIs provides access to all of the under- lying services, features, and hardware.
Dalvik Virtual Machine Dalvik is a register-based virtual machine that’s been optimized to ensure that a device can run multiple instances efficiently. It relies on the Linux kernel for threading and low-level memory management.
The Dalvik Virtual Machine
One of the key elements of Android is the Dalvik virtual machine. Rather than use a traditional Java virtual machine (VM) such as Java ME (Java Mobile Edition), Android uses its own custom VM designed to ensure that multiple instances run efficiently on a single device.
The Dalvik VM uses the device’s underlying Linux kernel to handle low-level functionality including security, threading, and process and memory management.
All Android hardware and system service access is managed using Dalvik as a middle tier. By using a VM to host application execution, developers have an abstraction layer that ensures they never have to worry about a particular hardware implementation.
The Dalvik VM executes Dalvik executable files, a format optimized to ensure minimal memory foot- print. The .dex executables are created by transforming Java language compiled classes using the tools supplied within the SDK.
Understanding Application Priority and Process States
The order in which processes are killed to reclaim resources is determined by the priority of the hosted applications. An application’s priority is equal to its highest-priority component.
Where two applications have the same priority, the process that has been at a lower priority longest will be killed first. Process priority is also affected by interprocess dependencies; if an application has a dependency on a Service or Content Provider supplied by a second application, the secondary application will have at least as high a priority as the application it supports.
All Android applications will remain running and in memory until the system needs its resources for other applications.
It’s important to structure your application correctly to ensure that its priority is appropriate for the work it’s doing. If you don’t, your application could be killed while it’s in the middle of something important.
The following list details each of the application states shown in Figure (see the attached image) explaining how the state is determined by the application components comprising it:
Active Processes Active (foreground) processes are those hosting applications with components currently interacting with the user. These are the processes Android is trying to keep responsive by reclaiming resources. There are generally very few of these processes, and they will be killed only as a last resort.
Active processes include:
* Activities in an “active” state; that is, they are in the foreground and responding to user events. You will explore Activity states in greater detail later in this chapter.
* Activities, Services, or Broadcast Receivers that are currently executing an onReceive event handler.
* Services that are executing an onStart, onCreate, or onDestroy event handler.
Visible Processes Visible, but inactive processes are those hosting “visible” Activities. As the name suggests, visible Activities are visible, but they aren’t in the foreground or responding to user events. This happens when an Activity is only partially obscured (by a non-full-screen or transparent Activity). There are generally very few visible processes, and they’ll only be killed in extreme circumstances to allow active processes to continue.
Started Service Processes Processes hosting Services that have been started. Services support ongoing processing that should continue without a visible interface. Because Services don’t interact directly with the user, they receive a slightly lower priority than visible Activities. They are still considered to be foreground processes and won’t be killed unless resources are needed for active or visible processes.
Background Processes Processes hosting Activities that aren’t visible and that don’t have any Services that have been started are considered background processes. There will generally be a large number of background processes that Android will kill using a last-seen-first-killed pat- tern to obtain resources for foreground processes.
Empty Processes To improve overall system performance, Android often retains applications in memory after they have reached the end of their lifetimes. Android maintains this cache to improve the start-up time of applications when they’re re-launched. These processes are rou- tinely killed as required.
How to use memory efficiently
Android manages opened applications which are running in the background, so officially you shouldn’t care about that. This means that it closes the applications when the system needs more memory. However, most android users are not very satisfied with how it does its things because sometimes it leaves too many processes running which causes sluggishness’ in everyday performance. We can use advanced task killer/task manager and it does its job very well.
Source:
Code:
http://mobworld.wordpress.com/2010/07/05/memory-management-in-android/
Click to expand...
Click to collapse
Sweet!! Good Info.. But wrong Section. You should port this in the General Section to help all!

rickysa2000 said:
Sweet!! Good Info.. But wrong Section. You should port this in the General Section to help all!
Click to expand...
Click to collapse
Oh. I thought this belongs to Q&A.
Any mods here who can move this to "General" please.

This would be why when you open the built in task manager nothing or only your launcher shows up but when you open ATK multiple other programs are shown open, correct?

I found similar information while researching battery saver programs. I keep ATK when I have stubborn apps that are stuck because it is easier to get through than Android Task Manager but the auto-kill feature is always disabled. Good coverage of this info.

bclark said:
This would be why when you open the built in task manager nothing or only your launcher shows up but when you open ATK multiple other programs are shown open, correct?
Click to expand...
Click to collapse
Exactly! If all programs/processes show up, like they do in ATK, it could cause instabilities in the system when the user kills any important process knowingly/unknowingly.

trekie86 said:
I found similar information while researching battery saver programs. I keep ATK when I have stubborn apps that are stuck because it is easier to get through than Android Task Manager but the auto-kill feature is always disabled. Good coverage of this info.
Click to expand...
Click to collapse
Thanks you. Saw too many threads/posts with questions about ATK and killing tasks. So compiled this so they could all be directed to this thread.

I don't mean to go digging up old threads, but I just wanted to post my opinion here on this memory clearing ordeal.
After reading the entire thread, I am even MORE inclined to want to use ATK or something similar...
At the very bottom of the post, last paragraph, it reads -
How to use memory efficiently
Android manages opened applications which are running in the background, so officially you shouldn’t care about that. This means that it closes the applications when the system needs more memory. However, most android users are not very satisfied with how it does its things because sometimes it leaves too many processes running which causes sluggishness’ in everyday performance. We can use advanced task killer/task manager and it does its job very well.
Click to expand...
Click to collapse
Here's my take -
While there is no way to override Dalviks operations for application retention, at least while you're operating the device you can keep the memory clear by monitoring and assisting in clearing it out, manually; Which will in fact yield a performance boost for a duration of time. Based on the description of how Dalvik operates, this is true.
Exactly how long of a duration I don't know. But it is as obvious as it gets that while Dalvik memory management is indeed cool, it is far from perfect and definitely induces low memory situations that CAN in fact cause sluggish performance. That much is already known.
So, in my opinion, if you enjoy the absolute maximum performance out of your device, ATK or something similar is definitely NOT a bad idea. Though it has to be done manually and after a period of time applications are brought back into memory, clearing the memory before opening an application allows full memory access to that application and also inevitably reduces CPU load as it removes the requirement for Dalvik to "shove" other applications on idle off the memory to make room for the active applications.
Personally, I just use Task Manager. It seems much more effective at clearing the memory.

Well, there are times when my phone is on for abt a week or so without turning off or rebooting (the times when I resist flashing roms or kernels or modems) and still I hardly feel any sluggishness. And I do NOT use any task killers. I let android handle everything its way.
And there is a difference between cleaning up memory say once every couple days, and having ATK set up to free up memory every hour or two. The first one could be helpful while the second is a battery killer.

rickysa2000 said:
Sweet!! Good Info.. But wrong Section. You should port this in the General Section to help all!
Click to expand...
Click to collapse
why quote such a big post to tell this
come on
regards

strategist99 said:
why quote such a big post to tell this
come on
regards
Click to expand...
Click to collapse
^
Why necropost ?!? Come on !
(just messin with ya)
Sent from my SGH-I897 using xda premium

how about file expert's memory management options?
ok - i get what's being written at the top of this. however, i do wonder about being able to tweak things some, mainly because on file expert's memory manager there's several memory config options: gamer, multi-tasker, light user, whatnot.
i got a phone to fit in my pants pocket, so it doesn't come with tons of RAM. and it freezes quite a bit when swapping between apps. of course there could be many other reasons, but still...
file expert's options don't seem to be persistent, so it's hard to get a handle on which setting would work best. now - would there be a way of making persistent memory optimization changes? if, how?
what is an amount of free memory that would need to be there for things to be smooth? by ATK, i get south of 50Mb quite often, which seems low.
i don't really like ATK's auto-kill - don't know what it will kill, and it seems that a free memory kill-threshold would be better than one based on time.

zdoe said:
ok - i get what's being written at the top of this. however, i do wonder about being able to tweak things some, mainly because on file expert's memory manager there's several memory config options: gamer, multi-tasker, light user, whatnot.
i got a phone to fit in my pants pocket, so it doesn't come with tons of RAM. and it freezes quite a bit when swapping between apps. of course there could be many other reasons, but still...
file expert's options don't seem to be persistent, so it's hard to get a handle on which setting would work best. now - would there be a way of making persistent memory optimization changes? if, how?
what is an amount of free memory that would need to be there for things to be smooth? by ATK, i get south of 50Mb quite often, which seems low.
i don't really like ATK's auto-kill - don't know what it will kill, and it seems that a free memory kill-threshold would be better than one based on time.
Click to expand...
Click to collapse
Auto-kill is quite bad as the it kills processes that always reset.
As for your ram, you could run a Bigmem kernel. 50ram is fairly normal with regular processes and a couple extras. It all depends on what you use/run.
I would need your phone's setup to help you more towards it though.

xperia ray, snapdragon, 512Mb of RAM
don't know what bigmem kernel is or would do. i'm a noob.
the phone as above. list of installed apps courtesy titanium attached - except i've since killed ATK and now trying autokiller, which is good at least for the SD-card parameter tweaks it gives. not sure about its memory management aspects, but at least they're persistent.

list of apps
here's the list - the forum didn't take .htm
and i'm on CM7.2.
EDIT/UPDATE: unrelated to killer apps, but for those of you who came to this thread to find remedies for RAM shortage - my observation currently is that the best thing you can do to yourself is to enable swap. that, and taking out the "play store" took me from 5 crashes a day to 1 - and after half a day of multi-tasking apps i can see up to 80Mb of swap in use, with 60Mb of RAM free, and the phone still running smoothly.

How to detect if an app is in background
In the above article it is said that the memory management is completely under control of Dalvik VM and Android runtime.
Is it not possible for a device driver to intelligently check if any app in background and release memory (allocated inside driver).
onStop(): All the rendering is stopped.
Is it possible to check some app state value to see if app in background or minimized?

This is not the explanation of memory management but process management

Related

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.

V6 supercharger?

What is V6 supercharger? I've done a little research, but it isn't clear on what it is, just what it isn't. Evidently its not like any other memory manager app out there, and its usually paired with 3G turbocharger?
Main part being..
Can these be used on the D3 and what functions do they provide and how?
I've noticed some say yes it can be used on D3 and others say No dont use on D3.
I am pretty new to droid, so I may be wrong, but I think its a script that automatically tweaks Androids memory management system by tweaking the thresholds where the system OS starts closing apps in the background to free memory. The reason this helps is because Android uses this free memory space to cache certain parts of apps - for example, the homescreen is usually cached in this free space. This allows these processes to work a lot faster when called upon. If this free space falls too far, then the items cached here are removed, and you get "slow" performance and redraws.
It is different from task killer apps in that the app itself does not kill apps, but rather tweaks android's built in memory management routines and allows it to do its thing at higher thresholds.
As to if the V6 works on Droid 3, I am not sure. It does require root access, however, since mem management files require root access.
Sent from my DROID3 using XDA App

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.

[Q] Increasing free RAM memory.

I've seen threads where people said that their i9000 they have ~200 MB of free available RAM. That's really surprising. Can this be caused by a kernel?
I have around 100 MB of free RAM at most times, running CM10, stock kernel.
Sent from my GT-I9000 using xda premium
Sent from my GT-I9000 using xda premium
When you have big free RAM, it just means your Rom has only a few applications running, maybe because you removed all those apps that you feel are unnecessary or a Task Killer is killing the inactive apps.
See quote of Wikipedia on Android OS Ram Management:
"Since Android devices are usually battery-powered, Android is designed to manage memory (RAM) to keep power consumption at a minimum, in contrast to desktop operating systems which generally assume they are connected to unlimited mains electricity. When an Android app is no longer in use, the system will automatically suspend it in memory - while the app is still technically "open," suspended apps consume no resources (e.g. battery power or processing power) and sit idly in the background until needed again. This has the dual benefit of increasing the general responsiveness of Android devices, since apps don't need to be closed and reopened from scratch each time, but also ensuring background apps don't waste power needlessly.
Android manages the apps stored in memory automatically: when memory is low, the system will begin killing apps and processes that have been inactive for a while, in reverse order since they were last used (i.e. oldest first). This process is designed to be invisible to the user, such that users do not need to manage memory or the killing of apps themselves. However, confusion over Android memory management has resulted in third-party task killers becoming popular on the Google Play store; these third-party task killers are generally regarded as doing more harm than good."
GrippingSphere said:
When you have big free RAM, it just means your Rom has only a few applications running, maybe because you removed all those apps that you feel are unnecessary or a Task Killer is killing the inactive apps.
See quote of Wikipedia on Android OS Ram Management:
"Since Android devices are usually battery-powered, Android is designed to manage memory (RAM) to keep power consumption at a minimum, in contrast to desktop operating systems which generally assume they are connected to unlimited mains electricity. When an Android app is no longer in use, the system will automatically suspend it in memory - while the app is still technically "open," suspended apps consume no resources (e.g. battery power or processing power) and sit idly in the background until needed again. This has the dual benefit of increasing the general responsiveness of Android devices, since apps don't need to be closed and reopened from scratch each time, but also ensuring background apps don't waste power needlessly.
Android manages the apps stored in memory automatically: when memory is low, the system will begin killing apps and processes that have been inactive for a while, in reverse order since they were last used (i.e. oldest first). This process is designed to be invisible to the user, such that users do not need to manage memory or the killing of apps themselves. However, confusion over Android memory management has resulted in third-party task killers becoming popular on the Google Play store; these third-party task killers are generally regarded as doing more harm than good."
Click to expand...
Click to collapse
I have cm10 rom so if i didnt use any task killer im getting lags in games.. so do you have any option fir that????
If someone help me i definitely HIT THANKS....
Try changing kernel or increase RAM. Some kernels have an option to increase RAM.
Or it may be necessary to try other Roms.
I'm using C-Rom and I can say I don't experience lag on this Rom.
But some games are just too demanding on RAM, designed for 2 or quad cores, that our phone may not handle.
Which kernel you would recommend to install?

How to get the most gaming performance out of your old android phone.

If you have an old underpowered Android that you can't root for your gaming phone, you may find your phone incapable of even a moderately acceptable performance on games where it meets or even exceeds the standards set by the developer or the play store.
I myself ended up like this when my phone broke. Unfortunately, not every phone has a robust interface for maximizing performance. The inability to root just exacerbates the problem. All that leaves is apps to maximize performance. Luckily they don't have to be modern or over the counter.
So there are 3 basic areas we need to target to get the most out of our phone:
1.CPU/RAM. This is a fairly obvious one but requires much more intensive monitoring to control on older phones. We need more stringent control over background apps and processes.
2.ROM empty storage. While task managers may be not recommended on more modern phones, a paging/swap file that isn't large enough yet takes up most, if not all, of your unused ROM storage means we need apps closed out of the backgrounds whenther they're using active processors or not
3.Graphics properties: The older phones have less comprehensive settings especially the more off the big name phone brands you go. We need apps to tweak the graphics in ways we can't to make sure they're using enough resources in the right spots to handle what we're asking our phone to do
After much testing, I have found a combination of 3 over the counter apps that for me released the largest amount of storage, RAM and CPU.
The first app on my list is all in one toolbox cleaner. It's a free app with some ads. I would say the majority of the add-ons aren't necessary as there are things that cover them better further down the list.
It's on the list for 2 reasons, firstly is how it can edit programs that boot on startup. This feature is split into 2 parts, user and system. Disabling everything in both tabs here releases lots of memory. The ability to stop system apps is hard to come by and then they'd likely just restart once you did, but if they never start...
The 2nd function this app has that is of note is the ability to work in conjunction with the option in developer mode to force apps on external to move your apps from your phone memory to SD card clearing up much needed space in your phone's memory. This is very important. With minimal ROM space keeping our apps elsewhere gives us the ability to not have to limit our ability to have the apps we want available.
Now the 2nd app on the list is avast cleanup, CCleaner is practically the same app. I know in modern phones task managers are deprecated, but in an older phone they are practically necessary for any high performance modern apps.
The 2 features worth noting are the deep cleaning and hibernate options. The deep cleaning removes the hidden caches of apps, and the hibernate option closes apps and keeps them from rebooting. Yet another small tweak in memory and storage space. Now these features are subscription only in current versions of these apps. However, you can go to an APK download site and download version 5.0 of avast cleanup and the features are not subscription specific in that version. It may be there are still later versions of CCleaner and avast cleanup that offer these features subscription free. I tested a myriad of avast versions before I started jumping back to bigger version groupings as a way to save so it may not be the latest version but it's the latest major version without subscription. And let's be honest here, any phone old enough to need this article is of an old enough model to be covered by this old app version.
It's worth mentioning at this point that
it's very important to also turn off automatic app updates and uninstall any updates to any system apps you don't use since their updates take up way too much space. Both of the above apps can help you with this.
Finally we have game booster 4x. The ultra boost mode is the ticket here. Have to watch an ad to activate it without purchase but it forces your game to meet the criteria you set up with the gfx tool config.
So there are the 3 apps that make for the best gaming on old android phones in my opinion.
A few notes:
I find the best order to use these is to:
disable all boot items,
move all apps to sd,
task manager and close all,
start game booster,
restart the phone,
start avast cleanup,
quick clean,
boost, hibernate everything but game booster and the game you want to play
Then task manager from avast cleanup to the game booster (since you can even hibernate your launcher and avast shut all the other apps left open down outside the game booster as you enter it (plus it's fun to close your launcher with your task manager)).
I wouldn't use the boost button in the game booster since it can unhibernate apps sometimes.
Set your graphics parameters with the gfx config tool, enable all the options, especially ultra boost. Add your game to the list and launch.
If you still run into problems there are ways to uninstall preloaded system bloat apps through cleaning software too.
So that's pretty much the extent of what I've found to maximize old outdated phones. If you have suggestions or alternatives go ahead and post them!
I will also add that these apps are ad promoted software with subscription or paid options. There may be more robust alternatives with more options combined into one app through paid optimization software. I can't speak for those.

Categories

Resources