SD card speed fix (5Mbps to 15Mbps)

Search This thread

ncfastls1

Senior Member
Oct 27, 2010
662
86
Cary, NC
Wow I can't believe this hasn't been brought up before. My image previews load so much faster now in the gallery. Big difference. As some others have requested can we get a flashable zip to make this stick once we reboot?

Sent from my PC36100 using XDA App
 

Shigster

Senior Member
Jun 9, 2010
199
13
That's what he said would change.

And OP, I'm still lost. You said if the value is anything but 4 change it to 128. Is there some reason we can't change it from 4 to 128?

in the original thread it states

"If it returns 4 then you need the fix. If it returns 128 you don't need it."

So just change it to 128 and you'll be fine.

Also, CM already has this set at 128, it's only Sense that needs the fix it seems, unless developers start incorporating this into their roms.
 
  • Like
Reactions: downscj

lahma69

Senior Member
Jun 19, 2010
102
58
So if its 4 then leave it at 4? If its anything else change to 128? Is that right? Your post kind of contradicts itself which is why im asking. Thanks.
You are right, it does found confusing. I fixed my post above, because out was suppose to read "if anything other than 128, change it to 128". Thanks.
 

zone23

Senior Member
Feb 16, 2009
5,437
2,309
I guess all we have to do is get one of our kernel geneses to change it for us..
 

nkawal

Senior Member
Aug 3, 2007
647
596
New York City
Wonder if there's going to be any set backs by doing this. This sounds like we're overclocking the card, could this possibly burn card out faster. I have a fully loaded 32GB and wouldnt want to risk loosing everything.
 

nsxla

Senior Member
May 9, 2010
445
31
Carson,CA
Wonder if there's going to be any set backs by doing this. This sounds like we're overclocking the card, could this possibly burn card out faster. I have a fully loaded 32GB and wouldnt want to risk loosing everything.

Highly doubtful your card isn't going to run faster than its class - mine is underclocked to class2 :(
 

ewells38

Senior Member
Nov 14, 2008
986
218
If you want to increase the read ahead buffer automatically here's a gscript which does it.
Based on: echo 128 > /sys/devices/virtual/bdi/179:0/read_ahead_kb

Oops xda doesn't attach text?
Just enter the echo line in terminal.

cat /sys/devices/virtual/bdi/179:0/read_ahead_kb
echo 128 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
cat /sys/devices/virtual/bdi/179:0/read_ahead_kb

Sent with Super-Sonic Vision using XDA app.

Thanks so much, worked for me :D

I have a 16MB Class 4 SD Card.
Test results with SDCard Speed test (before fix)
WRITE = 5 MB/s
READ = 5 MB/s

Test results with SDCard Speed test (after fix)
WRITE = 5 MB/s
READ = 11 MB/s

Thanks again, now hopefully one of the fabulous Devs will make a flashable zip which will make the change permament :cool:
 
  • Like
Reactions: DBS3

wallaceb

Senior Member
Dec 21, 2010
126
12
I am running Fresh 3.5.0.1 and mine is currently set to 4. I tried using ES File Explorer to modify the file, but I was not able to save the edited version. I am getting Root Explorer to Serbia that fixes it.

I have to ask. Exactly how did you find out about this? The file is in a obscure location, and how did you know that file was responsible for SD card control?
 

Jason kiDD

Senior Member
Dec 22, 2009
119
1
NYC
www.vibrantsoundz.net
Good find.. I guess when its made permenant via Sense Roms it will be even better...

Also this speeds up the phone considerably especially if you are using APPS2SD...
 
Last edited:

Beejis

Senior Member
Nov 14, 2008
1,662
211
Washington
I want to say cm already implemented this in his roms, but I'm not certain.

Pocket posted, just not sure how...
 

tejasrichard

