[REF] Simple way to increase free RAM in Dexter's Froyo - Milestone XT720 Android Development

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.

will try and report back when trouble has found

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.

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 ...

R-D said:
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 ...
Click to expand...
Click to collapse
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.

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.

R-D said:
I cant see an app being allowed to take up 48MB of background RAM ...
Click to expand...
Click to collapse
The values are thresholds for free memory, not limits on memory used. When free memory falls below the threshold values then processes in the particular categories start to be preferred for automatic termination and garbage collection. http://andrs.w3pla.net/autokiller/details

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 ) to Dexter's 2.2 with all of these low memory issues.

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

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

Vistaus said:
Is there any way to remove Google Talk? It keeps running as a service, but I don't use Talk at all.
Click to expand...
Click to collapse
correct me if im wrong, but I think the gtalk service is needed for market and calling

Yes get a system app remover it will do the job.
Sent from my XT720 using XDA App

Guys...download super box from market.Can free ram up to 80+ without kill the apps,.

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.

Related

How much RAM does it have?

Is that normal that after restart I can see only 65Mb of used memory and 235Mb of free memory?
Yes. The rest is allocated to the system for things like the camera and GPU (which takes a sizable chunk).
After camera buffers, radio, etc, there are about 350MB free:
MemTotal: 355108 kB

RAM Limitations?

Anyone else notice that under Applications- Manage Applications, the system only shows around 512 mb of RAM. The same applies to my task killer. The Xoom is supposed to have 1 GB of RAM. Anyone else find this a bit odd?
According to the linux os:
Code:
# ./busybox free
total used free shared buffers
Mem: 736512 723028 13484 0 56204
Swap: 0 0 0
Total: 736512 723028 13484
It appears 768MB of ram is available to the OS, I bet the other 256 is dedicated to video.

confused over ram/rom/nand & partition size

