[CM7][CM9]Speed and Smoothness Tweaks

Search This thread

mr72

Senior Member
Aug 2, 2010
503
126
Austin, TX
I don't know if they are loaded on boot. I will look into it once I get some time.

On a slightly different note, I have gone a full day with the settings above without a crash, which is about 3x as long as it went before. The vm.dirty_background_ratio = 55 and vm.vfs_cache_pressure = 20 seem to be the difference maker, so far.
 
  • Like
Reactions: FullFathomFive

tonyp

Inactive Recognized Developer
Feb 3, 2011
5,019
34,902
Interesting thread, gonna go and play with some values, too.
 

irisclara

Senior Member
Jun 7, 2011
83
13
So what's the word on this. Has anyone written a script for the non-V6 parts? I'm really interested in trying the wifi tweaks. Are they being incorporated into CM 7.2 or Mirage? Do the changes stick or do they need reset? I'm thinking about just trying what mr72 posted but figured I'd ask for updates first.
 

irisclara

Senior Member
Jun 7, 2011
83
13
Ok, I did the first two parts of mr72's modified tweak and seem to be getting better wifi reception and speed. I didn't do the virtual memory part because I don't feel that I need it. My Nook is totally rockin'.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    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://xdaforums.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://xdaforums.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!
    2
    Here's what I'm trying now, hopefully deals with the crashes:

    build.prop:
    wifi.supplicant_scan_interval=300
    davlik.vm.heapsize=92m
    davlik.vm.heapstartsize=5m
    davlik.vm.heapgrowthlimit=32m

    sysctl.conf:
    # Changes added for network tweaking
    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

    # Changes added for virtual memory tweaking
    vm.min_free_kbytes = 4096
    vm.dirty_ratio = 90
    vm.dirty_background_ratio = 55
    vm.vfs_cache_pressure = 20
    vm.oom_kill_allocating_task = 1

    and run the V6 Supercharger for the minfree settings (option 9)
    1
    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.

    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

    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)

    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.

    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.

    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.
    1
    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.
    1
    I don't know if they are loaded on boot. I will look into it once I get some time.

    On a slightly different note, I have gone a full day with the settings above without a crash, which is about 3x as long as it went before. The vm.dirty_background_ratio = 55 and vm.vfs_cache_pressure = 20 seem to be the difference maker, so far.