FORUMS
Remove All Ads from XDA

[CM7][CM9]Speed and Smoothness Tweaks

853 posts
Thanks Meter: 349
 
By adamdelozier, Senior Member on 16th February 2012, 08:15 PM
Post Reply Email Thread
I have posted this in development, but thought General may be a better place for me peeps to see...YMMV!!!

SO...I wanted to give some performance enhancments that i have implemented on my NC. These have come from settings I have tweaked on my Epic 4G, that have seemed to GREATLY improve the smoothness and increased my wifi speeds. The first set of tweaks come courtesy of marcusant. His thread can be found here In the Epic 4G forums http://forum.xda-developers.com/show....php?t=1346680 This is to be copied into the sysctl.conf file located in /system/etc/. If its not there just create it.

net.ipv4.tcp_ecn=0
net.ipv4.route.flush = 1
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_no_pmtu_disc = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_rmem = 4096 39000 187000
net.ipv4.tcp_wmem = 4096 39000 187000
net.ipv4.tcp_mem = 187000 187000 187000
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_moderate_rcvbuf = 1


The first 4 tests in the attachment were prior to this tweak on CM9.

The next set of tweaks is courtesy of this thread http://forum.xda-developers.com/show...42047&page=439.

In Rom Toolbox (Note: to make changes using ROM Toolbox, you will need to purchase the pro version) I also changed some other settings as follows:
Under Kernel Tweaks, sysctl Conf:
Min Free: 4096
Dirty Ratio: 90
Background Ratio: 70
VFS Cache: 1
Oom Kill is checked

Under build.prop tweaks:
LCD: 240 (this is not used for the NC)
Ring Delay: 0 (this is not used for the NC)
VM Heap: 32m
Scan Interval: 300
Max Events: 150 (this is not used for the NC)

Under Auto Memory Manager:
Foreground: 6 MB
Visible: 8 MB
Secondary: 16 MB
Hidden: 30MB
Content: 40 MB
Empty: 50 MB

SD Boost value is at 4096 kb

And the changes to build.prop that I got from Biggoron:

Change:
davlik.vm.heapsize=92m (should originally be 32m)

Add: (these do not exist and must be manually added)
davlik.vm.heapstartsize=5m
davlik.vm.heapgrowthlimit=32m (thanks Bigoron)

I take NO credit for these tweaks, and no responsibility if it melts your NC! But I have found these tweaks to bring a HUGE improvement to my NC.

Also, my performance settings for CM9 are:
Governor: InteractiveX
CPU Steps: 300, 600, 825, 1100, 1300
All at stock voltages.

Good luck and let me know any results or changes that may work better!
Attached Thumbnails
Click image for larger version

Name:	Wi-Fi Results.jpg
Views:	915
Size:	23.8 KB
ID:	904901  
The Following 4 Users Say Thank You to adamdelozier For This Useful Post: [ View ] Gift adamdelozier Ad-Free
 
 
16th February 2012, 08:27 PM |#2  
Senior Member
Flag Austin, TX
Thanks Meter: 126
 
More
This is very intriguing. Quick questions:

Is there any way to do this without the ROM Toolbox?

Also, are these related or overlapping (even conflicting) with the changes in the V6 Supercharger script?

FWIW, I think most of this could likely be compiled into a script that would apply the changes all at once, right?
16th February 2012, 08:35 PM |#3  
adamdelozier's Avatar
OP Senior Member
Milford, CT
Thanks Meter: 349
 
More
Quote:
Originally Posted by mr72

This is very intriguing. Quick questions:

Is there any way to do this without the ROM Toolbox?

Also, are these related or overlapping (even conflicting) with the changes in the V6 Supercharger script?

FWIW, I think most of this could likely be compiled into a script that would apply the changes all at once, right?

I haven't looked, but honestly, these are probably all housed in build.prop. I already had ROM Toolbox, so I just went with it. I know tnpapadakos complied the tweaks into the latest CM9 nightly here

The Auto Memory Manager portion is exactly what V6 changes for the OOM limits. So there may be some conflicts there. I dont believe the rest would conflict. I am definitely no dev, but have poked around in enough of the files to almost act like I know what I am doing!
16th February 2012, 09:43 PM |#4  
Senior Member
Flag Austin, TX
Thanks Meter: 126
 
