yashsingh1/xdaforums huggingface dataset:
[EVO 4G Android Development] digitalrurouni:
The test is a bit flaky because it depends on a lot of things. I have a 16 gb class 10 card I got from newegg for 30 bucks.

Read Speed: 18MB/s

Write Speed: 12MB/s

Thats what I got on my 3rd attempt. It fluctuates wildly I think.
[EVO 4G Android Development] m4rk0358:
I'm assuming this fix wouldn't be necessary if you have a class 2 card.
[EVO 4G Android Development] Beknatok:
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.

Your output should look something like this:

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.

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.

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.

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.
[EVO 4G Android Development] sc00basteve:
The Wintec? Great deal right!

EViO 1.7.7 @ 4

That did say Class10 the first time I ran it...

After flashing ziggy's ztest_CFS_01152011_EVO

Is there an SDbenchmarking app that tests sequential & random?

Sent from my EVO using the xda app.
[EVO 4G Android Development] zone23:
Confirmed Ziggies BETA Kernel EVO CFS 15 Jan 11 is already set to 128 flash it and have a great day. It can be found here:

http://www.ziggy471.com/
[EVO 4G Android Development] derekwilkinson:
Another question... won't this effect the reliability and longevity of the card?
[EVO 4G Android Development] zone23:
I wouldn't think so I mean the card isn't going to run any faster than it was designed for.
[EVO 4G Android Development] iTouch24:
wow i checked mine and it was set to 4 .. i changed to 128 and these are the results

I have a 16MB Class 10 SD Card.

Test results with SDCard Speed test with 300MB file (before fix)

WRITE = 10.98 MB/s

READ = 5.73 MB/s

Test results with SDCard Speed test with 300MB file (after fix)

WRITE = 10.25 MB/s

READ = 12.47 MB/s