I'm currently using imilka's Gingerbread Sense nand build (http://forum.xda-developers.com/showthread.php?t=989289).
I was reading: http://forum.xda-developers.com/show...72&postcount=7 trying to understand, with little luck.
I have the TMOUS version of the HD2, with the suggested 350 meg partition. I'm also using APP2SD and have everything possible moved to my SD card (which in my case is around 500 megs in 200 or so programs).
I currently have 162 mb available according to APP2SD.
According to Absolute System, I have 350 MB in system, with 9mb free. If I understand correctly - this is used to hold the o/s (this gingerbread build) PLUS any frameworks I can squeeze into the 9mb, like a circle battery or bootup animation.
Absolute System confirms in data I have 162 mb free.
OSMonitor says I have 48 Megs free btw. And I've un-installed things running in the background that I don't need, but looks like the o/s will just leave other programs open - it looks like it tries to leave about 45-50 free at all times.
SO - why am I getting warning that I am low in memory?? I am now using SPB Shell 3D, which does use 35-40 megs of memory (yes, quite a bit) and want to compensate for it.
Is the 162 remaining used only for app installs?
Is the memory running apps like Shell 3D coming from the 350?
Since I have 160 megs free, can I re-allocate say 25-50 megs more to the o/s for Shell 3D and other apps to use?
If I need to re-partition to a different amount, would I then flash say a 400mb over (cause I tried that initially and remember being laughed at for not following post #1 which asked for 350+). If I do this, I presume I can CWR backup, re-flash partition, then restore..?
Another possibility would be to use the SD card option - can I use this method to say make a 2 gig partition for *all* apps on my sd card, and leave *all* internal memory for Android to run?
Help!

[Q] MyTouch 3G (Saphire) 32B with Ginger Yoshi 1.2 Questions

I'm Running Ginger Yoshi 1.2 and I'm still seeing a lot of lag with the dialer/phone (Takes too long to load and most of the time doesn't load the custom ring tone for that contact), also the following games lag and they where not lagging on the stock ROM (1.6 from T-Mobile)
Blow Up (Lite)
Bubble Buster Smileys
Regarding Performance Settings, I have the following questions:
What would be the best setting for CompCahce? I've read that it's recommended for this type of phone, would 26% be OK?
I have JIT Disabled since I've read it still very much unstable and might cause other things to fail, like the screen off/on animations, is this correct?
I have Disabled Surface Dithering, Is it worth enabling it?
I have enabled Allow Purging of assets, I've read that this really helps with the RAM limitation of this phone, is this correct?
I don't have Home or Messaging locked, are they worth locking?
Lastly, I have VM Heap size to 32M, is this the best for my Phone?
I've searched and haven't found anything clear enough for me regarding these questions, if they are answered somewhere just give me the link to the post.
Thank you all for your help and a Huge Thanks for Team Yoshi for there excellent ROM.
I flashed Ginger Yoshi 1.2 recently. I have a question for you. I am unable to get Wifi Tethering working with the same phone. Is it working for you?
I don't use Wifi Tethering
Sorry I don't use it since I don't have a Data Plan...
Quasi-Detailed Reply to YoshiMod Settings
ElConedeTJ said:
I'm Running Ginger Yoshi 1.2 and I'm still seeing a lot of lag with the dialer/phone (Takes too long to load and most of the time doesn't load the custom ring tone for that contact), also the following games lag and they where not lagging on the stock ROM (1.6 from T-Mobile)
Blow Up (Lite)
Bubble Buster Smileys
Regarding Performance Settings, I have the following questions:
What would be the best setting for CompCahce? I've read that it's recommended for this type of phone, would 26% be OK?
I have JIT Disabled since I've read it still very much unstable and might cause other things to fail, like the screen off/on animations, is this correct?
I have Disabled Surface Dithering, Is it worth enabling it?
I have enabled Allow Purging of assets, I've read that this really helps with the RAM limitation of this phone, is this correct?
I don't have Home or Messaging locked, are they worth locking?
Lastly, I have VM Heap size to 32M, is this the best for my Phone?
I've searched and haven't found anything clear enough for me regarding these questions, if they are answered somewhere just give me the link to the post.
Thank you all for your help and a Huge Thanks for Team Yoshi for there excellent ROM.
Click to expand...
Click to collapse
___________________________________________________________________
IMHO, Yoshi works for me, if it is set up correctly. Other than following the instructions in the "quasi-users guide" which really do help (http://forum.xda-developers.com/showthread.php?t=938848), some of these settings have helped for me - I have both 32A and 32B but I use the MT3G 1.2 w/3.5mm jack:
(presuming you have a 4GB SDmicro card [it's good, but higher is better if phone can handle it] and you can boot to a recovery that allows you to partition your SD card - Titanium Backup works if you want to save your apps, but if you want a fresh install, well, here it is):
1. Wipe, re-wipe and if you still are unsure... rewipe some more. Did I mention to wipe EVERYTHING (including battery stats, dalvik-cache, sd-ext... sorry for over-emphasizing this). Then use Ohsaka-Superwipe_v2 and reboot to recovery.
2. Partition SD card. I have a 4GB, so for me 512 MB a2sd space and something decent for secondary space is fine (the rest of my SD is 3.19 GB, so plenty of room).
3. Flash Ginger Yoshi 1.2.zip (works for 32A & 32B... I flashed the version with the 32A radio and IMHO I didn't like it), following whatever settings you choose (installed to partition, Zeam Launcher and 60 MB swap is what I did) then flash auto-boot-2.6.35.12-farmatito -32b-and-a.zip then reboot.
Preset settings right out of boot for my device are the following (I have tried to change the settings and reboot to weird instabilities - app lag, call-to-image lag, no ringer/vibrate, fc issues, etc., but this works for me):
CPU Governor: ONDEMAND
Compcache: DISABLED
JIT: Checked
Surface Dithering: Checked
Purging of Assets: Checked
Lock home/messaging: Unchecked
VM Heap: 48M
On average, I have 33 MB free out of 199 MB and usually the JuiceDefender stuff works to give me a boost most of the time. The phone works pretty zippy for me and reduced the call-to-image lag some folks get when receiving/making a call. Of course results may vary for you, but again, IMHO, it works for me.
Apologies if I am talking to u like if u r a noob or if I am editorializing too much. Force of habit I gotta drink the hell out of. Hope all this helps and take care.
I'll try it
Just a few questions about your recommendations:
1.- I understand that I should wipe
2.- I have a Class 4 8GB SD Card, does the class 4 good enough or should I first get a class 6 or even a class 10?
3.- I will also try these settings
Also, don't worry about talking to me like if I'm a noob, since I am a noob regarding custom ROM, Swap, Paritioning SD, CompCache, etc, etc...
For that type of device, IMO the Class IV is fine, but the Class VI or 10 offer better r/w protections for swap and functionality than a decent Class IV. If you have heavy usage, I would suggest getting something more than Class IV.
Hope this helps and post if the settings have helped you out. Later
Where's my CompCache?
I flashed auto-boot-2.6.35.12-farmatito -32b-and-a.zip and now CompCache is not showing up when I use the "Free" command:
total used free shared buffers
Mem: 112616 107964 4652 0 1492
Swap: 0 0 0
Total: 112616 107964 4652
Before flashing it, it showed numbers in the Swap now it's all 0, I've already tried disabling and re-enabling at didn't work...
Edit: I did a restore of my nandroid backup before farmatito and here is what free shows:
total used free shared buffers
Mem: 112608 100276 12332 0 332
Swap: 29272 14044 15228
Total: 141880 114320 27560
It would appear as if you might not have set the "install 60MB swap on partition" when you did the initial install of GingerYoshi. On my device, it looks like this:
total used free shared buffers
Mem: 203944 198784 5160 0 148
Swap: 60668 37708 22960
Total: 264612 236492 28120
If that isn't the case (not installing the 60MB Swap file), it is a separate issue from the Comp Cache, I believe. Try installing GingerYoshi with the install to partition, ZEAM (or LauncherPro... whichever one you choose), and THEN say YES to the "60MB on partition". You should be fine by then, but if not, let me know.
Thanks and hope it helps.
I hevn't started from scratch yet...
I'm going to get a Class 6 first before creating ext3/4 on the SD Card... In any case I'm a little reluctant on using the 60MB swap since I read too may times that it could affect the life time of the SD Card and that it's not much of an improvement... But as soon as I get a class 6 I'll try and do a clean install with an Ext3/4 with the 60M swap and see how it works.
Right now I have it like this:
Installed with: No Ext, No Swap (because of no Ext) and Zeam Launcher
In Performance I have:
CPU = Ondemand 128-576MHz (altoght I'm using SetCPU for this)
CompCache = 26%
JIT = off (since it messes up the Screen On/Off Animations among other things)
Surface Dithering = Off (I see no reason to have it on)
Allow Purging of assets = On (I see no reason to not have this on)
Lock Home and Messaging = Off (Again No reason to have this on)
VM Heap Size = 32M (seems more stable than 48M)
Edit: In any case, why does installing farmatito make me loose the CompCahche?
ElConedeTJ said:
I'm going to get a Class 6 first before creating ext3/4 on the SD Card... In any case I'm a little reluctant on using the 60MB swap since I read too may times that it could affect the life time of the SD Card and that it's not much of an improvement... But as soon as I get a class 6 I'll try and do a clean install with an Ext3/4 with the 60M swap and see how it works.
Right now I have it like this:
Installed with: No Ext, No Swap (because of no Ext) and Zeam Launcher
In Performance I have:
CPU = Ondemand 128-576MHz (altoght I'm using SetCPU for this)
CompCache = 26%
JIT = off (since it messes up the Screen On/Off Animations among other things)
Surface Dithering = Off (I see no reason to have it on)
Allow Purging of assets = On (I see no reason to not have this on)
Lock Home and Messaging = Off (Again No reason to have this on)
VM Heap Size = 32M (seems more stable than 48M)
Edit: In any case, why does installing farmatito make me loose the CompCahche?
Click to expand...
Click to collapse
In advance, I apologize. It was my belief that I said in advance that I am basing my findings on my 32A device that I physically use.
I forgot to give you the specs that I am running on my 32B device:
SAPPHIRE PVT32B SHIP S-ON G
HBOOT-1.33.0013d (SAPP30000)
CPLD-10
RADIO-2.22.28.25
Oct 21 2009,22:33:27
(Settings below based on a 2GB SDmicro... a size I would not recommend):
EXT, 60MB SWAP and ZEAM
CPU = ONDEMAND with 245 - 528MHz
CompCache = Disabled
JIT = ON
Surface Dithering = ON
Allow Purging of assets = ON
Lock Home and Messaging = Off
VM Heap Size = 48M
I ran the "free" command and I also see the 0 swap size. Hmmmmm... very interesting. I will do some research and look at the bug tracking to see if it is a GingerYoshi thing or if it is something in the way I am installing it on my device as well. As an added piece of advice, the farmatito zip is more beneficial for 32A devices like the 1.2 3.5mm jack device, so if I said to install to your device, you can generally disregard it and see if it gets you better results on the swap.
As an FYI, in terms of screen transitioning, have you checked out the "Spare Parts" included with GingerYoshi? Some of the settings may be for aesthetics or performance in tandem with your space, but perhaps it can free up more memory for the ring-to-display lag you are having. As for apps (Angry Bords, for example), the only one that works with some acceptable lag is the RIO version... blasted ARM processors.
Sorry for the confusion on my part and hope this helps.
I would love to have voice to text anyone know how I can add this to my phone or can yoshi add this to the rom?
Thanks,
Bukethead
Where's my CompCache???
Something changed and now when I run the Free command I get the following:
total used free shared buffers
Mem: 112608 106440 6168 0 2784
-/+ buffers: 103656 8952
Swap: 0 0 0
It has a different layout than before, but mainly under Swap I didn't have only 0:
total used free shared buffers
Mem: 112608 100276 12332 0 332
Swap: 29272 14044 15228
Total: 141880 114320 27560
Can anyone point me in the direction of how to troubleshoot what happened without having to wipe and flash the ROM again?
Thanks.
Edit: I had a backup of my ROM and did have the Swap numbers, So I did a backup of everything via Titanium and restored the Nadroid backup, then I restored apps, then the app data then the system data rebooting step by step and the swap still appeared, so I still have no Idea what broke the compcache but it's back now... If anyone has any idea on what could have changed, please let me know...
total used free shared buffers
Mem: 112608 105768 6840 0 32
Swap: 38280 19288 18992
Total: 150888 125056 25832
I am impressed with this rom I've been running yoshi for a few months now and I have no complaints. good job team yoshi!

Amazon tablet optimization. Memory load pressure cured.

Favorite rom -
Faux clock / any kernel tuner -
Enable kms - (setting recommended from Google for low memory device)
Set kms page_to_scan to 100
Set kms sleep_milleseconds to 500
Enable set io scheduler from 2048k - 4096k
Ram memory pro - (this setting help with memory swap when using kms, zram, and swap file combinations)
Enable at boot setting
Set balance tuning for apps and multitasking
Setxperia - (not available in store for tablet/must find and sideload) (setting recommended from Google for low memory device)
Enable zram with 400 MB size (zram have priority before using swap file / that where the magic at) (least used data get page out to zram and then to the page file)
Set swap file to data partition with 200 MB size
Set swappiness set to 100
Create swap. Total swap setting aside should equal to 615 MB
Use zramcc to check if zram/swap working. Swap total size should be 615MB. (reduce swap file size from 400 to 200 to minimize lag when all available swap are used up)
Link2SD - no need for explanation. I used this with a fast flash card to hold my titanium backup and app linkage. This app allow me to have all my apps that I used.
Seeder 2.0 - no need for explanation. This just classic lag free app. Check the entropy resources before and after usage before complaining how old and useless this app is.
Misc -
Unload/uninstall any memory hogged app, like Facebook Messenger (takes up almost 50MB), that like to stay in the system memory permanently. Can't even kill it with task manager. DO NOT USED ANY MEMORY CLEANER OR ADVANCE TASK KILLER. This will cause a swap overload. Let android manage the memory task. Reboot the tablet once all the settings have been applied. The tablet will behave very well and feel like a more expensive tablet.
I have the stock opengapps replace all the core stock rom app. Afterward, I removed any gapp that I do not use.
My Amazon Fire experiences:
My launcher is loaded with widgets and I can pretty much open any application that I used without any freeze or as little lag as possible. I game on this table now and no longer use my phone. Brave frontier and valkyrie crusade.
https://01.org/android-ia/user-guides/android-memory-tuning-android-5.0-and-5.1
Sent from my KFFOWI using Tapatalk
Kms or Ksm???
Update on information
Is all of this information still up to date? Any new additions/tweaks?
Also for some reason, after using zramcc I don't see 615 I only see 415 total.
svvparakala said:
Is all of this information still up to date? Any new additions/tweaks?
Also for some reason, after using zramcc I don't see 615 I only see 415 total.
Click to expand...
Click to collapse
Err...not really...although much of the guidance is reasonable albeit not optimal IMHO. Check out "L Speed" if seeking a quick tuner with a large following and solid reputation. Tweak one thing at a time and assess benefits before moving to the next item.

Categories

Resources