First of all, I believe tweaking minfree is just as important, if not more, than sysctl. Android tends to behave badly when there's very little free memory. When you're running your device with say less than 20-30MB of free RAM, a misbehaving app or two could invoke kernel's OOM killer and cause the device to become unstable, then eventually reboot or freeze.
For that reason, I don't like the default value of 25MB minfree. (minfree, btw, is android's memory management system). From my experience, I think at least 80MB minfree is required for your device to run fast and stable. In general I recommend Rubix's minfree setting (20480 blocks x 4 will give you 80MB):
echo "2048,3072,6144,15360,17920,20480" > /sys/module/lowmemorykiller/parameters/minfree
I personally run my Droid X with the following:
echo "256,512,1024,5120,13000,20000" > /sys/module/lowmemorykiller/parameters/minfree
Both should be fine. Be sure that the last two numbers are at least 13000 and 20000.
Now back to sysctl. Personally, I haven't had to manually drop caches at all. In fact, my phone will probably run fine indefinitely without having to purge (longest i've run it without rebooting was 5 days, but it's really hard not to reboot your phone when you tweak it as much as i do - the kernel will automatically drop caches when it think it needs more memory). But I'm not a heavy user (i don't play games), your mileage will vary of course, and you may need to purge every once in while. To purge page, dentry and inode caches, use this command:
sync; echo 3 > /proc/sys/vm/drop_cachesMy personal recommendation for most people (no manual flushing should be required):
vm.dirty_ratio = 90If you are willing to play around with manual or timed flushing I think you can squeeze a little more performance and battery life with:
vm.dirty_background_ratio = 55
vm.vfs_cache_pressure = 20
vm.dirty_ratio = 90Btw, you can schedule cache purge using Tasker/sl4a, or you can use cron.
vm.dirty_background_ratio = 70
vm.vfs_cache_pressure = 1
sorry for the noobiness but would this work in adb?
ReplyDeletecd C:\androidsdk\tools
adb shell
*daemon starts successfully*
echo "256,512,1024,5120,13000,20000" > /sys/module/lowmemorykiller/parameters/minfree
then would i just disconnect the usb? I tried this and adb just reprinted the echo command and didn't seem to do anything.
hmmm i don't use adb because i think telnet is waaaayyy better. Looks like adb shell should work though. Try "cat /sys/module/lowmemorykiller/parameters/minfree" to see if your values took.
ReplyDeleteHow would you feel about setting up sysctl on a Droid X
ReplyDeleteI have this as my settings,
Min Free KBytes :4096
Dirty Ratio:90
Dirty Background ratio: 70
VFS Cache pressure: 1
and on a loaded ROM Liberty 1.5 Oom allocating task is checked.
Matt,
ReplyDeleteI have a droid X and those are the settings I use.
Thank you, I am now using these settings now. I appreciate your response. I have another question i was thinking of purchasing the Droid X overclock app Dev by Jrummy16, what are some good settings to set your processor at for battery life as well as peformance? I want to overclock but i am kinda worried about burning out the processor and all that goes along with overclock but do you have any suggestions?
ReplyDeleteEvery Droid X is different as far as how overclockable it is, so you'll need to experiment. I would definitely recommend overclocking the highest frequency and undervolting the rest, especially the lowest. Mine settings are: 300/22, 600/33, 900/48, 1200/63.
ReplyDeleteI wouldn't worry about burning out the processor unless you plan on keeping the phone for 10 years. ;)
IM A NOOB AND IM CONFUSED AS TO APPLYING THE SETTINGS FOR THE ECHO COMMAND. DO I JUST HAVE TO TYPE THAT IN TE? AND REBOOT?
ReplyDeleteJames, I think it might be easier to flash one of my zips. http://www.imoseyon.com/2011/02/i-got-zip.html
ReplyDeletewwill it work for galaxy s3 ? anyway thanks for the explanation
Delete1fendi handbags
ReplyDeleteboys north face jackets
coach bag
coach factory
fitflops clearance
toms shoes
dior outlet store
fendi outlet
hermes bag
red sole shoes christian louboutin
air max
coach wallet
michael kors outlet
ray ban wayfarer sunglasses
canada goose sale
michael kors watches discount outlet
coach purses
cheap canada goose jackets
nike outlet store online
canada goose jacket outlet
fitflop sale
the north face clearance
clarks shoes sale
jordan 13
mbt shoes
michael kors outlet
nike free 5.0
michael kors outlet online
mont blanc pens
coach online outlet
coach purses
coachoutlet.com
prada outlet
jordan shoes for cheap
hermes birkin
gucci sunglasses outlet
canada goose discount
1103HXT-1
oakley sunglasses outlet
ReplyDeleteralph lauren outlet
cheap ray bans
ralph lauren sale clearance
chicago cubs jerseys
nike air max outlet
cheap nike shoes
polo ralph lauren outlet
adidas yeezy boost
ray ban sunglasses
20170314caiyan
michael kors outlet online store
ReplyDeletembt shoes clearance outlet
adidas shoes
coach outlet online
nike outlet
ugg outlet
ugg boots
canada goose jackets
ralph lauren uk
polo outlet
yaoxuemei20180111
coach outlet
ReplyDeletepandora jewelry
tory burch outlet
ralph lauren outlet
coach outlet
moncler outlet
prada handbags
pandora charms
polo outlet
pandora charms
yaoxuemei201080612