[Tweak] Performance "Tweaks" (Updated 4/26/2011)

Apr 22, 2011
10
1
0
Visit site
Yeah forget about that permission code, stupidity from me.

About those build.prop settings I just ended up writting them directly into build.prop and save me the hassle.

The rest is pretty good as far as I know, I can't do much more about it. Maybe I'll change it into a .sh file where people can choose their own options easily, but I've been busy with the filesystems, mounting etc etc trying to squeeze everything from I/O together with ungaze.
 
  • Like
Reactions: JerryScript

JerryScript

Daydream Believer
Mar 8, 2011
2,055
1,559
0
Visit site
WOW!

I just applied everything in the OP's script minus the sqlite stuff at the end, and the difference in boot time alone was amazing, probably between 1/2 and 2/3 as long as normal. Everything is much snappier now, gallery, apps, launchers. Thanks to everyone who contributed to these tweaks!

Does this affect sync settings? I still want to update email, sms, and maps.
 
Apr 22, 2011
10
1
0
Visit site
No it doesn't. If you think it's snappy enough with the tweaks only try the libsqlite.so for 2.3.x. Anyway not trying to hijack this thread, but since this ones are based on the thread I created I updated the XDA topic with new stuff, just for general knowledge.
 

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
No it doesn't. If you think it's snappy enough with the tweaks only try the libsqlite.so for 2.3.x. Anyway not trying to hijack this thread, but since this ones are based on the thread I created I updated the XDA topic with new stuff, just for general knowledge.


The libsqlite.so I posted is different from yours. It was compiled for 2.2 with sync disabled.

I was testing your new stuff actually. This part gives me nothing but errors:

Code:
for a in $MTD $MMC
do

echo 1 > $a/queue/iosched/low_latency;
echo 16 > $a/queue/iosched/quantum;
echo 1 > $a/queue/iosched/back_seek_penalty;
echo 0 > $a/queue/iosched/slice_idle;
echo 248 > $a/queue/nr_requests;

done

Either permission denied or folder not found. I'm still trying to figure out why. If I try injecting it into a init.d script and doing cat on nr_requests, I can see that it hasn't been applied.
 
Apr 22, 2011
10
1
0
Visit site
The libsqlite.so I posted is different from yours. It was compiled for 2.2 with sync disabled.

I was testing your new stuff actually. This part gives me nothing but errors:

Code:
for a in $MTD $MMC
do

echo 1 > $a/queue/iosched/low_latency;
echo 16 > $a/queue/iosched/quantum;
echo 1 > $a/queue/iosched/back_seek_penalty;
echo 0 > $a/queue/iosched/slice_idle;
echo 248 > $a/queue/nr_requests;

done

Either permission denied or folder not found. I'm still trying to figure out why. If I try injecting it into a init.d script and doing cat on nr_requests, I can see that it hasn't been applied.

