[REF] Simple way to increase free RAM in Dexter's Froyo

Search This thread

en0203

Senior Member
Jun 29, 2010
139
5
Hi all,

I believe many are having problems with low free RAM in Dexter's Froyo. The reason why available RAM is always low in XT720 Froyo is that the low memory killer level limit has been lowered. Here's the comparison of low memory levels between 2.1 and 2.2 (didn't check 2.2.1 though as I am on Dexter's 1.1 release):-

2.1
Foreground App: 12 MB
Visible App: 18 MB
Secondary server: 36 MB
Hidden App: 42 MB
Content provider: 48 MB
Empty App: 48 MB

2.2
Foreground App: 6 MB
Visible App: 8 MB
Secondary server: 16 MB
Hidden App: 20 MB
Content provider: 32 MB
Empty App: 32 MB

The difference shows that at 2.2 empty apps will only be killed at 32MB and hidden apps at 20MB compared to the original 2.1 where empty apps will be killed at 48MB and Hidden Apps at 42MB. So in order to gain back the same amount of free RAM as 2.1 we can modify the low memory killer levels to:-

Foreground App: 6 MB
Visible App: 8 MB
Secondary server: 16 MB
Hidden App: 42 MB
Content provider: 48 MB
Empty App: 48 MB

This should bring back the same amount of free RAM in 2.1. However, this also means that the backend apps would be killed off easier compared to the original settings in 2.2. Free RAM only comes handy if you need to run memory intensive apps/games. For day to day usage the default setting is probably better because more apps can be kept in the memory (faster switching) so change at your own risk.

To change the low memory killer level, I used a free app called "MinFreeManager" from App market.

Do feedback your experience so that we know the overall experience when low memory killer level is changed. If the overall experience is good, we can probably get Dexter to change the default low memory killer level in his ROM.

Cheers.
 
Last edited:
  • Like
Reactions: Mioze7Ae

trajano

Senior Member
Dec 14, 2010
65
5
Removing some apps instead

I just removed some of the built in apps that I don't use such as world clock widget (9MB) and OpenRecovery.apk (11MB) to free up some RAM since it appears in OS Monitor even if I don't use it.

I also removed Email, MotoGAL, Car Portal and such. However, I don't think they use up any background memory.

AccuWeather does take up memory, but I do use it so no biggie there.

However, the end effect is the RAM is still small, which is fine, but you would have more RAM available to be freed up when needed.
 

R-D

Senior Member
Dec 19, 2010
148
56
These appear to be set in the init.mapphone_umts.rc in ramdisk.tar

It contains the following settings with a note that these are 4k blocks, so the first line for example would be: 1536*4096=6291456 bytes or ~6MB as reported in the app you are using.

Code:
    setprop ro.FOREGROUND_APP_MEM 1536
    setprop ro.VISIBLE_APP_MEM 2048
    setprop ro.SECONDARY_SERVER_MEM 4096
    setprop ro.BACKUP_APP_MEM 4096
    setprop ro.HOME_APP_MEM 4096
    setprop ro.HIDDEN_APP_MEM 5120
    setprop ro.CONTENT_PROVIDER_MEM 8192
    setprop ro.EMPTY_APP_MEM 8192

And just below that:

Code:
    write /sys/module/lowmemorykiller/parameters/minfree 1536,2048,4096,5120,8192,8192

If you want to make permanent change without 3rd party app, you can play with settings here it seems.

I cant see an app being allowed to take up 48MB of background RAM ...
 

en0203

Senior Member
Jun 29, 2010
139
5
These appear to be set in the init.mapphone_umts.rc in ramdisk.tar

It contains the following settings with a note that these are 4k blocks, so the first line for example would be: 1536*4096=6291456 bytes or ~6MB as reported in the app you are using.

Code:
    setprop ro.FOREGROUND_APP_MEM 1536
    setprop ro.VISIBLE_APP_MEM 2048
    setprop ro.SECONDARY_SERVER_MEM 4096
    setprop ro.BACKUP_APP_MEM 4096
    setprop ro.HOME_APP_MEM 4096
    setprop ro.HIDDEN_APP_MEM 5120
    setprop ro.CONTENT_PROVIDER_MEM 8192
    setprop ro.EMPTY_APP_MEM 8192

And just below that:

Code:
    write /sys/module/lowmemorykiller/parameters/minfree 1536,2048,4096,5120,8192,8192

If you want to make permanent change without 3rd party app, you can play with settings here it seems.

