Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Dexter_prog
Old
(Last edited by Dexter_prog; 21st August 2011 at 02:44 PM.)
#1  
Senior Member - OP
Thanks Meter 91
Posts: 879
Join Date: Jul 2011
Default [DISCUSSION] RAM and services, sluggishness and slowness

Since our phone has little ram and many apps like running services we probably don't need in the background (youtube, google search, K9 mail/gmail for those of us checking emails manually), is there any way to optimize our phones by limiting the apps when it comes to services? I mean, is there any way to not let an app run a background service?

I tried freezing app autostarts with Autostarts, but I couldn't do it for some apps. I am also using FastReboot but I feel that it is only a workaround.

I keep feeling that my phone runs faster when it has 60+ free mb of RAM, but this is hard to accomplish. What do you guys think?

By the way, I also felt that Juwe RAM Script and the Sysctl config posted in the script's thread didn't do anything to my RAM.

--
Update @ Aug/21:

There's a script that works in all cellphones the same and it was created by zeppelinrox. Read about it here: http://forum.xda-developers.com/showthread.php?t=991276

For some reason, settings don't stick after reboot for us no matter what we do. This has been confirmed to happen in GingerDX and in MiniCM (confirmed by me) on CM7. We still don't know why

Alternatively, some users have suggested introducing the script in build.prop (read bellow). In my case, even without the values not sticking, my phone is smoother. You can try the following at your own risk:

This is some info that Pjay12 gathered from other posts:

Quote:
Originally Posted by Pjay12
Here goes -

Credits to Zeppelinrox and alfsamsung

I tried to make this as noob-friendly as possible.

First steps - Run the script and reboot once (just in case) It will create a 99SuperCharger in init.d, deleting this is not necessary.
Uninstall/freeze AMM, AKMO, Minfree Manager, whatever else you have that can alter Minfree values.
This may differ with each rom but delete any other ramscript from etc/init.d
[On a standard GingerDX these are the files that should be in init.d
01sysctl
03firstboot
04modules
05mountsd
06gingerdx
06mountdl
10apps2sd
20userinit
99SuperCharger <-- after running the SuperCharger Script]

Changes -

1. system/etc/hw_config :
Add these lines to the bottom

# tweak launcher hard to kill from supercharger
echo "0,3,5,7,14,15" > /sys/module/lowmemorykiller/parameters/adj
echo "1536,2048,6656,7168,7680,8192" > /sys/module/lowmemorykiller/parameters/minfree
echo "0" > /proc/sys/kernel/panic
echo "0" > /proc/sys/vm/oom_kill_allocating_task
echo "0" > /proc/sys/vm/panic_on_oom
echo "1" > /proc/sys/kernel/panic_on_oops
echo "0" > /proc/sys/kernel/panic

The values in bold are my settings (Balanced 3 option in supercharger)
Values you will see are 6 ,8 ,26 ,28 ,30 ,32.
Change them to your desired values.

[Additional (how it works) - <value> * 4 / 1024 (<value/256)
Example - 1536/256 = 6, 8192*4/1024 = 32]


2. data/local.prop :
Make sure it looks like this-

ro.FOREGROUND_APP_ADJ=0
ro.VISIBLE_APP_ADJ=3
ro.PERCEPTIBLE_APP_ADJ=2
ro.HEAVY_WEIGHT_APP_ADJ=4
ro.SECONDARY_SERVER_ADJ=5
ro.BACKUP_APP_ADJ=6
ro.HOME_APP_ADJ=2
ro.HIDDEN_APP_MIN_ADJ=7
ro.EMPTY_APP_ADJ=15
ro.FOREGROUND_APP_MEM=1536
ro.VISIBLE_APP_MEM=2048
ro.PERCEPTIBLE_APP_MEM=1024
ro.HEAVY_WEIGHT_APP_MEM=6656
ro.SECONDARY_SERVER_MEM=6656
ro.BACKUP_APP_MEM=7168
ro.HOME_APP_MEM=1024
ro.HIDDEN_APP_MEM=7168
ro.EMPTY_APP_MEM=8192

