yashsingh1/xdaforums huggingface dataset:
[T-Mobile LG G2x] Erislover:
Overall, it has made performance a bit better. I use the same ROM and settings as you, and I agree it's already very good...but these settings are nice. I'm not sure this process can be undone so easily, so it's a valid point you make. But, fwiw, I followed the instructions above and am noticing a difference in performance.
[T-Mobile LG G2x] siresh:
Thanx much easier to understand!!! Will this work on 2.3.3 ota rom rooted.?)
[T-Mobile LG G2x] zimphishmonger:
Thanks for the detailed how-to. Please be sure to uninstall and\or disable autokiller to make sure they arent conflicting, as that will def screw with your test results. Also, please run this for at least 24 hours to get a real good idea how it performs after a number of hours. This is a major mod to androids memory management and Im trying to discover if there are any side effects. Thanks for your feedback and testing results. Please keep sharing.

Wanted testing from people who knew what was going on internally, as this is pretty experimental, but this is fine too. Feedback is feedback :) Try a few different memory settings and see how they work, both MegaRAM and multitasking settings.
[T-Mobile LG G2x] zimphishmonger:
This can easily be undone by running the script again, I think its option 8 to "unsupercharge". Thy options should disable all the tweaks made by the script (you did nandroid before, right??).

FEEDBACK: Tested MEGARAM Option 2 (#9 on the script) and it was too aggressive, imo. We don't need that much free ram anyways, its a waste. Testing MEGARAM 1 + HKL (#8 on script) today, and we'll see how it works.
[T-Mobile LG G2x] KingDavid63:
Im using it now.... this thing is blazing.... feels like overclocking.... whats it doing really?
[T-Mobile LG G2x] zimphishmonger:
The SuperCharger script completely re-arranging how Android prioritizes its apps in memory (so which ones get killed and when), and tweaks how aggressive Android's internal memory management. Essentially, it is fending off apps from hogging memory and cpu time unnecessarily, and giving important apps like phone, launcher, sms highest priority. The 98kickasskernel script (if you are using it) is optimizing a lot of kernel settings are set improperly\not optimized (almost identical to Autokillers "advances system tweaks"). Thats a very dumbed down explanation, but it gets the idea across .
[T-Mobile LG G2x] robavila721:
Using option 8. Its been 10 min but I do feel it snappier opening messaging and going back home. Thank you monger for bringing it to our attention

Sent from my LG-P999
[T-Mobile LG G2x] KingDavid63:
The launcher pro com.fede.launcher command is not working. I had the script running on adw, I changed the one line to work with launcher pro and then the script causes a syntac error. I need the command or line that works with Launcher pro. Any help would be greatly appreciated!
[T-Mobile LG G2x] zimphishmonger:
Not sure why, as according to all the documentation I can find, thats the PID for Launcher Pro (and LPP). Are you sure you arent replacing anything w/ a space? Ill update the OP w/ a version for Launcher Pro, Give it a shot and let me know
[T-Mobile LG G2x] KingDavid63:
Awesome. Yes I was running the script for adw and wa reapply digging it. Understood how to edit, start, and stop the script. Now I just need it on my launcher of choice, launcher pro. Man you need to follow me on twitter I couldn't send you a message. :)
[T-Mobile LG G2x] KingDavid63:
Ok new script for launcher pro works fine... I'll look at it and see where I messed up... Thanks man
[T-Mobile LG G2x] richua:
Before 3G Turbocharger script, average download 606 kbps, average upload 622.2 kbps

After 3G Turbocharger script, average download 676.8 kbps, average upload 585

If you throw out the most extreme outlier per group, you get an average download of 562.75 kbps before and 712.5 kbps after. Not a whopping increase but given that it only took a few seconds to download and run the script (no need to enter options or edit settings here), it's worth it.

Grab your 3G magic here: http://xdaforums.com/showthread.php?p=15948434#post15948434
[T-Mobile LG G2x] zimphishmonger:
If im not mistaken, this tweak really only helps phones that are 3g as it enables a what has been dubbed "3G+" or HSPA+. As we are 4G (or whatever you want to call it), I dont see how this will help us much, as we use 4G on same towers as they are using the "enhanced 3g". I think this script has a significant increase for devices like the Samsung Vibrant, Galaxy S variants, MT3G, etc as they are all capable, but the setting isnt enabled.

Ya, you're correct. It doesnt do anything horrible, and it doesnt take long, but it doesnt really do much for us anyway IMO
[T-Mobile LG G2x] KingDavid63:
im assuming these scripts stick after reboot, and you dont have to run script again unless it's to undo something correct?

when you select number 8, it also applies htk setting.. correct? and it's saying it's not sticking... the values arent right after reboot...
[T-Mobile LG G2x] richua:
Yeah this was mainly for a somewhat validated sugar pill effect and also to see if the tweaks differ from Autokiller's network tweaks. I know I've mentioned this before so apologies if you're seeing it again but Autokiller's network tweaks actually slowed things down on the Tmo network in my experience and I wanted to check if these network tweaks did the same. So far so good for what it is.

Have you tried the kernel tweaks yet?
[T-Mobile LG G2x] flak0:
Just wanted to say after applying the script my G2x running eb1.0.6gb is flying with the go launcher ex. Thanks OP
[T-Mobile LG G2x] Shaddy-Z.:
I guess I'll go ahead and do this now. Nothing but good reviews so I mean why not? Hopefully it's not just a placebo effect. I'll report back to update.
[T-Mobile LG G2x] richua:
It depends on your phone usage. If you generally "use" only one or two apps at a time like checking SMS and email sporadically, the only difference you might see is snappiness in the launcher. If you multitask a lot and have a lot of homescreens with widgets like I do, you'll find that same snappiness but also an improvement in switching between apps.
[T-Mobile LG G2x] zimphishmonger:
Havent messed around w. the network speed tweaks\testing as ive been busy working w/ he kernel and memory management angle.

Ya, tried the 98kickasskernel and it started getting the occasional boot loop (I used the one WITHOUT IO scheduer tweaks, so it shouldnt reboot at all). To tell you the truth, I removed it and am fine w/o it.

I am noticing that the v6 on MegaRAM setting 1 (#8 on the script) is working great at first, but a few hours later, im noticing a lot of slowdown and lag\stalling when going back to launcher, loading up SMS, etc. This seems like a similar situation to swap\compcache we had on the G1, where it was super fast at first but slowed to a crawl after some use.

Im gonna keep testing w/ the settings and see i I can find something I like. Id love to be able to pick apart this script and assemble something that can be run on-boot without any user interaction, as this thing is WAY too user-unfriendly, and this type of tweak shouldnt require input from the user (even if it has to wait a few minutes to apply settings after boot). Do u agree?

The OOM\pid priority readjustment stays, however the minfree\maxmem settings will NEVER stay on reboot unless you have an app (AutoKiller) or a script that reset the memory settings. This is why I donated to AutoKiller, so I could reapply automatically on boot and use the advanced system tweaks. So yes, you are correct, you must run the script on each boot to enable the memory management, or you can copy those settings and manually put them into AutoKiller (will do the EXACT same thing :))

This is another area of this script that isnt so hot IMO. A memory\kernel tweak should not require a user to re-run it everytime on boot to keep the settings. It should be a run once, and then its automated type of deal, otherwise "regular" users will not jump on board.
[T-Mobile LG G2x] Shaddy-Z.:
So I just did it, it's pretty simple to do took about a minute max. Good thing I didn't reboot my phone or else I'd have to redo it. So far so good, no errors or anything of the sort. I've only been running it for about 20 minutes so the only difference I see is a little less lag when having more apps open. I'm a pretty heavy user so every bit of speed is great!
[T-Mobile LG G2x] zimphishmonger:
Cool, let us know how its working in several hours (dont reboot :p)
[T-Mobile LG G2x] siresh:
Did I miss something or does this script eat battery like crazy?
[T-Mobile LG G2x] zimphishmonger:
Shouldnt. If anything that is the exact opposite point of this script, which limits the apps that can stay running in memory (and eating CPU and battery), so we are actually saving battery life. Its a little more complicated then that because we re-organize which apps Android kills first (we put the launcher very high, hence the "Chuck Norris" launcher lol), but there shouldnt be any significant loss in battery, if any at all.
[T-Mobile LG G2x] fcisco13:
So these settings in autokiller memory should work the same..
[T-Mobile LG G2x] zimphishmonger:
Yup (with the exception of the OOM priority rearrangement), try these and see how they work for a day or so. I want to hear some other feedback before I share more of mine, as I dont want to bias anyone.

Multitasking (#7 in script) - 6, 8, 22, 24, 26, 26

MEGARAM 1 (#8 in the script) - 6, 12, 40, 60, 80, 100

MEGARAM 2 (#9 in the script) - 6, 12, 75, 100, 125, 150
[T-Mobile LG G2x] siresh:
I am going to retry it now maybe do a battery calibration.
[T-Mobile LG G2x] fcisco13:
No way to load script from autokiller memory, that would be cool to create a script then have akm run it and load it at boot.
[T-Mobile LG G2x] richua:
After you find the best settings for your setup, plug those values into Autokiller and save as a custom preset, then check load on boot.
[T-Mobile LG G2x] zimphishmonger:
My hunch seems to be right: it slows down significantly after a few hours. The apps and launcher stay in Ram but something "hiccups " when trying to load the app/launcher causing a good amount of lag as the system recovers from whatever is causing the stall.

Gonna keep testing and see what works best for the G2x, as the optimum settings are different for every phone. The original script and instructions were for the milestone, which has a slower single core cpu and less RAM
[T-Mobile LG G2x] robavila721:
+1. After a while opening any app stalls for a second then it opens. Its not really a lag but sort of a stutter. Kinda reminds me of my vibrant before voodoo came along

Sent from my LG-P999
[T-Mobile LG G2x] zeppelinrox:
Save this as a script in script manager and run whenever this happens and you get lag for whatever reason.

sync; echo 3 > /proc/sys/vm/drop_caches

Somebody tested it as well and confirmed that it works.

It saves having to reboot, anyway.

It came from imoseyon originally and will be in V8.

Uh.. it is supposed load automatically on boot if you have an init.d folder.

If for some reason it's not working, you can use script manager to load either /data/99SuperCharger.sh or /system/etc/init.d/99SuperCharger at boot and as root...

I thought everybody knew that... :p

Also, editing the script to enter the launcher you use isn't really necessary.

The script will reliably tell you your launcher status as long as you know whether home is locked in memory.

And in fact, I don't think the edit works because if you run auto memory manager, your launcher probably won't show up with it's own PID. It's probably lumped in with android.process.acore.

If there was only one instance of anroid.process.acore, then the solution would be easy but the problem I had was that there can be 2 or even 3 android.process.acores and no way of knowing which one is hiding the launcher lol
[T-Mobile LG G2x] FatalityBoyZahy:
What exactly does this do? I'm retarded. lol
[T-Mobile LG G2x] zimphishmonger:
EXCELLENT description, thats exactly what it "feels" like. It's a stutter or hiccup similar to before we had EXT\Voodoo on the Galaxy phones. Ive found that you dont need to reboot, but you can just relaunch AutoKiller and re-enable optimum or default (or reset the v6 Supercharger script). Seems to "reset" the memory cache\buffer (dont quote me on this, judging from what I feel in the system)

Well, then something isnt sticking cause all the minfree\lowmem settings go back to ROM default and the 99SuperCharger file is in init.d, is getting run on boot, and has correct permissions. Not sure why it isnt sticking?? The OOM priorities seem to stick though :)

My goal with this memory optimization effort is to get a solution where we can get a script (or app, if needed) that gets run on boot, and NOTHING needs to be run by the user to avoid\reduce lag. Id like to avoid having to run a script (even if it is dead simple) to stop "lagging", Android's memory management should take care of all of that without any user interaction (because of the settings & tweaks we made). That being said, I will certainly give it a shot and see how it works out. Thanks for the tip!

Regarding editing the launcher PID, How does Android know Im using ADW EX (org.adwfreak.launcher) besides the default home setting? How could it keep the app (which happens to be a launcher) in memory when it doesnt know which one Im using....I could have LPP, ADW, ADW EX, and Stock launchers installed. No issues seeing ADW EX using any "task manager" so it isnt being lumped w/ android.core
[T-Mobile LG G2x] robavila721:
All I did was run the unsupercharge option. No. 14 I think. Then reinstalled autokiller

Sent from my LG-P999
[T-Mobile LG G2x] zeppelinrox:
Well, I spent alot of time with different commands different methods to get it to load on all roms but some phones/roms are just so impossible *sigh*

So at least Script Manager is a free, full proof backup method to load up the boot script without user interaction.

Regarding lag, you can check /proc/sys/vm/vfs_cache_pressure and see what number is in there.

My kick ass kernel tweak has the command "busybox sysctl -w vm.vfs_cache_pressure=10" which would make it a 10.

A description of the setting is here http://www.linuxinsight.com/proc_sys_vm_vfs_cache_pressure.html

Lower number = better performance but chance of lag/more memory use over time

Larger number = lower performance but lag is less likely to happen over time.

I've been thinking to change it from 10 to 20.

But 50 is a decent middle ground, I think.

Android only directly controls the HOME setting in regards to the launcher but it can be set to be any launcher and it doesn't matter which one it is.

Say the HOME APP is a car... it will get controlled the same way regardless of who's driving it.

(The launcheradj variable in the script is only for use within the script for determining launcher status)
[T-Mobile LG G2x] zimphishmonger:
nice info about the launcher, i did assume that variable was being used as an identifier for the launcher PID.

The cache pressure is def something that can be tweaked, although Im not sure where to set it to. You are considering going to 20, yet 50 is a "good middle ground". What's stock? I think thats exactly where the weak point is, as its fantastic perfromance initially but it seems to get bogged down when the cache fills up. I may write a few simple scripts and test out 10-50 in increments of 10 and see what its like. I think adjusting the cache pressure is better than forcivly flushing the cache when it starts to lag (seems like taking the car in for repairs after it started smoking and caught fire lol) Any suggestions besides that? I think its all tuning the script for this device
[T-Mobile LG G2x] zeppelinrox:
I believe the default cache pressure is 100 but most roms have it at 50 as far as I know...
[T-Mobile LG G2x] zimphishmonger:
Looks like 40 is a good starting point. thx!
[T-Mobile LG G2x] zeppelinrox:
you're welcome!

btw, what was the value that you had before?
[T-Mobile LG G2x] FastJoe78:
I have found that choosing option 11 first rebooting then running 8 or 9 (if you want) and letting it run from there gives the best results by far...but its been like 2 hours.
[T-Mobile LG G2x] KingDavid63:
your **** dont stick after reboot man... hit 1 and get a status....
[T-Mobile LG G2x] zeppelinrox:
Please use auto killer memory optimizer.

My script is only for people that can read and follow instructions.
[T-Mobile LG G2x] zimphishmonger:
Can you point out in the script where you set the launcher oom priority? I'm having trouble finding it w/ all your variables :p
[T-Mobile LG G2x] zeppelinrox:
heh... starts at line 948...

if [ "$opt" -eq 12 ]; then
echo " Applying BulletProof Launcher..."
echo ""
$sleep
if [ "$froyo" -eq 1 ]; then
sed -i 's/ro.HOME_APP_ADJ=.*/ro.HOME_APP_ADJ='$adj1/ /data/local.prop
else
sed -i 's/ro.HOME_APP_ADJ=.*/ro.HOME_APP_ADJ='$(($adj2-2))/ /data/local.prop
fi
echo " Launcher is no Longer Hard To Kill..."
echo ""
$sleep
echo " ...It's BULLETPROOF!"
else
echo " Applying Hard To Kill Launcher..."
echo ""
$sleep
if [ "$froyo" -eq 1 ]; then
sed -i 's/ro.HOME_APP_ADJ=.*/ro.HOME_APP_ADJ='$(($adj2-2))/ /data/local.prop
else
sed -i 's/ro.HOME_APP_ADJ=.*/ro.HOME_APP_ADJ='$(($adj2-1))/ /data/local.prop
fi
echo " ...Hard To Kill Launcher APPLIED!"
fi

OOM grouping is no longer exactly the same froyo and gingerbread.

Since gb has a perceptible app category, I decided to change it and take advantage of that added category to make bulletproofing safer (no chance of apps not opening up or fcing or running out of memory because launcher cant be killed)

my adj "boundaries" = 0,3,5,7,14,15 (stock is 0,1,2,4,7,15)

If you notice, I widened the space between boundaries at the front...

adj1=the first boundary = 0

adj2=the second boundary = 3

froyo - bp home = $adj1 = 0

in gb - bp home = $adj2-2 = 1

froyo - htk home = $adj2-2 = 1

in gb - htk home = $adj2-1 = 2

shhhh... don't tell anybody...
[T-Mobile LG G2x] zimphishmonger:
Thanks, I may use it somewhere. SO your basically just checking the build.prop for those variables? Am i just really tired or is this just the check code to see if they are prioritized? Where do you actually change the priorities?
[T-Mobile LG G2x] jerrycycle:
Create a folder in etc/inIt.d and insert these lines.

#!/system/bin/sh

# strict minfree handler

echo 1536,2048,4096,15360,17920,20480 >/sys/module/lowmemorykiller/parameters/minfree

You can then edit the values to your liking.
[T-Mobile LG G2x] tokyomonster:
any chance this may help with plants vs zombies or peggle on cm7?
[T-Mobile LG G2x] zeppelinrox:
In local.prop

That's the section where the script writes the "ro.HOME_APP_ADJ=" line to local.prop.

The first "if" is for apply bp or htk launcher.

The next "if" that it encounters will apply the "ro.HOME_APP_ADJ=" entry with a value that depens on whether you have froyo or not
[T-Mobile LG G2x] zeppelinrox:
Actually, I totally forgot....

Minfree Manager will do this and won't run in memory on boot either... it just makes a script in the init.d folder.

However, the grouping rearrangement won't be applied.

SuperCharging and only applying minfrees will actually SCREW THINGS UP!

Oh crap... That could be why zimphishmonger has the lag??

Priorities are set in local.prop but the grouping categories don't match up with those priorities!

If you only apply minfrees, your ROM will still be using 0,1,2,4,7,15 boundaries so htk launcher (priority 2) will be in slot 3 and would get killed at your slot 3 value which could be 75mb with MegaRAM2!

Also, secondary server apps (priority 5), which are apps that you just ran, will be in slot 5 and get killed at the slot 5 value which, is 125 mb with MegaRAM2...

Ya... so either apply 99SuperCharger with Script Manager

or don't apply anything.

Couldn't hurt.

Why doesn't it run?
[T-Mobile LG G2x] overground:
Just wanted to say thanks to zeppelinrox for the great script. Made my (in the words of the script) "Weak Ass Launcher" like new. Thanks again! :)
[T-Mobile LG G2x] KingDavid63:
Trinity kernel with this..... Whew!
[T-Mobile LG G2x] richua:
Hey zep, is there a way to un-turbocharge the 3G Turbocharger settings? It's working well for me but I just need to roll back some settings to troubleshoot an app.
[T-Mobile LG G2x] zimphishmonger:
Okay, you got me slightly confused. Why do u think I was getting lag? Only using Minfree? I was using MegaRAM options 1 and 2, so its all done in the script. Autokiller and anything related was disabled. Also, I was using Script Manager, so Im not sure what situation you are talking about above. I was using only options in the script, ran using script manager as root, and applied MegaRAM 1 or 2. If it lagged, it lagged due to the settings enabled in the script. I tried that setup several times and had the same results, excellent performance initially but extremely sluggish performance after a few hours, along with some stalling\stuttering when recalling apps from RAM.

I went back to AutoKiller Agressive settings (for the moment) and disabled supercharger and the "lag after several hours due to cache filling" doesnt seem to occur, BUT the launcher does reload occasionally.

Seems we are on the right track, but the settings arent quite right for this device. I know we can forcefully flush the cache with a script, but liek I mentioned before, this should be done by Android without any user interacion. The phone should run for days without any need for a reboot or script re-run, with proper memory settings. Hoepfully we'll get there :) Thanks for your help

What is your final (next) suggestion then? Thanks!
[T-Mobile LG G2x] zeppelinrox:
Oh I don't know what I was thinking... for some reason I thought you were still using akmo to load minfrees :o

Are you finding it better with vfs cache set to 40 then?
[T-Mobile LG G2x] zimphishmonger:
Still testing, didnt have ANY time last night to play around. Will do some testign today and see how it works. Do you still recommend MegaRAM 1 ? It seems a little conservative, and multitasking is too aggressive for this phone (as we have more ram)
[T-Mobile LG G2x] zeppelinrox:
Yes, MR1 is meant more for multitasking for 512mb devices.

You must mean MR2 is too aggressive?

I'd go down the middle then with 60 in slot 3 so something like 6,12,60,70,80,100
[T-Mobile LG G2x] zimphishmonger:
Can I set that in AK? or should I just modify the script?
[T-Mobile LG G2x] zeppelinrox:
Option 10... Cust-OOMizer...

It will even remember custom settings and put them on the menu
[T-Mobile LG G2x] zimphishmonger:
Ill give that a shot, but Ill be honest.....after a few days of playing w/ this, Plain old autokiller on aggressive w/ advanced settings enabled still beats the script hands down for long term responsiveness & usability. I do like how the launcher doesnt have to redraw but it stutters while pulling it back up after a few hours (due to the cache being full I assume), negating any benefit. I think this script may need to be re-tweaked to work well with this device, im afraid.
[T-Mobile LG G2x] richua:
Which advanced settings do you have enabled?
[T-Mobile LG G2x] DJ "suMo*:
Thanks to richua, I finally got this up and running. Options 8 & 10 work great with the G2x. The original thread's visual walk through provided options 6 & 3 (balanced 3), followed by option 16, which is intended for the GT540.

Sent from a Nexus X by LG
[T-Mobile LG G2x] DJ "suMo*:
@zimphishmonger - Were you able to check out that BetterBatteryStats apk link I left in thread 1? Not too much off topic.. :]
[T-Mobile LG G2x] zimphishmonger:
With the latest update, all but the network tweaks as it doesnt do anything for what ive heard from other's testing
[T-Mobile LG G2x] richua:
Have you gotten any reboots yet from the kernel tweak?
[T-Mobile LG G2x] zimphishmonger:
Not since the recent update, and I was getting them hardcore before...took some troubleshooting to track that one down :( No issues now though.
[T-Mobile LG G2x] richua:
Lucky. Must be a kernel difference somewhere. I get a boot loop when I check the IO scheduler tweak even before I can exit Autokiller.
[T-Mobile LG G2x] zimphishmonger:
What kernel are you using? Ive only been testing on CM7 Nightly using Faux123's .3.5 kernel