Senior Member
Apr 3, 2009
1,267
117
I just checked cm6, and this is already built in. Considering how long cm6 has been out, if it was going to start destroying sdcards, I would think it would have happened by now.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 39
    I guess no one had really noticed, but there is a major flaw with the evo. The microsd read speed is severely limited. I just bought a new Patriot 32gb class 10 micro sdhc card, and the read speed was great on my pc, but on my evo it was getting stuck at 5Mbps oi tested with "sd card speed tester" while my write speed was correct at 11Mbps. I don't understand why all developers aren't integrating it into their roms/kernels , it doesn't make sense... All you have to do is use root explorer or some other root file manager and navigate to "/sys/devices/virtual/bdi/179:0/" and open the file "read_ahead_kb" with a text editor (with root explorer just long press the file and select "open with text editor", and if the value is anything other than 128, change it to 128 and save the file. The read speed on my new class 10 card went from 5Mpbs to 15Mbps, BIG DIFFERENCE! Only problem with doing it this way is it changes back to 4 after a reboot. There if a flashable file in the post I got this info from ( http://xdaforums.com/showthread.php?t=815557&page=19 ) but I haven't tried it. Apparently it is very easy to integrate... Enjoy the correct speeds for your card! Please visit the post to see who solved this issue, it surely wasn't me!
    25
    Since I'm getting A LOT PM's today about this mod, I'll post the zips I made for it.

    1st is the stock #15 kernel modded to run init scripts & I threw in all the modules I had for it, perflock disabled, powersave & conservative governors, -50mV undervolted & obviously the SD card fix. And before anyone ask, this does not include my screen scaling script that I include in my ROM

    2nd is the SD card fix script itself that only runs if needed, so if your running Ziggy's latest, it doesn't run as it's not needed
    23
    I'm running Myn's 5 with one of Netarchy's kernels. Also am running one of the new Lexar 32gb Class 10 cards. My Evo's was set to a value of 4. And I'm thrilled to say that this fix worked wonderfully for me.

    Here are my SD Speed Tester results:

    Setting = Write/Read
    4 = 6/5
    8 = 6/7
    16 = 6/11
    32 = 6/12
    64 = 6/14
    128 = 6/15

    Knowing enough about Linux to be dangerous, I created a separate init.d script that will run on reboot. I'm also including adb instructions on how to install the script. akazabam @ AndroidForums has now created a flashable zip that you can use too.

    WARNING: I do not know if all Android ROMs make use of /system/etc/init.d scripts, so this may not work for you. Use at your own risk!

    ROOTED STOCK ROM USERS: Unfortunately, it seems that you folks will not be able to make use of this tweak, since it seems that the stock ROM does not utilize init.d. I do not have access to a phone running the stock ROM, so am not sure where in the boot process we can alternately insert a script to apply this tweak upon every bootup.


    First, check to see if you even have an init.d folder.

    adb shell ls /system/etc/init.d

    Your output should look something like this:

    c:\Incoming\Android>adb shell ls /system/etc/init.d
    00banner 02firstboot 04apps2sd 99complete
    01sysctl 03modules placeholder

    If you get "ls: /system/etc/init: No such file or directory" as a result, then you don't have this folder and SHOULD NOT CONTINUE.

    DOWNLOAD FLASHABLE ZIP HERE: Courtesy of akazabam @ AndroidForums

    http://www.mediafire.com/?eto9uoz2aml66cv

    Boot into recovery, flash, reboot.

    After rebooting, run the following to double-check everything worked properly.

    adb shell cat /sys/devices/virtual/bdi/179:0/read_ahead_kb

    If it says 128, you're done! I hope this helps some of you out!


    OLD MANUAL ADB INSTRUCTIONS:

    Next, please rename the attachment and remove the ".txt" extension. XDA requires a file extension on attachments.

    Next, run the below adb commands. There are 3 commands chained together here. The first will remount /system in read/write. The next will push my init file to your phone. The third will grant execute permissions on the file.

    Be sure to change the path "C:\10sdreadahead" to wherever you downloaded 10sdreadahead to.
    adb shell mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system &
    adb push C:\10sdreadahead /system/etc/init.d &
    adb shell chmod 755 /etc/init.d/10sdreadahead
    Reboot your phone now, to make sure that the tweak is applied correctly on reboot.
    After rebooting, run the following to double-check everything worked properly.
    adb shell cat /sys/devices/virtual/bdi/179:0/read_ahead_kb
    If it says 128, you're done! I hope this helps some of you out!



    NOTE: If you open up my init script in a text editor to check it, be sure to resave it with UNIX carriage returns, NOT DOS. This one bit me in the butt while I was testing! :)


    Thanks again to the OP for posting about this!!!

    UPDATE: I've adjusted the file to use /system/bin/sh instead of bash. Also, another user at AndroidForums is packaging this up as a flashable zip for me. I'm going to test it real quick and once I verify it, I'll add it to this post.

    UPDATE 2: akazabam @ AndroidForums was awesome enough to throw together a signed, flashable zip for me. I've edited the instructions accordingly.
    16
    I have been wondering about my sd card speed here lately..Anyone know a free app on the market to test my speed?

    cm7 has 128 already set so thats not it cause my card read seems slow.


    free version of the Sdcard speed tester
    7
    If you want to increase the read ahead buffer automatically here's a gscript which does it.
    Based on: echo 128 > /sys/devices/virtual/bdi/179:0/read_ahead_kb

    Oops xda doesn't attach text?
    Just enter the echo line in terminal.

    cat /sys/devices/virtual/bdi/179:0/read_ahead_kb
    echo 128 > /sys/devices/virtual/bdi/179:0/read_ahead_kb
    cat /sys/devices/virtual/bdi/179:0/read_ahead_kb

    Sent with Super-Sonic Vision using XDA app.