More
Quote:
Originally Posted by adamdelozier

This is to be copied into the sysctl.conf file located in /system/etc/. If its not there just create it.

net.ipv4.tcp_ecn=0
net.ipv4.route.flush = 1
net.ipv4.tcp_rfc1337 = 1
net.ipv4.ip_no_pmtu_disc = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_fack = 1
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_rmem = 4096 39000 187000
net.ipv4.tcp_wmem = 4096 39000 187000
net.ipv4.tcp_mem = 187000 187000 187000
net.ipv4.tcp_no_metrics_save = 1
net.ipv4.tcp_moderate_rcvbuf = 1

That can easily be done with a script. Maybe I will try my hand at it and see how it works.

FWIW, I plan to research some of this and determine precisely what it is doing besides the default. I did a lot of this kind of work with a linux networking appliance that I developed for at my last job.

Quote:

In Rom Toolbox (Note: to make changes using ROM Toolbox, you will need to purchase the pro version) I also changed some other settings as follows:
Under Kernel Tweaks, sysctl Conf:

Min Free: 4096
Dirty Ratio: 90
Background Ratio: 70
VFS Cache: 1
Oom Kill is checked

These are also in sysctl.conf. You could just add these lines, in addition to the ones you listed above:

vm.min_free_kbytes = 4096
vm.dirty_ratio = 90
vm.dirty_background_ratio = 70
vm.vfs_cache_pressure = 1
vm.oom_kill_allocating_task = 1

Quote:

Under build.prop tweaks:
LCD: 240 (this is not used for the NC)
Ring Delay: 0 (this is not used for the NC)
VM Heap: 32m
Scan Interval: 300
Max Events: 150 (this is not used for the NC)

These can be done by editing build.prop manually.

you want:

dalvik.vm.heapsize=32m
wifi.supplicant_scan_interval=300

(you say the others are not used)

Quote:

Under Auto Memory Manager:
Foreground: 6 MB
Visible: 8 MB
Secondary: 16 MB
Hidden: 30MB
Content: 40 MB
Empty: 50 MB

SD Boost value is at 4096 kb

These, I am guessing, are similar or in the similar vein as the V6Supercharger script.

Quote:

And the changes to build.prop that I got from Biggoron:

Change:
davlik.vm.heapsize=92m (should originally be 32m)

Add: (these do not exist and must be manually added)
davlik.vm.heapstartsize=5m
davlik.vm.heapgrowthlimit=32m (thanks Bigoron)

Note the heapsize 92m is an overwrite of your other suggested setting from above.

Quote:

Also, my performance settings for CM9 are:
Governor: InteractiveX
CPU Steps: 300, 600, 825, 1100, 1300
All at stock voltages.

In my guide, I shared my settings which are similar, but I don't go past 1200. Tweaking the voltages down will probably improve your battery life.

I am going to try the tweaks for build.prop and sysctl.conf.
The Following User Says Thank You to mr72 For This Useful Post: [ View ] Gift mr72 Ad-Free
16th February 2012, 09:54 PM |#5  
adamdelozier's Avatar
OP Senior Member
Milford, CT
Thanks Meter: 349
 
More
Quote:
Originally Posted by mr72

That can easily be done with a script. Maybe I will try my hand at it and see how it works.

FWIW, I plan to research some of this and determine precisely what it is doing besides the default. I did a lot of this kind of work with a linux networking appliance that I developed for at my last job.



These are also in sysctl.conf. You could just add these lines, in addition to the ones you listed above:

vm.min_free_kbytes = 4096
vm.dirty_ratio = 90
vm.dirty_background_ratio = 70
vm.vfs_cache_pressure = 1
vm.oom_kill_allocating_task = 1



These can be done by editing build.prop manually.

you want:

dalvik.vm.heapsize=32m
wifi.supplicant_scan_interval=300

(you say the others are not used)



These, I am guessing, are similar or in the similar vein as the V6Supercharger script.



Note the heapsize 92m is an overwrite of your other suggested setting from above.