Now reboot and check sys/module/lowmemorykiller/parameters/minfree (long press and select view as text) Your values should be what you put as the bold text in hw_config.
Quote:
Originally Posted by Pjay12
--------------------------------------------------------------------------------------------------------------
OPTIONAL -
The following may or may not affect your phones performance. DO NOT rely on quadrants or any other benchmarks for performance. Its your own experience.

1. hw_config
Add these lines-

# we love fast sd speed
echo 512 > /sys/devices/virtual/bdi/179:0/read_ahead_kb

# sysctl and ram tweak
echo "0" > /proc/sys/vm/swappiness
echo "2000" > /proc/sys/vm/dirty_writeback_centisecs
echo "1000" > /proc/sys/vm/dirty_expire_centisecs
echo "200" > /proc/sys/vm/vfs_cache_pressure
echo "80" > /proc/sys/vm/dirty_ratio
echo "40" > /proc/sys/vm/dirty_background_ratio
echo "0" > /proc/sys/vm/oom_kill_allocating_task
echo "2048" > /proc/sys/vm/min_free_kbytes

NOTE -
The above lines under "#sysctl and ram tweak" are alfsamsung's original tweaks.
If you haven't flashed kickasskernel, the below lines are editted with a few kickasskernels values (its what I use) If you want to try it, REPLACE the above lines under #sysctl and ram tweak with the lines below.

# sysctl and ram tweak
echo "0" > /proc/sys/vm/swappiness
echo "2000" > /proc/sys/vm/dirty_writeback_centisecs
echo "1000" > /proc/sys/vm/dirty_expire_centisecs
echo "20" > /proc/sys/vm/vfs_cache_pressure
echo "95" > /proc/sys/vm/dirty_ratio
echo "60" > /proc/sys/vm/dirty_background_ratio
echo "0" > /proc/sys/vm/oom_kill_allocating_task
echo "8192" > /proc/sys/vm/min_free_kbytes


2. system/build.prop

Add these lines to the bottom #wifi network etc..
rild.libpath=/system/lib/libril-qc-1.so
rild.libargs=-d
/dev/smd0
ro.ril.hsxpa=2
ro.ril.hsupa.category=5
ro.ril.enable.a52=1
ro.ril.enable.a53=1

ro.ril.def.agps.mode=2
ro.ril.gprsclass=12
ro.ril.def.agps.mode=2
ro.telephony.default_network=0
wifi.interface=wlan0
wifi.supplicant_scan_interval=90

#windows management
ro.sf.lcd_density=160
windowsmgr.max_events_per_sec=60
settings.display.autobacklight=1
settings.display.brightness=160

# The OpenGL ES API level that is natively supported by this device.
ro.opengles.version=131072
debug.sf.hw=1

# Tweaks
debug.sf.hw=1
ro.compcache.default=0

#media
ro.workaround.noautofocus=1
media.stagefright.enable-player=true
media.stagefright.enable-meta=true
media.stagefright.enable-scan=true
media.stagefright.enable-http=true

ro.media.dec.jpeg.memcap=10000000

ro.media.enc.file.format = 3gp,mp4
ro.media.enc.vid.codec = m4v,h263
ro.media.enc.vid.h263.width = 176,352
ro.media.enc.vid.h263.height = 144,288
ro.media.enc.vid.h263.bps = 64000,800000
ro.media.enc.vid.h263.fps = 1,30
ro.media.enc.vid.m4v.width = 176,352
ro.media.enc.vid.m4v.height = 144,288
ro.media.enc.vid.m4v.bps = 64000,800000
ro.media.enc.vid.m4v.fps = 1,30

# For SD storage insert notification sound
persist.service.mount.playsnd = 0

#dalvik options (more tweaks)
dalvik.vm.execution-mode=int:jit
dalvik.vm.heapsize=40m
dalvik.vm.dexopt-flags=m=y

#Other tweaks
mot.proximity.delay=400

When editting build.prop, you may have to make changes to both system/build.prop AND system/bin/build.prop