Are you using noop scheduler? If you are get back to CFQ or BFQ, I took the scheduler script out from the file since BFQ performs better than noop on my data2ext setup.
 

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
Please share feedback after the testing! My device is working awesomely good with roughly 2450 quadrant points (for comparison's sake).

I updated the script to match franciscofranco's. This script is pretty much identical to franciscofranco's (with a few mods). Most Optimus V users can't use franciscofranco's zip because init.d isn't supported with most of our kernels. I thought it was supported because I have a a2sd script that runs from there, but I think a2sd is using sort of hack to make it run. None of the other scripts I tried to run from there worked.

Because of this, I actually found an odd way to enable the script to run at boot and for all the setprop values to take. All I did was place the afterboot.sh script inside /system/etc/ and set the permissions "rwxrwxrwx".

Then I added two lines to the end of the a2sd script inside of /system/etc/init.d/
Code:
sleep 5;
sh /system/etc/afterboot.sh;

This caused the script to be run after all the other scripts have run. I checked and wifi scan was set to 300. So you may want to try something like this in your zip. Running the script with a delay. It's not the prettiest way, but it works.


My quadrant score is 635. I know it's not as impressive as yours, but I'm 99% the score is meaningless. I don't understand why my I/O score isn't higher. I'm using the same libsqlite.so used here (I was the one that gave it to them): Patched SQLITE3(libsqlite.so) for 2.2 and 2.3 - xda-developers
 
  • Like
Reactions: Liquidplacidity
Apr 22, 2011
10
1
0
Visit site
I updated the script to match franciscofranco's. This script is pretty much identical to franciscofranco's (with a few mods). Most Optimus V users can't use franciscofranco's zip because init.d isn't supported with most of our kernels. I thought it was supported because I have a a2sd script that runs from there, but I think a2sd is using sort of hack to make it run. None of the other scripts I tried to run from there worked.

Because of this, I actually found an odd way to enable the script to run at boot and for all the setprop values to take. All I did was place the afterboot.sh script inside /system/etc/ and set the permissions "rwxrwxrwx".

Then I added two lines to the end of the a2sd script inside of /system/etc/init.d/
Code:
sleep 5;
sh /system/etc/afterboot.sh;

This caused the script to be run after all the other scripts have run. I checked and wifi scan was set to 300. So you may want to try something like this in your zip. Running the script with a delay. It's not the prettiest way, but it works.


My quadrant score is 635. I know it's not as impressive as yours, but I'm 99% the score is meaningless. I don't understand why my I/O score isn't higher. I'm using the same libsqlite.so used here (I was the one that gave it to them): Patched SQLITE3(libsqlite.so) for 2.2 and 2.3 - xda-developers

That's pretty odd, but I'm glad it works!! I don't know squat about that "sleep" command, I've seen it somewhere else though. I'll have a look.

About your quadrant score let me ask you, do you have data2ext script from ungaze running? And what's your rom at the moment?
 

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
That's pretty odd, but I'm glad it works!! I don't know squat about that "sleep" command, I've seen it somewhere else though. I'll have a look.

About your quadrant score let me ask you, do you have data2ext script from ungaze running? And what's your rom at the moment?

I'm using Darktremor's A2SD. That has complicated things a bit. I tried following the directions to switch to ungaze's script, but that ended poorly. I'm using Rodimus, which is a Froyo rom, with the Xionia Kernel.
 
Apr 22, 2011
10
1
0
Visit site
You just gotta move all the stuff back to /data and then use his script. I bet that AOSP 2.3.x rom gives you more performance, but I don't know the rom state, just talking from my mouth off.
 

Liquidplacidity

Well-known member
Feb 8, 2011
153
20
0
Visit site
That's pretty odd, but I'm glad it works!! I don't know squat about that "sleep" command, I've seen it somewhere else though. I'll have a look.

About your quadrant score let me ask you, do you have data2ext script from ungaze running? And what's your rom at the moment?

pm.sleep command is the equivalent of a laptops sleep mode, apparently. It puts the phone in ultra low power mode when screen off. It's called power collapse.
 

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
pm.sleep command is the equivalent of a laptops sleep mode, apparently. It puts the phone in ultra low power mode when screen off. It's called power collapse.

In this case, I was referring to the script command "sleep"

"sleep 5" - As in pause the script for five seconds.
 

Liquidplacidity

Well-known member
Feb 8, 2011
153
20
0
Visit site
Are you sure that it works? I was using that line on the .prop but I took it out because I think my phone didn't like it.

Before using any of the tweaks, I edited my build.prop file with the sleep line and one more. It seems to actually work. When my phone use to idle overnight,it would be at 93% after 8 hours, 15 minutes. Now with only those edits, it gets to 93% at 11 hours, 23 minutes. It sure did something. Even if it just makes a little difference, I try to get as much battery as possible. This is with Wifi, Bluetooth, GPS and Data all off. I always have it that way until I need them.
 

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
You just gotta move all the stuff back to /data and then use his script. I bet that AOSP 2.3.x rom gives you more performance, but I don't know the rom state, just talking from my mouth off.

Well, I couldn't make the move to ungaze's script without loosing all my apps, but I did manage to activate data2ext via a2sd. There is a built in command that does it. I also moved the dalvik cache to my internal storage using a2sd's built in command "nocache". I then added the dalvik-cache to RAM script by hand to the a2sd init.d script. That did the trick I guess. My quadrant score jumped to 850. That's the highest I've gotten it on Froyo.

Again, the score doesn't matter at all. The phone feels just as fast as it did before. But I like the idea of the dalvik cache not doing excessive writes to my internal storage or my sd card.
 

denshigomi

Well-known member
Feb 14, 2011
117
12
0
Visit site
I get errors in this loop:
Code:
for a in $MTD $MMC
do
echo 1 > $a/queue/iosched/low_latency;
echo 16 > $a/queue/iosched/quantum;
echo 1 > $a/queue/iosched/back_seek_penalty;
echo 0 > $a/queue/iosched/slice_idle;
echo 248 > $a/queue/nr_requests;
done

# ==== ERRORS ====
#cannot create /sys/block/[mtdblock0-8 | mmcblk0]/queue/iosched/low_latency: directory nonexistent
#cannot create /sys/block/[mtdblock0-8 | mmcblk0]/queue/iosched/quantum: directory nonexistent
#cannot create /sys/block/[mtdblock0-8 | mmcblk0]/queue/iosched/back_seek_penalty: directory nonexistent
#cannot create /sys/block/[mtdblock0-8 | mmcblk0]/queue/iosched/slice_idle: directory nonexistent
I checked, and the iosched directories exist, but they are empty and I cannot create new files in them.

I also get errors in this loop:
Code:
for i in \
`find /data -iname "*.db"`
do \
	sqlite3 $i 'VACUUM;';
done

# ==== ERRORS ====
#Error: no such collation sequence: UNICODE
#Error: no such collation sequence: PHONEBOOK
#Error: no such collation sequence: LOCALIZED
 

mmarz

Well-known member
Mar 9, 2011
1,130
447
0
Visit site
I get errors in this loop:
Code:
for a in $MTD $MMC
do
echo 1 > $a/queue/iosched/low_latency;
echo 16 > $a/queue/iosched/quantum;
echo 1 > $a/queue/iosched/back_seek_penalty;
echo 0 > $a/queue/iosched/slice_idle;
echo 248 > $a/queue/nr_requests;
done

# ==== ERRORS ====
#cannot create /sys/block/[mtdblock0-8 | mmcblk0]/queue/iosched/low_latency: directory nonexistent
#cannot create /sys/block/[mtdblock0-8 | mmcblk0]/queue/iosched/quantum: directory nonexistent
#cannot create /sys/block/[mtdblock0-8 | mmcblk0]/queue/iosched/back_seek_penalty: directory nonexistent
#cannot create /sys/block/[mtdblock0-8 | mmcblk0]/queue/iosched/slice_idle: directory nonexistent
I checked, and the iosched directories exist, but they are empty and I cannot create new files in them.

I also get errors in this loop:
Code:
for i in \
`find /data -iname "*.db"`
do \
	sqlite3 $i 'VACUUM;';
done

# ==== ERRORS ====
#Error: no such collation sequence: UNICODE
#Error: no such collation sequence: PHONEBOOK
#Error: no such collation sequence: LOCALIZED

Which rom are you using?

The only error I get is the phonebook error, and I haven't been able to figure that out.

Which scheduler are you running?

If you don't know, try running this in adb shell:

cat /sys/block/mtdblock0/queue/scheduler

and paste the reply here.
 
  • Like
Reactions: denshigomi

denshigomi

Well-known member
Feb 14, 2011
117
12
0
Visit site
Which rom are you using?

The only error I get is the phonebook error, and I haven't been able to figure that out.

Which scheduler are you running?

If you don't know, try running this in adb shell:

cat /sys/block/mtdblock0/queue/scheduler

and paste the reply here.
Oh duh! My scheduler is noop.
It looks like that's the only scheduler available on my kernel (using aospCMod CM7).
It makes sense that iosched options wouldn't be available for noop.

Code:
cat /sys/block/mtdblock0/queue/scheduler
[noop]

As for the collation sequence errors, they seem to be related to custom sqlite collations that were added in Android 2.2, but aren't available in the sqlite3 binary we're using.
So in your case, that's just preventing sqlite3 from running the vacuum command on your contacts database.
http://code.google.com/p/cyanogenmod/issues/detail?id=2251
 
Last edited:

Members online

Trending Posts

Forum statistics

Threads
943,214
Messages
6,917,869
Members
3,158,890
Latest member
Sáenz