In my guide, I shared my settings which are similar, but I don't go past 1200. Tweaking the voltages down will probably improve your battery life.

I am going to try the tweaks for build.prop and sysctl.conf.

thanks for the detail. I am the type to try and ask questions later. Tats how I learn best! Any improvements you can make give us all a better experience.

Sent from my NookColor using xda premium
16th February 2012, 10:01 PM |#6  
Senior Member
Thanks Meter: 107
 
More
Interesting thread.

There is also a sysctl config app in the market that allows tweaking of the values.

For those that like to play with fire

from Terminal

su
sysctl -a > /sdcard/sysconfig.txt

will create a dump of all the known current values that the kernel is using.
16th February 2012, 10:08 PM |#7  
Senior Member
Flag Austin, TX
Thanks Meter: 126
 
More
Well, most of the sysctl.conf and build.prop stuff is included in the ROM, and furthermore will likely be overwritten when you update the ROM, I would think.

And while I really like the V6Spercharger script, I think combining just the things it does for Nook Color, along with some of these things that make sense, all into one script, would really help. I might try my hand at this and see how it goes. This is all routine stuff for shell scripts.
The Following User Says Thank You to mr72 For This Useful Post: [ View ] Gift mr72 Ad-Free
16th February 2012, 10:14 PM |#8  
adamdelozier's Avatar
OP Senior Member
Milford, CT
Thanks Meter: 349
 
More
Quote:
Originally Posted by mr72

Well, most of the sysctl.conf and build.prop stuff is included in the ROM, and furthermore will likely be overwritten when you update the ROM, I would think.

And while I really like the V6Spercharger script, I think combining just the things it does for Nook Color, along with some of these things that make sense, all into one script, would really help. I might try my hand at this and see how it goes. This is all routine stuff for shell scripts.

If you can do it great! In the mean time, however conflicting the info may be, I will stick with it, because it sure is working damn good on both my devices!

Sent from my SPH-D700 using xda premium
16th February 2012, 10:36 PM |#9  
Senior Member
Flag Austin, TX
Thanks Meter: 126
 
More
Quote:
Originally Posted by adamdelozier

If you can do it great! In the mean time, however conflicting the info may be, I will stick with it, because it sure is working damn good on both my devices!


I am not disputing that it works!

I looked into the V6 Supercharger script, and it appears to be trying to be all things to all people, which makes it perhaps overkill for the NC. I might try and make a stripped version of it. My shell scripting is not exactly stellar.

I tell you what, this would all be a breeze to do in ruby. Do we have ruby working well on Android yet? I can't remember. If it was ruby, I could have the whole thing done in no time.
16th February 2012, 11:39 PM |#10  
adamdelozier's Avatar
OP Senior Member
Milford, CT
Thanks Meter: 349
 
More
Quote:
Originally Posted by mr72

I am not disputing that it works!

I looked into the V6 Supercharger script, and it appears to be trying to be all things to all people, which makes it perhaps overkill for the NC. I might try and make a stripped version of it. My shell scripting is not exactly stellar.

I tell you what, this would all be a breeze to do in ruby. Do we have ruby working well on Android yet? I can't remember. If it was ruby, I could have the whole thing done in no time.

Lol! I guess I wish I knew what ruby is?! I really want to learn programming and scripting on android. I just don't have enough time in the day with a 7 year old, 3 month old, and a pita job...not too mention the wife!! Haha. I would be more than happy to help test anything you can come up with. I may even try something myself if I can squeeze it in!

Sent from my SPH-D700 using xda premium
17th February 2012, 10:25 AM |#11  
ohshaith55's Avatar
Junior Member
Flag Dallas, TX
Thanks Meter: 5
 
More
i can't attest to the ui smoothness yet but the wifi changes are insane... in my room my computer maxes out my broadband speed over wifi(30mbps) and i was getting around 15 on my nook(nothing to complain about) and 3mbps maximum on my galaxy nexus which apparently has a very low power wifi chip. i am now getting around 25 on my nook and 12 on my gnex. this is exactly what i've needed. i know you didnt find the tweaks but tremendous thanks for passing this on to us
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes