yashsingh1/xdaforums huggingface dataset:
[Optimus One, P500 Android Development] ungaze:
Maybe I was just confused so NVM

BTW, how can we know which scheduler we are currently using? Using this:

cat /sys/block/*/queue/scheduler

I get either

noop [deadline]
[noop] deadline
none

how come it's showing 2 schedulers? and which one is the one we are actually using?
[Optimus One, P500 Android Development] franciscofranco:
That means your kernel supports both schedulers: noop and deadline. The one inside the [] brackets is the one that is selected.

Removed the dm* block from the script. Seems it causes some problems because that block is rarely mounted, if ever.
[Optimus One, P500 Android Development] ungaze:
Got it. BTW this is what I'm currently using.

for i in `[B]busybox[/B] ls -1 /sys/block/mtdblock*`
do
echo "noop" > $i/queue/scheduler;
done

echo "noop" > /sys/block/mmcblk0/queue/scheduler;
echo "noop" > /sys/block/dm-0/queue/scheduler;
[B]echo "noop" > /sys/block/dm-1/queue/scheduler;[/B]

BTW, system on RAM(data on RAM, chache on RAM or anything on RAM) is a no go huh? Been reading about it and it seems that most people agree that we gain less than what we lose with that setup.

-----------

For noatime, I'm using this instead:

for k in $(busybox mount | grep relatime | cut -d " " -f3)
do
sync
busybox mount -o remount,noatime $k
done

Using the one on first page, found out that I was only mounting one or two partitions as noatime. With this lines, almost all(if not all) partitions get mounted as atime. Only tested with terminal, still testing real life usage.(still reading about nodiratime)
[Optimus One, P500 Android Development] franciscofranco:
You can get rid of those dm* blocks I think. I have dalvik-cache on RAM instead of SD card, and I really notice performance improvements. Now data or system on RAM I do not know tbh.
[Optimus One, P500 Android Development] ungaze:
Great, are you using andy's suggestion, or still using the original not-so dirty hack on it?

BTW found this about nodiratime:

So if we're using noatime, no need to set nodiratime as well.
[Optimus One, P500 Android Development] franciscofranco:
Awesome, I'll change the script in a sec. I'm not using andy's suggestion because that involves changing init.rc and I don't want to mess with it. I'd rather break the FHS and mount it on /dev without any problems.

Have you tried it?
[Optimus One, P500 Android Development] ungaze:
no, not yet. Filtering out the scripts on which ones provides performance without drawing some battery from my phone. Honestly, I'd rather have a stock performing phone with better battery than a more fluid phone with less battery. So far so good though, applied almost all scripts without a hit on the battery. local.prop up next.

back to Dalvik-Cache on RAM, can you describe what you are experiencing? How does it affect your RAM pool? Do you experience micro lags? Battery life change? I guess longer boot time is a given. Are you using the same script stated on the guide?

Another thing, can't seem to find anything(or exactly) about this:

for i in \
`find /data -iname "*.db"`
do \
sqlite3 $i 'VACUUM;';
done

any links or explanation about this?
[Optimus One, P500 Android Development] franciscofranco:
Yes I'm using exactly the same script, it works flawlessly. I experience faster app opening, closing, overall usage is faster. Obviously it depends on the amount of apps that you have, but I experience no RAM pool hit appart from the size of the dalvik cache folder. We have tons of RAM to use, I'd rather use it since it's the fastest memory avaliable. And no, no micro lags.

Which tweaks haven't you applied?
[Optimus One, P500 Android Development] ungaze:
echo "4096" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
echo 4096 16384 256960 > /proc/sys/net/ipv4/tcp_wmem;
echo 4096 87380 256960 > /proc/sys/net/ipv4/tcp_rmem;

echo "0" > /proc/sys/vm/swappiness;
echo "95" > /proc/sys/vm/dirty_ratio;
echo "1" > /proc/sys/vm/vfs_cache_pressure;
echo "4096" > /proc/sys/vm/min_free_kbytes;
echo "1" > /proc/sys/vm/oom_kill_allocating_task;
echo "0" > /proc/sys/vm/laptop_mode;
echo "0" > /proc/sys/vm/dirty_expire_centisecs;
echo "60" > /proc/sys/vm/dirty_background_ratio;
echo "1536,3072,4096,21000,23000,25000" > /sys/module/lowmemorykiller/parameters/minfree;
echo "6000" > /proc/sys/vm/dirty_writeback_centisecs;

echo "8" > /proc/sys/vm/page-cluster;
echo "1000" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate;
echo "2048" > /proc/sys/kernel/msgmni;
echo "64000" > /proc/sys/kernel/msgmax;
echo "10" > /proc/sys/fs/lease-break-time;

All this are not yet applied. Still testing the other ones I've changed overnight(best time to test IMO lol). You're right about our RAM pool, never goes down below 200 for me. BTW some ROMs has their own minfree settings, will this override it:

echo "1536,3072,4096,21000,23000,25000" > /sys/module/lowmemorykiller/parameters/minfree;

or will the ROMs setting precede over this? My ROM has one and probably won't apply this one. Might wanna add a warning about using minfree managers along with this one just for info.
[Optimus One, P500 Android Development] franciscofranco:
Overnight testing is the best time indeed =P

It will most likely override ROM settings because you're changing directly into minfree.

Have you tried?
[Optimus One, P500 Android Development] franciscofranco:
It optimizes de databases, getting rid of fragmentation and reorganizing the db entries sequentialy. You can google sqlite vacuum and read about it

EDIT: Flashable .zip added. First post cleaned up. Test it and send feedback.
[Optimus One, P500 Android Development] kly91:
Great..I guess i won't be hard up now in updating the tweaks i've already applied..:)

So now i just flash it over the previous tweaks made..
[Optimus One, P500 Android Development] Magnumutz:
So, if we flash the zip, will they run at boot?

And will there be an undo zip too?
[Optimus One, P500 Android Development] franciscofranco:
Why dont you download the file and see for yourself? It just adds the file into init.d folder, easy as that.
[Optimus One, P500 Android Development] Zerobarat1:
Damn it, incoming dumb question from me:

Does the new flashable zip contain thhe Dalvik to ram " experiment"?

Still getting used to xda premium app and can't really check scripts
[Optimus One, P500 Android Development] lupohirp:
francisco does this zip contain also the sqllite libraries that you tested with mik_os in cyanogenmod?
[Optimus One, P500 Android Development] ungaze:
when applying franco's zip, make sure you either:

don't have my script installed, simple enuf

remove my script if you do have it, undo.zip can be found on dy thread

or

simply delete scriptz folder on sdcard.

btw, dalvik cache on ram is not included afaik.
[Optimus One, P500 Android Development] franciscofranco:
Either dalvik to ram or the updated libsqlite arent present on the .zip .

Thanks for the explanation ungaze.
[Optimus One, P500 Android Development] Samhain77:
Do you know if I can just copy the 99tweaks file on "/system/etc/init.d/" when building a ROM to have that enabled?
[Optimus One, P500 Android Development] Zerobarat1:
Hmmm I am not able to download this via phone. Using dolphin mini and default browser

Can someone attach it?
[Optimus One, P500 Android Development] franciscofranco:
Most likely so, yes.
[Optimus One, P500 Android Development] taha198:
Strange, I was able to download it with stock browser. Anyway here is direct link

https://www.dropbox.com/s/9rl7t16enuu0i53/p500_tweaks.zip
[Optimus One, P500 Android Development] franciscofranco:
Can anyone tell me if it works or not?
[Optimus One, P500 Android Development] blueren:
n00b question... does the flashable zip contain all of the tweak scripts?
[Optimus One, P500 Android Development] miedy12:
Hey um gonna use this but what is ungaze tweak about?
[Optimus One, P500 Android Development] franciscofranco:
It has all the shell scripts that I had in the first post. Download and see for yourself.
[Optimus One, P500 Android Development] miedy12:
Franco should i only need to flash it or also need for ungaze?
[Optimus One, P500 Android Development] Samhain77:
It seems to work very fine in my custom rom!

Great Work!
[Optimus One, P500 Android Development] franciscofranco:
I will only say this once for the end of the thread: my .zip contains all the shell scripts. ungaze's work is a DIFFERENT METHOD to use the shell scripts. Either you use one or the other. I won't answer this question again if anyone asks it ;)
[Optimus One, P500 Android Development] Samhain77:
Mmmm... I really don't know why you're always explaining the same thing! :P
[Optimus One, P500 Android Development] kewlsid05:
More n00bness. I am on Stock ROM. Should i flash the zip or should i use kpbotbot's scripts for Stock ROM?
[Optimus One, P500 Android Development] miedy12:
He said if your on stock. Right
[Optimus One, P500 Android Development] miedy12:
Hey thanks just flashed it now i feel the difference. Please answer me what if i restart my phone should i need to flash again dont mad plss
[Optimus One, P500 Android Development] Samhain77:
No
[Optimus One, P500 Android Development] kewlsid05:
Alright to flash on stock rom?
[Optimus One, P500 Android Development] Magnumutz:
I flashed and it's OK, on GB from Andy.
[Optimus One, P500 Android Development] kly91:
after more time of testing it i found that due to this tweaks i got faster application response and even a faster processing of actions in applications like for a batch backup or restore in titanium or exporting or importing of contacts..It's a great Tweak..keep it up Francisco..
[Optimus One, P500 Android Development] franciscofranco:
First of all...why in the hell are you running stock? Second, if you have busybox flash it, if you don't have busybox, get it. If you don't want busybox apply kpbotbot script, but beware, it isn't updated with the latest tweaks.
[Optimus One, P500 Android Development] franciscofranco:
Awesome, enjoy :)
[Optimus One, P500 Android Development] fxarun:
Really great tweaks ! After testing a while really noticed performance and battery life improvements ! keep it going fransisco ...

Really your flashable zip helped a lot !
[Optimus One, P500 Android Development] zanywood:
Just came from HTC to LG. Is my phone in ur forum?
[Optimus One, P500 Android Development] Stumpalump:
UPDATE: After much playing with settings on my p509, I have managed to get battery life to better than stock IMO.

I am using all the init scripts and not the prop edits now.

Also, in cm7 governor settings I have it at 122-600 using the ondemand governer. For those who don't know, interactive will be very fast to scale up CPU when needed, but slow to scale back down after usage spike. Ondemand will scale it up and down immediately according to demand.

Also did turn off the edge glows when scrolling as I noticed these were spiking CPU. Last thing I changed was to turn off surface dithering. I did this because I remember it eating battery on stock rom.

Phone is plenty snappy for me and loving this new-found battery life.
[Optimus One, P500 Android Development] cg87:
The part to change sampling rate is not working

echo "1000" > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate;

Also where can I find the sqlite3 binary for the Optimus One? My phone doesn't have it and it will not run the the sqlite3 tweaks.
[Optimus One, P500 Android Development] franciscofranco:
Try 480 min and 691/728 max with ondemand, having 480 min instead of 122 boosts your performance and it doesn't eat extra battery ;)

Thanks for the other suggestions though!
[Optimus One, P500 Android Development] franciscofranco:
Every phone has the libsqlite.so binary as far as I know, so the tweaks will work.

That part about the cpu sampling rate...it worked for me.. Which rom are you using?
[Optimus One, P500 Android Development] franciscofranco:
I'm so glad it worked for you :)
[Optimus One, P500 Android Development] kewlsid05:
I dont know. I am pretty content with Stock. I dont want to skin my phone ala GB theme etc so no need to de odex. I have root access so i have removed all the bloatware. I have the OC kernel so i am on 729/245/interactive. I have the lagfix kernel so no touch lags.

Beyond that i dont know what a custom ROM will get me... I'll be glad if someone told me further benefits of a custom ROM. I am a bit of a n00b.

I have busybox. Thanks for the tweaks! I'll just go ahead and flash it. Of course after making a nandroid backup! :)
[Optimus One, P500 Android Development] Stumpalump:
Oh sorry I forgot to mention that I did try this and wasn't happy with the results. Will test again though.
[Optimus One, P500 Android Development] franciscofranco:
Seems like a good reason =p

Try 480 minimal frequency like I suggested above. Enjoy!
[Optimus One, P500 Android Development] miedy12:
What battery scripts yoy used?
[Optimus One, P500 Android Development] sovikhaque:
It's been over 16 hours since I disconnected charger. Over 70% battery left. The script is worth the try
[Optimus One, P500 Android Development] franciscofranco:
Thank you for your input :)

I'll release a flashable local.prop soon as well.
[Optimus One, P500 Android Development] Zerobarat1:
Lol , XDA prem app feels overpumped with your tcp patch :) . Using andy's build btw ;)
[Optimus One, P500 Android Development] franciscofranco:
local.prop flashable .zip added. Instructions added as well.
[Optimus One, P500 Android Development] kewlsid05:
My battery life was 50% when i flashed the tweaks zip. It went to 8% in less than 5 hours.... :eek: :(

Should i wait for a full charge and see how it works or should i NAND restore? Or can anyone help me debug why it happened?
[Optimus One, P500 Android Development] lekhwani:
Link not working.
[Optimus One, P500 Android Development] franciscofranco:
Yes it is, just tested it myself.
[Optimus One, P500 Android Development] kewlsid05:
A little help please, franco on that battery situation.
[Optimus One, P500 Android Development] taha198:
First try a full charge. It it won't improve, just nand restore.
[Optimus One, P500 Android Development] taha198:
If you are using phone stock browser, link will open as HTTP twice. Just remove one HTTP
[Optimus One, P500 Android Development] ungaze:
@stumpalump

Are these CM7 only options? If not, how did you disable these stuff?

Try to observe more with full battery, If symptoms still persists, then restore. I'll try to clean up my thread for those like you who are having problems with these tweaks.
[Optimus One, P500 Android Development] kewlsid05:
@Taha198 and ungaze: That was what i was thinking too. I'll give it another shot. Thanks for the help mates :)
[Optimus One, P500 Android Development] franciscofranco:
Ungaze those are CM7 only options. I mean you add dithering to build.prop, but it's not there by default. The scrolling is CM7 only.

@kewlsid05 Like they said, first full charge, there you can test it propely.
[Optimus One, P500 Android Development] lekhwani:
What can we expect from local.prop file.
[Optimus One, P500 Android Development] Zerobarat1:
Flashed local prop , works with andy's build ;) .

Also testing with min freq 480.
[Optimus One, P500 Android Development] franciscofranco:
Download and see for yourself ;)
[Optimus One, P500 Android Development] lekhwani:
Had previously flashed tweaks zip. Now flashed local prop over it. Feek the same as before. Everything is same but going from one screen to another is a little laggy than before.
[Optimus One, P500 Android Development] blueren:
I flashed local.prop too.. my experiences are same as above.. somewhat laggy while switching between screens. Not as smooth as it was
[Optimus One, P500 Android Development] Zerobarat1:
Strange , no lag here ....
[Optimus One, P500 Android Development] theb3s7:
Wow! Indeed I felt an improvement in Internet speed.

Thanks a lot!
[Optimus One, P500 Android Development] sovikhaque:
Flashed the other zip. didn't really feel the difference yet. But found huge difference after flashing tweaks zip. Charged my phone to 100%and then had wi fi on all night, defrost google maps. when i woke up i saw 7% drain which was new cause it used to be around 30%. Had the phone on all day with wi fi and 3g on, used fring to send few messages, constant push messages from cricinfo site with score update and then spent 3 hours talking on the phone. any other day my phone would have died but its been nearly 22 hours and i still have 10% juice in my battery.

Before flashing the tweaks.zip, i had no idea what it would do to my phone but had faith in xda forum and i am glad that i did. and now waiting for local_prop.zip to show its magic. I still don't know what difference that zip will make but i was ready to leap of faith
[Optimus One, P500 Android Development] franciscofranco:
Local.prob cant be the reason for the so called lag, it only contains improvements, while one of them increases launcher performance making it stay in memory. If you experience that lag just delete local.prob from /data and reboot, either way I cant explain that lag.
[Optimus One, P500 Android Development] Samhain77:
I flashed the local.prob and feel no real difference for now. But I have no lag on the homescreen switching...
[Optimus One, P500 Android Development] cg87:
Yes its has the libsqlite.so but it needs the sqlite3 binary here

sqlite3 $i 'VACUUM;';

Also the tweak to change the sampling rate works when I execute it manually. But it doesn't change it when it is executed from the init.d folder. Its kind of wierd because all the other tweaks are fine.

Can anyone try this after a reboot and see if the values are changed?

cat /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
[Optimus One, P500 Android Development] lekhwani:
No lag while switching screen as I said before.
[Optimus One, P500 Android Development] lekhwani:
On Andy rom I have applied Rovers theme which shows battery in 1% steps. Many other themes also use this feature. We are here trying to give some more life to battery. But don't you think 1% steps battery and highly animated themes also suck out juice from battery.
[Optimus One, P500 Android Development] franciscofranco:
I downloaded the sqlite3 and now I'm testing it on the phone. Let's see what comes from that.

Indeed the sampling rate doesn't change values over reboot...I'll take a look after I get some sleep ;)
[Optimus One, P500 Android Development] Zerobarat1:
Sorry francisco, but 480 min freq is not the way to go bro. I lost 15% battery while sleeping in 8 hour with nothing turned on.

Cheers anyway
[Optimus One, P500 Android Development] kly91:
good thing it went well for me as i got 8% for 6 hours of sleep with only the gps turned on..and i'm using cm7 by mik_os..

It seems that as the days pass by i'm beginning to discover the results of these tweaks..again, great job sir franciscofranco..
[Optimus One, P500 Android Development] blueren:
somehow something isn't alright for me.. :( I've noticed that my battery drain is significantly higher than before.. Noticed this from the past two days.. roughly around the same time I flashed the first tweak zip. :(

Is there any way to undo the tweaks? (apart from nand restore) I'd like to revert and see if this is really the case.
[Optimus One, P500 Android Development] franciscofranco:
To delete the tweaks go to /system/etc/init.d and delete 99tweaks file and reboot.
[Optimus One, P500 Android Development] blueren:
Thanks. How do I undo the local prop?
[Optimus One, P500 Android Development] franciscofranco:
Same thing but from /data.
[Optimus One, P500 Android Development] kly91:
Francisco i have a problem..Before flashing the tweaks and local.prop i got 58 fps in neocore but after flashing the .zips i only got 27 for now..After a reboot i got 34.1

..What do you think went wrong?
[Optimus One, P500 Android Development] franciscofranco:
That is really strange. Can you give me more info like what is your rom etc etc..that will help debugging any problems because I'm using exactly the same files and my neocore runs with 62 fps.
[Optimus One, P500 Android Development] kly91:
oh sorry for that.. I'm using Cm7 beta 6..after more reboots now i have 50.1 -51.9..not too bad but i sure hope it was at the supposedly 54-56 fps for the beta 6.
[Optimus One, P500 Android Development] franciscofranco:
Turn off sync, wifi, 3g, gps, live wallpaper (if you have it), and run neocore again please.
[Optimus One, P500 Android Development] kly91:
yup..i already have turned those off..just this time i have 46.6fps..i'll try it again.

And again i got 45.0..hmm..I think i'll let the tweaks sink in my phone for a while then try again by tomorrow..I'll keep it posted here..
[Optimus One, P500 Android Development] franciscofranco:
That's really really strange. You have both local.prop and tweaks?
[Optimus One, P500 Android Development] franciscofranco:
In a few hours I'll release a new version with some neat stuff. I'll update the first post with a changelog soon.
[Optimus One, P500 Android Development] ngarcesp:
Hi everybody, i just wanted to know if i need to do anything besides flashing the two zip files to get this working. THANKS!
[Optimus One, P500 Android Development] kly91:
Great..thanks in advance..BTW with regard to your question a while a go, i have flashed both the local.prop and the tweaks zip
[Optimus One, P500 Android Development] franciscofranco:
Read the first post.
[Optimus One, P500 Android Development] ungaze:
Also updated my thread now with the individual tweaks(currently incomplete) for those having some problems with Franco's complete script.

I myself am not having any problem with franco's scripts but I really notice some battery drain. Still pinpointing which one is causing it.

Check out my sig.

@Franco

Are you using the patched libsqlite.so from mik?
[Optimus One, P500 Android Development] franciscofranco:
Yes, along with sqlite3 binary for the VACCUM command on the script. I'll release an updated flashable .zips with all of this soon enough, just polishing some tweaks before I upload/edit/etc.
[Optimus One, P500 Android Development] ungaze:
Don't know what this is, but does all network allow this(DTM)? Maybe this can cause battery drain on some incompatible network.
[Optimus One, P500 Android Development] franciscofranco:
Maybe, I'll disable it then and test.
[Optimus One, P500 Android Development] franciscofranco:
Updated changelog for the next release.
[Optimus One, P500 Android Development] kly91:
Sweet!..Are the zip files edited already sir? or by the words "next release" means they are not yet edited?sorry kinda dumb to ask

OOps..don't mind this question..i can see the new zips now..XD
[Optimus One, P500 Android Development] franciscofranco:
Files updated and ready to flash :)

Few notes:

ro.ril.disable.power.collapse=0

local.prop: pm.sleep_mode=1

These two lines added to local.prop should increase battery life because it enables some power saving mode. If you want to know more about it I suggest googling.

The rest is pretty explicit.

Again, I ask for feedback it's very important!
[Optimus One, P500 Android Development] franciscofranco:
So, any news?
[Optimus One, P500 Android Development] kly91:
sorry..nothing really yet..haven't had the time..i'm trying to fix my boot screen first.

But i have already applied it..anyway based on my usage i think the previous tweaks are faster..however this is just my initial observation..I have not really placed attention to it so i'm not that sure of what i'm experiencing..I'd try later.
[Optimus One, P500 Android Development] franciscofranco:
Ok. That must be placebo effect, none of the edited/new tweaks can cause slowdown. Either way post back once you get to a conclusion, I'm rather curious about your case.
[Optimus One, P500 Android Development] Magnumutz:
Flashed the libsqlite on Andy's 2.1 rom and the phone booted up nicely, will benchmark now :D

Later Edit: Quadrant Advanced doesn't report any major I/O score improvement...

However, internet via Wi-Fi does feel a bit faster :)
[Optimus One, P500 Android Development] franciscofranco:
Gah I can't sleep! Benchmarks mean nothing, you'll notice improvements overtime while using your device! Yeah internet is pretty faster now.