Quote:
Originally Posted by alfsamsung
- mot.proximity.delay=400 - sets the delay of screen on when using proximity sensor in calls (mseconds)
The important lines above are in bold. Make sure they are the same.
Reboot and check sys/module/lowmemorykiller/parameters/minfree. Values should be the same. If they aren't, feel free to PM. Hope it helps.

If it helps hit thanks for the respective contributors.


Enjoy.
Cheers.
Pjay
The Following 4 Users Say Thank You to Dexter_prog For This Useful Post: [ Click to Expand ]
 
woodpeckerlo
Old
#2  
woodpeckerlo's Avatar
Senior Member
Thanks Meter 8
Posts: 112
Join Date: Sep 2009
Quote:
Originally Posted by Dexter_prog View Post
Since our phone has little ram and many apps like running services we probably don't need in the background (youtube, google search, K9 mail/gmail for those of us checking emails manually), is there any way to optimize our phones by limiting the apps when it comes to services? I mean, is there any way to not let an app run a background service?

I tried freezing app autostarts with Autostarts, but I couldn't do it for some apps. I am also using FastReboot but I feel that it is only a workaround.

I keep feeling that my phone runs faster when it has 60+ free mb of RAM, but this is hard to accomplish. What do you guys think?

By the way, I also felt that Juwe RAM Script and the Sysctl config posted in the script's thread didn't do anything to my RAM.
Same problem! Now I use Gingerdx 007 and i have the same problem i had with 006 and froyobread before that! My phone works like a charm, couldn`t be better! BUT....verry often it becomes so laggy and there is apsolutelly no way to fix it exept restart and it`s becoming really anoying. Sometimes i don`t use it for few hours and it simply "bricks" in my pocket! I can`t even answer if someone calls me. I know it has something to do with ram memory but nothing helps! Fast reboot makes it work for like 10 seconds and it`s stuck again. Advanced task killer kills apps in background and there they are again after couple of seconds. I`m not really sure that it will ever be fixed, whatever it is.
The Following User Says Thank You to woodpeckerlo For This Useful Post: [ Click to Expand ]
 
Dare-Devil Inside
Old
#3  
Dare-Devil Inside's Avatar
Senior Member
Thanks Meter 366
Posts: 1,054
Join Date: Apr 2011
Location: Sibenik
I dont have that problems, I reboot only when error comes up, or I battery drained.

Just uninstall those system apps..

Sent from my X8 using Tapatalk
AND FOR GODS SAKE, I'M NOT A DEVELOPER.
 
Dexter_prog
Old
#4  
Senior Member - OP
Thanks Meter 91
Posts: 879
Join Date: Jul 2011
Quote:
Originally Posted by woodpeckerlo View Post
Same problem! Now I use Gingerdx 007 and i have the same problem i had with 006 and froyobread before that! My phone works like a charm, couldn`t be better! BUT....verry often it becomes so laggy and there is apsolutelly no way to fix it exept restart and it`s becoming really anoying. Sometimes i don`t use it for few hours and it simply "bricks" in my pocket! I can`t even answer if someone calls me. I know it has something to do with ram memory but nothing helps! Fast reboot makes it work for like 10 seconds and it`s stuck again. Advanced task killer kills apps in background and there they are again after couple of seconds. I`m not really sure that it will ever be fixed, whatever it is.
before gingerDx I was using Fast Reboot + automemory manager (set on aggressive or whatever the highest setting was) and it kind of did the trick. But it still seems that there's no way to beat a phone with low ram.
 
