Jump to content

Speed up Android with minfree tweak


Recommended Posts

Posted

After reading this thread on XDA, I decided to tweak the minfree settings on my Liquid.

Minfree is part of the Kernel (present on both Cupcake and Eclair) and there is no need to install anything, you just have to change the default settings. For more details please read the thread on XDA.

I've tried the aggressive settings posted by androcheck, but I would always lose my connection with ADB after a few minutes, I then tried other settings and I've been using them since yesterday. If you want try it, here's what you have to do:

adb shell

echo "1536,2048,4096,5120,8192,10240" > /sys/module/lowmemorykiller/parameters/minfree

This will not be permanent, you'll be back to the default settings when you reboot your phone.

If you want it to be permanent you can insert the "echo" line at the end of "/system/etc/init.d/99complete".

I haven't tried to try much different values, but with theses settings my Liquid seems faster and more responsive. As for battery life I can't tell you if there is any improvement, since I've been using a lot of GPS and WiFi today.

Guest eViL D:
Posted

Interesting. It just seems you can't "multi-task" as well after the changes then.

Posted

I have no problem multitasking. But of course some apps will get killed if open like 10 or 20. :(

Posted

so the outcome was good, thats great.... I have looked into the 2.1 kernel and i have been getting lucky compiling one, do you know if its possible to set this by default?

Posted

I think it's better to update the default settings on a boot script. This way is very easy to recover if we set too aggressive settings.

But someone on XDA talked about were the settings are in source, they said it was in two places but I don't remember wich.

Guest liquid_it
Posted

great tip! I'm on LCR 1.1.1 and indeed it speeds up a lot..

Posted (edited)

here is another little speed tweak:

you must have root!

cat /proc/cpuinfo (use this to see cpu speed)

adb shell

echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

cat /proc/cpuinfo (now check it again and now idling is a 5XX)

If you want to switch back:

adb shell

echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

you can add this to first post if you need to :(

Edited by Angio
Guest drigerott
Posted
here is another little speed tweak:

you must have root!

cat /proc/cpuinfo (use this to see cpu speed)

adb shell

echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

cat /proc/cpuinfo (now check it again and now idling is a 5XX)

If you want to switch back:

adb shell

echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

you can add this to first post if you need to :(

that is what setcpu do :(

Posted (edited)
here is another little speed tweak:

you must have root!

cat /proc/cpuinfo (use this to see cpu speed)

adb shell

echo "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

cat /proc/cpuinfo (now check it again and now idling is a 5XX)

If you want to switch back:

adb shell

echo "ondemand" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

you can add this to first post if you need to :(

Mine is already set to "performance". This is because I've used the app "SetCPU" to change it.

How to check your settings before trying to change it: (not intended to you Angio :()

adb shell

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

Edit: waaaay to slow ^^

Edited by toxen
Posted
Mine is already set to "performance". This is because I've used the app "SetCPU" to change it.

How to check your settings before trying to change it: (not intended to you Angio :()

adb shell

cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

:(

Guest eViL D:
Posted (edited)

Ok, after having tested for about 10 minutes, I can say that this does indeed work.

using these settings:

# echo "1536,2048,4096,5120,15360" > /sys/module/lowmemorykiller/parameters/minfree

my memory stays around 40-60 free, usually in the 40's

15360 is 60mb

With out the changes, task killer is always showing many running processes and usually 30mb free.

It still doesn't seem to close processes like, Browser, Maps & settings. So, this is a nice find. I think you should still have a task manager to close those things tho.

Edited by eViL D:
Posted
:(

My guess is you're already familiar with the cat command :(

Posted
Ok, after having tested for about 10 minutes, I can say that this does indeed work.

using these settings:

# echo "1536,2048,4096,5120,15360" > /sys/module/lowmemorykiller/parameters/minfree

my memory stays around 40-60 free, usually in the 40's

15360 is 60mb

With out the changes, task killer is always showing many running processes and usually 30mb free.

It still doesn't seem to close processes like, Browser, Maps & settings.

and when reboots is cancels out, we need to implement this in the boot, I have compiled a 2.1 boot.img :( and if i can set this by default it will be a grand win for US :(

Guest liquid_it
Posted
I have compiled a 2.1 boot.img :(

meaning you got the sources of liquid eclair kernel??? :( :( :(

Posted
and when reboots is cancels out, we need to implement this in the boot, I have compiled a 2.1 boot.img :( and if i can set this by default it will be a grand win for US :(

But you can just put it in /system/etc/init.d/99complete can't you?

Guest maxisma
Posted
But you can just put it in /system/etc/init.d/99complete can't you?

we dont have that

Posted

Why not use a script in gscript

or maybe add to some script that runs on boot

Posted (edited)
If you want it to be permanent you can insert the "echo" line at the end of "/system/etc/init.d/99complete".

Do not seems to work on LCR111

Any other script in the LCR111 that may work?

Seems like the /sys/module/lowmemorykiller/parameters/minfree file isn't created yet when /system/etc/init.d/99complete runs.

Edited by xfs
Posted (edited)
meaning you got the sources of liquid eclair kernel??? :( :( :(

You can change that in the init.rc by unpack the boot.img and edit the ramdisk, then repack it. So it's not "compiling" but just editing a file.

Defaut in init.rc is : 1536,2048,4096,5120,5632,6144.

Already play a bit with those settings, and didn't notice improvement.

Edited by vache
Guest eViL D:
Posted (edited)
Why not use a script in gscript

or maybe add to some script that runs on boot

I have created a gscript.

it's settings are

# echo "1536,2048,4096,5120,15360,17920" > /sys/module/lowmemorykiller/parameters/minfree

lowmemkiller.zip

Edited by eViL D:
Guest eViL D:
Posted

Hrmm..... I think there is one caveat. I now believe you WILL NEED a task manager to initially close open apps. After that, processes that randomly pop up are squashed pretty quick.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.