Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
iRobert
Old
#21  
iRobert's Avatar
Senior Member
Thanks Meter 4
Posts: 163
Join Date: Sep 2009
Quote:
Originally Posted by chuckhriczko View Post
Im using it on the AOSP 2.0.1 rom for the CDMA Hero. I don't notice a whole lot of difference.
Did you have any improvement? Would be soooo cool if someone would include this into the ROMs.


BB.
 
booon
Old
#22  
booon's Avatar
Member
Thanks Meter 0
Posts: 98
Join Date: Mar 2008
Location: London
How do I edit the minfree file? I have tried looking for a guide on using adb but haven't found anything apart from how to root my hero. (which is already done)

I also looked in the new sticky wiki, but nothing there.

Do I make these changes via adb? or something else... a little heads up would be great. Just point me in the right direction and I will be fine.

I am keen to get my hands into this but its all a little alien right now.

Thanks.
 
androcheck
Old
#23  
androcheck's Avatar
Senior Member - OP
Thanks Meter 55
Posts: 102
Join Date: Dec 2009
@booon: Like all entries under /sys/ "minfree" is kind of a virtual file. It looks like a file but is used to set or get parameters for the kernel. Therefore all changes there will be gone after a reboot.

How to edit:

Code:
# Step 1:
# On your computer in a command line window open a shell via adb:
#
adb shell

# Step 2:
# View the current content of minfree (i.e. the current settings)
# ('cat' just prints the content of any file to the console)
#
cat /sys/module/lowmemorykiller/parameters/minfree

# Step 3:
# Overwrite the 'file' with new values, using echo:
# (of course this is no real file, so the values don't get written, 
# instead you simply adjust the kernel's current parameters)
#
echo "1536,2048,4096,21000,23000,25000" > /sys/module/lowmemorykiller/parameters/minfree
After this, use your phone some time, test if it makes a difference..
Play around with the last 3 numbers (see categories for details). The higher you set them, the earlier these processes will be killed.

After a restart of the phone all the settings are gone. So you are safe to experiment.

TODO: Step 4: Explain how to set this permanently by adding to a startup script.
 
booon
Old
#24  
booon's Avatar
Member
Thanks Meter 0
Posts: 98
Join Date: Mar 2008
Location: London
@ androcheck

Thanks for your help, it's very much appreciated.

I executed the commands, now gonna have a play and see what happens.

Thanks again, and keep up the good work.

Ben.
 
booon
Old
#25  
booon's Avatar
Member
Thanks Meter 0
Posts: 98
Join Date: Mar 2008
Location: London
Maybe worth mentioning I am running KaguDroid 1.1.3

So I will let you know my results.
 
HomerSp
Old
(Last edited by HomerSp; 26th January 2010 at 08:49 PM.)
#26  
HomerSp's Avatar
Recognized Developer
Thanks Meter 107
Posts: 340
Join Date: Jan 2010
Location: Stockholm
It's pretty easy to make the settings permanent (by editing /system/init.d/ramzswap.sh). Here's how I did it:
Code:
adb remount
adb pull /system/init.d/ramzswap.sh .
then edit ramzswap.sh (which now should be in your current working directory) and add
Code:
echo "1536,3072,4096,21000,23000,25000" > /sys/module/lowmemorykiller/parameters/minfree
to the end of the file. Save and do
Code:
adb remount
adb push ramzswap.sh /system/init.d/
Note: This probably only works on MoDaCo
 
booon
Old
#27  
booon's Avatar
Member
Thanks Meter 0
Posts: 98
Join Date: Mar 2008
Location: London
Homer,

I cant get the adb pull command to work. Says file doesn't exist.

any pointers???
 
HomerSp
Old
#28  
HomerSp's Avatar
Recognized Developer
Thanks Meter 107
Posts: 340
Join Date: Jan 2010
Location: Stockholm
I'm not sure if ramzswap.sh exists on any other rom besides MoDaco, maybe someone knows a more generic init file that exists on all systems? (I can't check right now as I'm not at home)
 
nuumuun
Old
(Last edited by nuumuun; 27th January 2010 at 11:29 AM.) Reason: added chmod to instructions
#29  
nuumuun's Avatar
Senior Member
Thanks Meter 30
Posts: 336
Join Date: Jun 2008
Post make the changes permanent

this minfree tweaking is genius!

this is what i did to make the changes permanent (on aosp-2.1-jnwhite-r4 ROM):
Code:
adb remount

adb pull adb pull /system/etc/init.d/99complete .   <-- don't forget the dot :p

added
echo "1536,2048,4096,5120,15360,23040" > /sys/module/lowmemorykiller/parameters/minfree
to the end of 99complete

adb push 99complete /system/etc/init.d/.

adb shell chmod 755 /system/etc/init.d/99complete

adb reboot
i guess you could use any of the script files in the init.d folder or even create a new one

thanks again for this tweak!!
 
mach2005
Old
(Last edited by mach2005; 26th January 2010 at 04:10 PM.)
#30  
Senior Member
Thanks Meter 4
Posts: 250
Join Date: Dec 2005
Location: Amsterdam
Wow, what an improvement.

I'm running without compcash/ramzwap and tweaked de memorykiller to: 1536,2048,4096,5120,15360,23040.

Free RAM is about 70 mb all the time.

LOOKS LIKE I HAVE A PROCESSOR UPGRADE! LIGHTNING FAST!

(I have about 15 apps installed)
On XDA for 7 years.

Phones: HTC/Qteck 2020 >> HTC Touch >> HTC HERO >> LG OPTIMUS 2X SPEED >> XTREAMER AIKI 5" >> HTC One X

Tablet: ASUS TRANSFORMER TF101 on JB

*** DID I HELP YOU? PLEASE HIT THE "THANKS" BUTTON ***

 
Post Reply+
Tags
guide, how to
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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