aldee_s
Old
#5  
aldee_s's Avatar
Senior Member
Thanks Meter 56
Posts: 358
Join Date: Mar 2011
Location: Serang

 
DONATE TO ME
Just use Autokiller memory optimizer, and if you can, buy the donate version, so you can edit the upper settings. just set the 3 lower value to : 80,90,100
and if you have the donate version, just set the 3rd value to 60, and you'll have a fast system. but dont try to set the first and second value too high,
Damn you Sony Ericsson, giving us ****ty phone with such little RAM. Your marketing strategy really sucks you know.

 
SpyderX
Old
(Last edited by SpyderX; 11th August 2011 at 03:30 AM.)
#6  
SpyderX's Avatar
Recognized Contributor
Thanks Meter 828
Posts: 926
Join Date: Mar 2011
Location: Singapore
Quote:
Originally Posted by Dexter_prog View Post
Since our phone has little ram and many apps like running services we probably don't need in the background (youtube, google search, K9 mail/gmail for those of us checking emails manually), is there any way to optimize our phones by limiting the apps when it comes to services? I mean, is there any way to not let an app run a background service?

I tried freezing app autostarts with Autostarts, but I couldn't do it for some apps. I am also using FastReboot but I feel that it is only a workaround.

I keep feeling that my phone runs faster when it has 60+ free mb of RAM, but this is hard to accomplish. What do you guys think?

By the way, I also felt that Juwe RAM Script and the Sysctl config posted in the script's thread didn't do anything to my RAM.
Juwe helps me. You have to put it in /etc/init.d and chmod 777 it. But i'm now using supercharger script, i think my phone is faster now.

Note: my signature has not been changed yet because i am now testing.

Try changing dirty ratio to 95 and dirty background ratio to 60 and vfs cache pressure to 10 and turn on OOM (not sure about this).

My minfrees are: 6,8,16,20,22,60

Think-Search-Discuss, not the other way around. Hit the Thanks button if I helped you. My PM is not personal prioritised support/help.



Don't be a:
Spammer/troll/whiner:
And please:
Or else this will happen to you:

My work and device:

Xperia X8 running GingerDX + Alfs kernel
How to behave on XDA: http://forum.xda-developers.com/show....php?t=1736078
Bootloader unlock guide for MSM7227 SEMC devices: http://forum.xda-developers.com/show....php?t=1254225
List of great apps: http://forum.xda-developers.com/show....php?t=1697127
Dev-Host link: d-h.st/users/SpyderX
With more to come...
The Following 2 Users Say Thank You to SpyderX For This Useful Post: [ Click to Expand ]
 
Dexter_prog
Old
#7  
Senior Member - OP
Thanks Meter 91
Posts: 879
Join Date: Jul 2011
What's superchargerscript? Is it this one? http://forum.xda-developers.com/showthread.php?t=991276
 
zephiel
Old
#8  
zephiel's Avatar
Senior Member
Thanks Meter 41
Posts: 488
Join Date: Jul 2011
I'm using the browser to browse Facebook and Twitter bcoz their app runs in background so I uninstalled them using Titanium Backup. And I have a little imprpvement.

Sent from my X8 using XDA App
 
deedii
Old
#9  
deedii's Avatar
Recognized Contributor
Thanks Meter 995
Posts: 1,583
Join Date: May 2011
The more the apps installed the more ram will be used. I dont know if it is possible to add ram but the only solution is to free some.
 
SpyderX
Old
(Last edited by SpyderX; 11th August 2011 at 07:05 AM.)
#10  
SpyderX's Avatar
Recognized Contributor
Thanks Meter 828
Posts: 926
Join Date: Mar 2011
Location: Singapore
Quote:
Originally Posted by Dexter_prog View Post
What's superchargerscript? Is it this one? http://forum.xda-developers.com/showthread.php?t=991276
Yeah. And i'm also using kernel tweaks by the same guy and turbo 3g. I'm testing them so quality assurance for x8 is not present yet.

Think-Search-Discuss, not the other way around. Hit the Thanks button if I helped you. My PM is not personal prioritised support/help.



Don't be a:
Spammer/troll/whiner:
And please:
Or else this will happen to you:

My work and device:

Xperia X8 running GingerDX + Alfs kernel
How to behave on XDA: http://forum.xda-developers.com/show....php?t=1736078
Bootloader unlock guide for MSM7227 SEMC devices: http://forum.xda-developers.com/show....php?t=1254225
List of great apps: http://forum.xda-developers.com/show....php?t=1697127
Dev-Host link: d-h.st/users/SpyderX
With more to come...

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...