thanks !
[EVO 4G Android Development] Nnyan:
Thanks for this! I tried doing this myself (using root explorer) and all I managed to do was make my phone die at the boot up animation (had to re-flash the ROM since I did not know where Root Explorer kept its .BAK files (and I wasn't able to google the info).
[EVO 4G Android Development] zone23:
Not sure why you guys don't just flash the ziggy kernel instead of editing the file. Flashing the kernel is permanent editing the file is only temporary. Why not just flash it and be done? Its proven that it works. Now if you have the stock class 2 card then I don't see any need to do anything.
[EVO 4G Android Development] ewells38:
Hey Zone, would you be so kind as to point me to this kernel :D

Would much rather do that, then to keep making this change over and over again
[EVO 4G Android Development] Beknatok:
Because different Evo's get different results from different kernels.

Unfortunately for me, Ziggy's kernels have always resulted in random reboots on my Evo, so I abandoned them. However, Netarchy's have always been fast & stable on my Evo, so I've stuck with him.

And the method I implemented above is "permanent" enough, and can easily be repeated on the occasions when one flashes a new ROM. I may eventually figure out how to put together a flashable zip, to make it even easier, but my method really only involves a few cut & pastes, taking all of 30 seconds, so it suits me just fine.

http://www.ziggy471.com/
[EVO 4G Android Development] rushco:
I get random reboots with the ziggy kernel. :(
[EVO 4G Android Development] skylar.sutton:
Test results for a Stock EVO SD card

@ read_ahead_kb = 4

Write: 2 MB/s

Read: 1 MB/s

Class 2 card

@ read_ahead_kb = 128

Write: 2 MB/s

Read: 5 MB/s

Class 2 card
[EVO 4G Android Development] Kudzus:
Stock * gig

Stock card Labeled as a 4

read_ahead_kb = 4

Write: 2 MB/s

Read: 2 MB/s

Class 2 card

read_ahead_kb = 128

Write: 2 MB/s

Read: 8 MB/s

Class 2 card

I loaded a game from sd card ... much faster play
[EVO 4G Android Development] zone23:
Sounds good too me.. so glad I have one of those none finicky EVOs ziggy kernels run fine for me.
[EVO 4G Android Development] Troopermoonchild:
This works great!!!!

Thanks for the instructions.
[EVO 4G Android Development] skylar.sutton:
I am having no luck with the 10sdreadahead file.

I tried the ADB push method... rebooted... cat still returns a "4". Then I tried using Root Explorer to copy the file into init.d... rebooted... cat still returns a "4".

Any other suggestions?

EDIT: Clarifying details... rooted (obviously), using the odexed stock ROM that was published after the last OTA.
[EVO 4G Android Development] xlaw:
Change the first line in 10sdreadahead.txt from "#!/system/bin/bash" to "#!/system/bin/sh"
[EVO 4G Android Development] gtkansan:
Didn't work for me. Fairly Linux competent here as well. Init.d folder exists, and there are scripts to run zipalign and some type of dalvik one as well. But doesn't seem to work with yours. Poo

EVO Sent
[EVO 4G Android Development] Beknatok:
Chances are because your particular ROM doesn't have /system/bin/bash, as a few others have pointed out to me.

I just edited my original post & attachment to use /system/bin/sh. Please grab the file again and try again.
[EVO 4G Android Development] gtkansan:
Fixed it! Thanks man
[EVO 4G Android Development] CaptainMorgan:
Thanks, works wonderfully. Just did some tests on higher read aheads cuz I was curious and they don't make any difference.

I have a Wintec 16Gb Class 10

at 4k was 8 read and 6 write

then two tests at 128k was 12/13 and 13/13

then two test at 256 was 14/13 and 12/13

and finally at 512 yielded 14/13

So, to say the least I am using Myn's latest ROM and he has a modified #15 kernel, meaning any unrooted normal user is getting boned by HTC as it is. Since, the vast majority of users have no clue on rooting a device.
[EVO 4G Android Development] zone23:
I assume I can put this directly into the init.d folder of my ROM. Then it doesn't matter what kernel the user flashes it will always set read_ahead_kb to 128? Makes sense. thanks.
[EVO 4G Android Development] Beknatok:
Yup - if you have a kernel that already has this value set, then this tweak is simply redundant.
[EVO 4G Android Development] zone23:
Thanks ya I went ahead and implemented it into my ROMs. Gonna push it to my phone now.. I like toast kernels as well.
[EVO 4G Android Development] skylar.sutton:
Tried that... still cat'ing back "4"

Also tried the new file... STILL cat'ing back "4"

Anyone know where it might be spitting a log file that I can look at?
[EVO 4G Android Development] Beknatok:
When I was testing & tweaking, the two gotchas that tripped me up initially was that I first saved the file in DOS instead of UNIX format. And second was whether execute permissions were granted.

What ROM are you using?
[EVO 4G Android Development] skylar.sutton:
I'm using the odex'd 3.70.651.1 OTA ROM (http://xdaforums.com/showthread.php?t=874251&highlight=rom+ota).

I didn't edit the file, just renamed through Win Explorer... think that would switch it back to DOS format?

User has r/w/x permissions, group and others have r/x (no write)
[EVO 4G Android Development] iTouch24:
wow awesome .. this worked perfect for me ... was a zip ever made so i dont have to always do this after flashing a ROM
[EVO 4G Android Development] Beknatok:
Funny you ask - just finished editing my original post. akazabam @ AndroidForums whipped one up for me, which I just finished testing.
[EVO 4G Android Development] Beknatok:
Hmm... no idea how the base ROM is set up. Just in case, please humor me and tell me what this returns.

adb shell ls /system/bin/sh

If it cannot find sh, then that'd explain the failure.
[EVO 4G Android Development] skylar.sutton:
/system/bin/sh exists... adb prints back /system/bin/sh
[EVO 4G Android Development] Steve98124:
Results for EViO 1.7.7

I'm using EViO 1.7.7 with the ziggy kernel that comes with it.

I have the 8gb card that came with my Evo (reported to be class2).

My "read ahead kb" was 4. I changed it to 128 (manually).

Test results:

read ahead @4

Write 3Mb/s

Read 3Mb/s

read ahead @128

Write 3Mb/s

Read 7 Mb/s

I repeated the test twice. Checked speed using fast4ward from post #8

The tweak appears to provide a significant improvement even if you don't have an expensive card.

I'm not worried about burning out the card but could this have any impact on read errors?

Would how the card is formatted make any difference in how this tweak performs? What do the experts say?
[EVO 4G Android Development] Beknatok:
Hmm, I'm at a loss. I wonder if the stock ROM does not make use of init.d?

Run this please:

adb shell grep "init.d" /init.rc

I'm curious to see if it returns something that looks similar to this:

service sysinit /system/bin/logwrapper /system/xbin/busybox run-parts /system/etc/init.d

But... as I think about it now, given that my init.rc uses busybox to run scripts in init.d, I would then speculate that this may not work with the stock ROM.
[EVO 4G Android Development] skylar.sutton:
The flashable zip isn't working on the odex'd stock ROM either (used ClockworkMod 2.6.0.1)

*grumble*... stupid stock rom
[EVO 4G Android Development] OMJ:
so ppl don't have to search.....

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

http://xdaforums.com/showpost.php?p=10760186&postcount=47
[EVO 4G Android Development] skylar.sutton:
It returns nothing, which might explain it.

When you first posted about this I opened my init.rc and added the read_ahead_kb change to it. When I rebooted the init.rc had been restored to it's previous state though, so I gave up on that and started messing around with ADB.
[EVO 4G Android Development] jauger:
In /sys/devices/virtual/bdi/ each folder has the read_ahead_kb including the default folder, Im playing around and changing everyone of the values, havent noticed any ill effects and anything positive could be a placebo effect but my class 10 sdcard jumped to 16kb read and Ive notice a2sd is running very nice....
[EVO 4G Android Development] Beknatok:
Android's init files are apparently controlled/overwritten elsewhere... related to either the boot image or kernel. The original original Desire thread discusses this in greater detail. And this is why some folks already have the tweak - Ziggy has cooked it into his kernel (others may have as well).

I'm afraid you'll have to go digging through your ROM and find out whether you can insert this script somewhere.

No idea what the other objects are, but that does warrant some further investigation. Thanks for pointing that out!
[EVO 4G Android Development] Phillysphinest1:
Just changed mine from 4 to 128....hopefully i'll see the difference
[EVO 4G Android Development] Adam1422:
I went from

Write speed = 1MB

Reading speed = 2MB

to

Write speed = 1MB

Reading speed = 8MB

Stock SD card bought on release date.

Thanks for the hard work!
[EVO 4G Android Development] sag7392:
I went from

Write speed = 6MB

Reading speed = 6MB

to

Write speed = 8MB

Reading speed = 16MB

Class 6 SD card from my Blackberry days.

Thanks for the awesomeness!
[EVO 4G Android Development] ls430cw:
Just flashed the Zip on Azreal 3.1, Netarcy 3.1 bfs-sbc-havs-more

write 8mbs

read 11mbs

was at-

write 6

read 5

8gb, class 6.
[EVO 4G Android Development] christian1818:
Hey i been trying to download and it keeps saying unsussesful. Can u give a link
[EVO 4G Android Development] wbchristmas:
OMJ.. I ran the command line "adb shell cat /sys/devices/virtual/bdi/179:0/read_ahead_kb" on my rooted MIUI EVO and the results came back as 128. Does this mean that they may have included the sd card speed fix in the rom?
[EVO 4G Android Development] Beknatok:
Yes.

Another user has confirmed that Ziggy's kernels have already implemented this. MIUI may have as well, in which case, you're good to go!
[EVO 4G Android Development] xHausx:
I've noticed the speed hit myself but figured it was something on my end since it didn't use to be like that. The trade off with raising it to 128 is your random access times, for how fast you can access different files, will be slower. 64 would be a good middle ground if that is something that is important to you
[EVO 4G Android Development] rstuckmaier:
Out of curiosity why 128? It just seems like a rather arbitrary number to me (other than following 2^n) but why not 256? 512? or 64 for that matter?

I'm honestly wondering. I have CM so mine was already changed to 128 "stock" but it just had me wondering where the number came from.
[EVO 4G Android Development] mrjeancw:
hmm, i used es file to navigate to the file and open it with notepad and i am able to save but when i go back in its still at 4. any ideas?
[EVO 4G Android Development] ProcessorHog:
Thanks for the tip!
[EVO 4G Android Development] Beknatok:
Yes, the kernel or ROM, not sure which, will revert the file back to whatever was originally cooked in, upon every reboot. Read the original thread for more background on this.

In either case, I chose to take it to the next level, and inserted an additional start-up script that simply edits the file each and every time your phone boots up.
[EVO 4G Android Development] Zabalba:
My findings

Wintec 16 GB Class 10 microSD

Test performed on “SD Card Speed Test”

No change (4)

Test 01 (Buffer 9 MB)

W: 9MB/s

R: 7MB/s

Test 02 (Buffer 9 MB)

W: 9MB/s

R: 7MB/s

Test 03 (Buffer 1 MB)

W: 9MB/s

R: 7MB/s

After patch change (128)

Test 04 (Buffer 9 MB)

W: 9MB/s

R: 18MB/s

Test 05 (Buffer 9 MB)

W: 10MB/s

R: 18MB/s

Test 06 (Buffer 1 MB)

W: 9MB/s

R: 18MB/s

Cheers
[EVO 4G Android Development] jauger:
class 10 16gb trying several values, my results ( ran test 4-times per value)

128 write-6 read 15

256 write-6 read 18

512 write-11 read-11.....so this tweak seems it can in a way affect write speeds.....
[EVO 4G Android Development] mrjeancw:
this is happening without a reboot. i am running sprint lovers...

i edit the file and save it but once i go back into it its back at 4.
[EVO 4G Android Development] scirio:
Class 6 8GB Transcend. Sst app reports it's a class 2 card both before and after :( What gives?

Before:

Read = 6 MB/s

Write = 2 MB/s

After:

Read = 6 MB/s

Write = 3 MB/s
[EVO 4G Android Development] Calkulin:
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
[EVO 4G Android Development] Greenfieldan:
The great calkulin has spoken! :eek:
[EVO 4G Android Development] aimbdd:
looks like it didn't work.
[EVO 4G Android Development] Greenfieldan:
So flashing the bottom one just gives you the SD card boost, correct? Nothing else?
[EVO 4G Android Development] zone23:
Guilty I PM him today, sorry man..
[EVO 4G Android Development] SteelH:
That's what I did, works fine.
[EVO 4G Android Development] Beknatok:
:confused:

I've been away for the last 4 hours. Was there an issue with the flashable zip that I provided?

That is correct. I checked the zip file - it does the same thing.
[EVO 4G Android Development] Calkulin:
If your kernel can run init scripts, then yes

Don't worry, I just found this easier than replying to 50 PMs

Probably not, I just posted what people kept asking me for to make easier
[EVO 4G Android Development] MikeOD:
I just put in a Kingston 16 gig Class 10 card, and was less than impressed...then I stumbled upon this...changed from a 4 to 128 and it rated as a class 6...now I just tried the Ziggy kernel and it's showing class unknown, but 8 mb write and 15 read...which is MUCH improved over what it was before...with the change from 4 to 128 on Netarchy's kernel, best rating I could get was 6/13...not really sure why it's faster with Ziggy.
[EVO 4G Android Development] Clarkkent434:
Im also gulity too

The SD card zip did not work on Evo. Both fix and kernel. The Evo already corrupt the stock sd. And my sandisk 16gb class 2 is going too. Any help?
[EVO 4G Android Development] brentkhack:
I am using Azreal now and just flashed and my stock sdcard went from 2/1 to 2/9 after flash. I haven't tried to see any real world difference yet. Must do though.
[EVO 4G Android Development] devonparrish:
Reserved...
[EVO 4G Android Development] teddyh2o:
I used Calkulin's_SD_card_fix on the MIUI rom with class 10 SD card and i am getting

class unknown with 1MB write and 11MB Read
[EVO 4G Android Development] flyboy1100:
Stock setting with stock card:2/2

After edit: 8/3. So much faster and phone actually feels smoother too.

Count me down as wanting a permanent solution
[EVO 4G Android Development] rank78:
8gb class 6 card

5/6 write/read before flash

5/11 write/read after flash

any reason why the program is reporting my card as a class 4 when it clearly isn't?
[EVO 4G Android Development] slugbug2010:
What is the name of the free speed tester in the market? I'd like to do a before and after test.

I tried searching the app listed earlier ad an apk file, but would rather dl from market if possilbe.

Thanks
[EVO 4G Android Development] -Protos:
Bloody Fantastic Find !!

Thanks to the OP for bringing it to my attention.

Went from 4/4 on a class 6 card to 8/13

Very pleased with the results. Also thanks to Calkulin for posting his flashable zip. Nice bump to DarkTremors A2SD.
[EVO 4G Android Development] nsxla:
SD Card Tester

by Gilmar José Purin

100 downloads, 9 ratings (3.4 avg)

$2.00

The one posted on page 1 works fine why pay $2 and with not that great reviews.
[EVO 4G Android Development] slugbug2010:
I apologize, but I can't find the one posted earlier in the market. I'd prefer to sl straight from the market if possible and don't know the name.

Thank you
[EVO 4G Android Development] nsxla:
Ya sorry, i can't find it in the market either :eek:
[EVO 4G Android Development] TD22057:
Kingston 16 GB Class 4 card.

Read ahead set to 4:

Write 3 MB/s

Read 2 MB/s

Read ahead set to 128:

Write 3 MB/s

Read 11 MB/s

Thanks!
[EVO 4G Android Development] nsxla:
I bet it says your card is class 2? i don't know how accurate this test is, but i am envious of the wankers who are getting 10 mb/sec damn you! :D Will invest in a new card after the feb 7th announcement :) bring on the SXDC or whatever lol
[EVO 4G Android Development] TD22057:
Yes - but I ran one more test and it got a write speed of 4 MB/s and called it a class 4 card then. I'm guessing actual speed is highly dependent on whether it's writing a few large files or many small files - and 1 digit of precision really doesn't cut it.

FYI I can see a big difference in the speed my gallery shows thumbnails now.
[EVO 4G Android Development] nsxla:
Yep sorry, i meant i don't know how accurate the SD TEST APP IS.
[EVO 4G Android Development] lowetax:
doesn't the program state that you need 6 mb/s minimum to show up as class 6 ?
[EVO 4G Android Development] reverendrhino:
Thanks for the heads up, I would have never of checked. Now I'm running my SD at great speeds..
[EVO 4G Android Development] thajacka:
Before

Write 1mbps

Read 6mbps

After

Write 3mbps

Read 16mbps

Class 4 or 6 16gb
[EVO 4G Android Development] starnostar:
I havent done any speed testing on mine, but there was a huge noticable difference in gallery thumbnails loading

this also fixed the intolerable skipping in subsonic, listened for 10 hours at work today and not one single skip, smooth as butter, before it skipped nearly ever 30 seconds or so, sometimes it would just go to the next song halfway through (even off cache or on same network as server via wifi)

THANK YOU THANK YOU :)
[EVO 4G Android Development] eniamg02:
I have a class 2 16gb sandisk.i know some said was unnecessary for c2 but tried anyway.

4:

Write: 4mb

Read:6mb

128:

Write:4mb

Read:15mb

With both 4 & 128 my sd card was reported being class 4.

Hope I don't bork my sdcard lol
[EVO 4G Android Development] baknblack:
I am stock. I flashed the kernel and the script. The int.d folder is now there along with the modules and script. However, it appears it's not running at boot. When I look at the read ahead file it's still set at 4 after boot.
[EVO 4G Android Development] Beknatok:
You also failed to read my instructions.

This flashable zip WILL NOT WORK ON STOCK ROMs. It's even bolded. Stock ROMs do not have init.d support. AFAIK, this only recourse stock users have is to edit init.rc directly.
[EVO 4G Android Development] Beknatok:
What ROM are you on?

This tweak should not affect your sd card's integrity.
[EVO 4G Android Development] baknblack:
Sorry about that. I thought the purpose of flashing calkulins kernel was to add the support. my bad.
[EVO 4G Android Development] xHausx:
it does...
[EVO 4G Android Development] m4rk0358:
Would this fix improve video recording?
[EVO 4G Android Development] Beknatok:
You'll have to contact Calkulin regarding his updated Kernel. I can only speak to the flashable zip, since that tweak is what I spearheaded.

Not directly, no - this only expands the READ ahead buffer. It will have no effect on WRITE performance.
[EVO 4G Android Development] lucidox:
Since MIUI's kernel has changed quite a bit with every release, I think the value depends on which version you're running. On the latest MIUI build, I switched to the sbcnice v8 AOSP kernel, which has uses a value of 4. Even after upping it to 128 with the flashable zip, reads/write are around 3/4 with the stock EVO card. I've seen this kernel have issues mounting the SDCard when in USB mode, so I'll try out Ziggy's and see if that helps.