• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Help Freeing up RAM

Iowabucks

Newbie
Hey everyone, My MT runs off of CM7, and runs pretty good. I have had it for maybe 3 weeks. Quite a step up from the super slow Samsung Intercept i had before.

I know it has 512mb's of RAM. I keep an eye on it through a clock widget on my homepage. For the most part after reboots, i may see it in the 200mb range. After it's been used awhile it sometimes gets lower than 50mb. Thats when it starts to get laggy. Do these numbers sound about normal for you Triumph users?

I had Advanced Taskiller on my Intercept which seemed to do a good job of freeing up RAM on a phone that never had much RAM in the first place. I see where most people say to stay away from appkillers for it may do more harm than good.

I only have maybe 10 extra apps after what CM7 and Googleapps installs. Doesn't seem like enough to slow it down but it does eventually.

Are there other ways to free up RAM to keep my Triumph running fast?
 
It isn't the lack of RAM that is causing the phone to become laggy, it is the task killer.

Android is optimized to run at near memory capacity for both better responsiveness and battery life. The task killer interferes with this optimization.

Android preloads the apps you use most into memory which uses no more battery when full than empty. They are not using processor power while in memory, they are just sitting there. When you are ready to use the app, it will load faster because it is already loaded. Over time Android will learn what apps you use most, and load those before it loads ones you may not use.

When you use a task killer, Android will recognize the empty memory and refill it (possibly with the recently killed apps) in order to maintain optimal performance. In essence the task killer and android are "fighting" with each other over the memory and using processer time in the battle. This makes fewer processor cycles available for the app you are trying to use, hence, the laggy feeling.

I hope this makes sense.
 
Ok, i understand what your saying. But i don't use Taskiller with my Triumph, just the last phone i had, the Intercept.
 
Sorry, must have misread your post. I haven't used CM7 in a bit, but I seem to remember the being a setting in there that allowed you to set the amount of free memory android would maintain. That might do what you are looking for.
 
Usually on the Triumph, I would see about 80mb free (give or take), although sometimes less and sometimes more. Don't use a task killer, it is completely unnecessary and counterproductive.
You can manually kill apps if you really feel like it is needed by going to menu>settings>apps(click on the running tab) press on the app and there shuld be an option to stop it in there. I am not sure if the menu options are exactly as I have listed, but it should be close enough for you to figure out easily.
 
Also like Unforgiven said there is a file you can edit to adjust those settings.
Here is a link from the original CM7 thread with instructions (although with the current build they may have enabled an easier way):
Memory Tuning
This series of ROMs in B.05 and later have a reasonably easy to change memory allocation feature allowing you, the user, to select how low memory can get before the kernel starts killing things off. The file is in /system/etc/init.d/99memory. You will need to mount the /system directory read/write to be able to change this file. If you know how to use "vi" you can edit the file directly on the phone, edit it using something like ES File Explorer in "root" mode, or use "adb pull" and "adb push" to obtain and then re-write it (after re-mounting the /system area for writes.)

Do not alter the top of this shell script! The top portion causes the file to be loop-executed exactly once; when the phone boots this file runs quite early in the boot sequence, and the base command to set memory allocations in the init runs after this file does. To prevent this from being un-done immediately the code intentionally backgrounds a copy of itself, waits 2 minutes, and then executes the memory settings.

The second-to-last line sets the parameters. The defaults are reasonable but may allow the system to get lower on memory than you'd like. It is strongly recommended that you not tamper with the first three values. The last three are in pages (4,096 bytes each) and set the parameters for most ordinary applications, backgrounded things and un-attached data providers. A reasonable "more aggressive" setting from the default is 10000,25000,32000 for these three numbers. If you get too aggressive (too large) the phone will shut down virtually anything you background, obviating most multi-tasking. If you get too "open" then the phone will get slow as it runs low on RAM. The defaults are reasonable but you should consider tuning this to suit your particular mix of things you do. The values should always be in ascending order as well. This table is likely to change fairly regularly with new releases of the code, so if you have a particular personal preference do check it on each new load if you've changed it from the defaults (or like the present defaults!) Reboot to activate your changes.
 
CM7 has a memory leak in our build, and you need really aggressive minfree setting to keep some ram free.

I wouldn't use an auto task killer but I keep advances task killer on my phone set to not autokill as an easy interface to manually kill apps I don't need running.

Honestly I think androids internal memory manager is garbage. It always keeps apps in memory too much and when you go to launch a new one you get lag while it swaps out unused pages for the ones you need. Even with aggressive might free settings, the internal task killer don't work like it should. You don't need alot of free memory but once the memory free gets close to the suze of the Vm heap, its starts having trouble managing swapping out memory pages. I think Google needs a redesign of the memory managing code in the os.
 
Back
Top Bottom