I cant see an app being allowed to take up 48MB of background RAM ...

thanks for the info. I am still testing the phone so I am not making the value permanent yet. will do so if I find the settings good. as I mentioned in the first post, the stock settings is probably fine so I may just keep the stock settting. the only advantage I see setting the killer level higher is that it kills off many unwanted background apps for me saving me a bit of battery juice. but that also means that multitasking apps get killed off earlier.

cheers.
 

Mioze7Ae

Retired Recognized Developer
Dec 27, 2010
2,153
2,053
Queen City of the West
Google Pixel 7
Another app for setting these is Autokiller Memory Optimizer. The defaults on 2.2.1 (Dexter's stock221 v1.2b) are:

Hidden App: 20 MB
Content provider: 32 MB
Empty App: 32 MB

I've been testing the "Moderate" (30,35,40) and "Optimum" (40,50,60) presets. Optimum worked well on 2.1 but sometimes seems like it may be a little too aggressive for 2.2.1 so I've mostly stayed at Moderate lately.
 

Mioze7Ae

Retired Recognized Developer
Dec 27, 2010
2,153
2,053
Queen City of the West
Google Pixel 7

Beako

Senior Member
Jul 31, 2010
236
9
Toronto
How necessary is it to use Autokiller Memory Optimizer? I'm still on 2.1 and I'm not sure if I want to upgrade (or downgrade :p) to Dexter's 2.2 with all of these low memory issues.
 

c19932

Senior Member
Jun 9, 2010
1,407
152
Google Pixel 6
hey guys, Im a battery freak and I've removed/disabled almost every app that is unnecessary to extend battery life (I even disabled motorola thumbnailservice and hiddenmenu, lol). My memory is almost 99% above 60mb at all time. does that mean doing such changes suggested in this thread is pointless for me? Is there any diadvantages to set all the values to 60mb? thank you
 
V

Vistaus

Guest
Is there any way to remove Google Talk? It keeps running as a service, but I don't use Talk at all.
 

khalpowers

Senior Member
Jul 29, 2010
611
787
Guys...download super box from market.Can free ram up to 80+ without kill the apps,.:)
 

Woody

Retired Admin - Vacationing in Nanda Parbat
Nov 18, 2010
8,842
16,519
Immersed in Dark Matter
How? I have Superbox and want 80mb of ram and am pretty stationary at around 35-40. Might spike at 51 or so but never higher than that. I have looked at background and forground and just maybe not seeing the right things.

Btw using your Steelblue rom.
 
  • Like
Reactions: Sachintha chaminda

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Hi all,

    I believe many are having problems with low free RAM in Dexter's Froyo. The reason why available RAM is always low in XT720 Froyo is that the low memory killer level limit has been lowered. Here's the comparison of low memory levels between 2.1 and 2.2 (didn't check 2.2.1 though as I am on Dexter's 1.1 release):-

    2.1
    Foreground App: 12 MB
    Visible App: 18 MB
    Secondary server: 36 MB
    Hidden App: 42 MB
    Content provider: 48 MB
    Empty App: 48 MB

    2.2
    Foreground App: 6 MB
    Visible App: 8 MB
    Secondary server: 16 MB
    Hidden App: 20 MB
    Content provider: 32 MB
    Empty App: 32 MB

    The difference shows that at 2.2 empty apps will only be killed at 32MB and hidden apps at 20MB compared to the original 2.1 where empty apps will be killed at 48MB and Hidden Apps at 42MB. So in order to gain back the same amount of free RAM as 2.1 we can modify the low memory killer levels to:-

    Foreground App: 6 MB
    Visible App: 8 MB
    Secondary server: 16 MB
    Hidden App: 42 MB
    Content provider: 48 MB
    Empty App: 48 MB

    This should bring back the same amount of free RAM in 2.1. However, this also means that the backend apps would be killed off easier compared to the original settings in 2.2. Free RAM only comes handy if you need to run memory intensive apps/games. For day to day usage the default setting is probably better because more apps can be kept in the memory (faster switching) so change at your own risk.

    To change the low memory killer level, I used a free app called "MinFreeManager" from App market.

    Do feedback your experience so that we know the overall experience when low memory killer level is changed. If the overall experience is good, we can probably get Dexter to change the default low memory killer level in his ROM.

    Cheers.
    1
    How? I have Superbox and want 80mb of ram and am pretty stationary at around 35-40. Might spike at 51 or so but never higher than that. I have looked at background and forground and just maybe not seeing the right things.

    Btw using your Steelblue rom.