yashsingh1/xdaforums huggingface dataset:
[EVO 4G Android Development] moseso:
I am running at 128. I just installed my new class 10 card and ran the test:

10 - write and 18 - read. YOWZA!!! (Was at 2 - write and 2 - read, before.) I can't imagine that pushing the read-ahead beyond 128 is going to make enough of a difference to care about.
[EVO 4G Android Development] Beknatok:
The following is only what I've been told, as I haven't been on a stock ROM in eons.

First, stock ROMs don't use the init.d approach of standalone startup scripts... everything is instead inside of init.rc. So the next approach, and the one that was originally taken by the guy who discovered this mod on the Desire, was to modify init.rc directly. However, I'm told (and haven't confirmed) that this is useless on the Evo, as that file is reset upon reboot as well. I do not know what process in Android's startup does that (in the Linux world, files aren't overwritten like this), so I don't know where else to look. An Android kernel dev would most likely know the answer.

In the end, those on stock ROMs can try using a kernel that already has this implemented. Otherwise they'll have to direct edit the /system/devices whatever file manually after each and every time they reboot.
[EVO 4G Android Development] subcypher:
128 is where mine is set automatically. I tried 256 and 512 and saw no change after running tests. To make things worse, I used an Android based test on the phone and my initial PC based tester while the phone was hooked to the PC using USB. In both cases the read/write scores were roughly 12MB/s. I'm guessing that either Android or the EVO have some kind of cap.
[EVO 4G Android Development] ccossin:
I just swapped in a Patriot Class 10 card. I formatted it using the utility from sdcard.org. I'm also running 128 read ahead. However, my speeds are averaging 6-write and 14-read with the SD speed test app. Crystal DiskMark isn't much different in results.

This is a class 10 card, shouldn't it have 10-write as a minimum?
[EVO 4G Android Development] kaomie:
Just flashed the zip and it worked like a charm. Have stock sd card and getting 3 write and 10 read! Thanks everyone.
[EVO 4G Android Development] Beknatok:
First, the tweak does nothing for write speed, only read.

Second, the numbers reported by that free android app are sort of wonky & shouldn't be taken @ face value. It is mostly useful for before & after measurements. To more accurately gauge your sdcard alone, use a PC based benchmark app.

Sent from a beach in the Caribbean.
[EVO 4G Android Development] ccossin:
Understood about the write speed. I also used Crystal Disk Mark on Windows 7, and the write speed fluctuates between 6 and 9 MB/s.

I mentioned the write speeds only to see if anyone else is having the same issue with Patriot cards.

This has been a telepathic transmission from the Outer Limits.
[EVO 4G Android Development] Hotrod68:
Moseso

What class 10 card are you using?
[EVO 4G Android Development] freeza:
Anybody want to do a battery test with values greater than 128?
[EVO 4G Android Development] ovrrdrive:
Thanks to all for their contributions in this thread. One of my big complaints about the evo has always been the slow loading gallery. When I saw the comments about speeding the gallery up I jumped on this. My results:

Baseline:

6mb/5mb

Set to 128:

7mb/13mb

7mb/13mn

Set to 256:

7mb/14mb

8mb/15mb

6mb/15mb

7mb/15mb

Smoke actually comes out of the phone now when I load the gallery because it's so much faster!

Also I keep seeing people over and over again say this doesn't affect write speeds but then I keep seeing people (like myself) post tests that show it does. I think a typical file transfer or write inlcludes a degree of verifying and checking the file integrity and if those go faster then it could account for the faster write times. No matter how you slice it though it appears write times are increased for many with this mod.

No complaints here and I'm getting ready to flash it perm. Thanks again... :)
[EVO 4G Android Development] Beknatok:
I'm glad that this has worked out for you.

But please, stop perpetuating the myth that this tweak affects write speeds. It does not. Even the name of the parameter being modified, is clearly titled read buffer.

If you still refuse to believe me, then go research Linux kernels & bdi virtual devices. Also research read ahead buffering & why the same techniques cannot be applied to write operations.

But please, stop perpetuating this myth!

Sent from a beach in the Caribbean.
[EVO 4G Android Development] moseso:
Wintec, 16 GB, class 10. About $30, free freight, from newegg.com. So far, so good!
[EVO 4G Android Development] SayWhat10:
thanks this improved my 2mb write and 1mb read up to 2mb write and 4mb read

using stock 8gig class 2 card
[EVO 4G Android Development] ovrrdrive:
I agree that if it's not true it shouldn't be spread around, but I benched 3 times after each change and for some strange reason the SD card gods gifted me with quicker write times after I changed the value in question. I'm not saying it was or was not the mod that did it, but I can guarantee that my write speed was up to 33% faster after I made the change. Seeing as how I don't know as much about linux as you do, I dare not say now that it was because of the mod, but after I applied the mod my write speed got 33% faster.

Is that better?
[EVO 4G Android Development] freeza:
I got faster write speeds too thanks to this mod, and I will stand by that.
[EVO 4G Android Development] RFrancis:
This damn micro sd card makes my phone get stuck at the boot animation... I dont know what to do. Besides most of them do not comply with class 10 specifictions.
[EVO 4G Android Development] bcarter2000:
I think some of Deca's old kernels had it built in, but if not, it should work the same on the hero.

Sent from my mik'd out evo
[EVO 4G Android Development] -viperboy-:
Looks like CM7 just changed this back to 4...

http://review.cyanogenmod.com/#change,2641
[EVO 4G Android Development] lahma69:
Wow, interesting... I wish they were a little more specific about their reasoning. I think I'm going to keep mine at 128, its working well for me and has been since I started this thread.
[EVO 4G Android Development] xHausx:
Was that just for the NAND or for sd cards as well? You should get higher random access times with lower values but the trade off is transferring large files will be slower.
[EVO 4G Android Development] Beknatok:
They're not modifying the same thing.

The above is from the details of the changelog. They're changing the buffer for mtdblock4, mtdblock5, and mtdblock6, which are the NAND "drives" for /system, /data/, and /cache respectively.

Generally speaking, increasing a read ahead buffer will give you better sequential read performance at the cost of random access performance. And depending on how you utilize your SDCard, sequential access operations will be more common than random access events. But the system partitions will most assuredly have more frequent random access. Because of this trade-off, that's why setting your read_ahead_kb value to anything higher than 128 really won't give you any additional benefit... and may arguably result in performance degredation.

The comment left by the dev even states "Default readahead is 128 on newer kernels, this is good for MMC devices,"... MMC - Multi-Media-Card... aka the SDCard.

And for what it's worth, my install of Myn's 5 has these settings still at the default value of 4kb.
[EVO 4G Android Development] Huluk:
I know this is probably going to sound dumb, but for some reason when i try to modify the file, it won't let me save it.

I'm trying via astro file explorer. Any suggestions on how to get around this?

thanks!
[EVO 4G Android Development] m4rk0358:
Astro will not allow you to overwrite system files. You'll need root explorer which is a paid app. It's worth the money.
[EVO 4G Android Development] baknblack:
I'm on the stock rooted rom. I flashed the kernel and fix. Now my value sticks after boot. Some where in this thread caulk posted a kernel just for the stock rom.
[EVO 4G Android Development] lahma69:
Ya, use root explorer and make sure you are mounted "r/w," not "r/o." Enjoy the fast speeds!
[EVO 4G Android Development] ccossin:
I used Calkulin's flashable fix for this. How do I remove it?

This has been a telepathic transmission from the Outer Limits.
[EVO 4G Android Development] imex99:
Kingston 16gb Class 10

With speed fix i'm getting:

4mb write

16mb read

Why is the write so low?
[EVO 4G Android Development] Beknatok:
Delete /etc/rc.d/10sdreadahead and reboot.

But why do you want to remove it?

As I've said numerous times before, the SD Speed Tester isn't reliable. All that it's good for is before/after metrics. Don't take the actual numbers as truth.
[EVO 4G Android Development] Trentonhawk:
"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."

Thanks Beknatok!

Your Zip file worked for me! Thanks.
[EVO 4G Android Development] gpz1100:
Kingston products are not typically known for their performance capabilities.

Try some read/writes in a card reader with your pc.
[EVO 4G Android Development] cephraim:
Flashing the zip didn't fix it for me.

I'm running netarchy kernel on stock ROM, and had the init.d folder.

I can manually edit the file and get improved read speeds (from 1 to 5), so I'd love to figure out why the zip isn't working.

I read most of this thread, but can't see what the issue may be!

Thanks!

Eph
[EVO 4G Android Development] Beknatok:
You're on the stock ROM. It does not have init.d support built-in, therefore will never read & execute the scripts within init.d on boot up.

All the zip does, is manually modify the read_ahead_kb file for you upon every reboot. Otherwise that value is reset back to 4 upon every reboot.
[EVO 4G Android Development] imex99:
Whats the best way to test then?
[EVO 4G Android Development] Beknatok:
....10char
[EVO 4G Android Development] ccossin:
There's a program for windows called Crystal Disk Mark.

Install the program on your comp, connect your evo to it as a disk drive, and the program will be able to test it as a removable drive.

This has been a telepathic transmission from the Outer Limits.
[EVO 4G Android Development] ljohnson1981:
cyanogen cricket rom has this preset fyi :-)
[EVO 4G Android Development] crstfr:
this was truely an awesome find... i changed it to 128.. i see kats using 512

my write is 13mb/s

my read is 16mb/s

i'm using that cheap class 10 card from an earlier post.. the amazon one for like 27 bucks shipped!.... so far so good!!!!

thanks for this!!!

before.. i' was doing 6-7 write, and 8 read~.... ..
[EVO 4G Android Development] crstfr:
aww this is my card...i had to go back and read.. ..... i lied.... mine was that wintec.....grrr

man 4 and 16... .. yeah somethings up~.. i'm getting 13/16....
[EVO 4G Android Development] tailsthecat3:
which files did you flash for the stock rooted?

thanks
[EVO 4G Android Development] klbjr:
Was just reading Myn's changelog for his Desire Z port and he changed the speed from 128 to 256.

If 256 is optimal for the 8GB Class 2 OEM cards, what is the optimal setting for 32GB Class 10 cards? I'm currently running mine at 512 but haven't done any real testing at the slower speeds to see the difference if any. And without a reliable SD Speed test program for the Evo, I'm not sure if I can.
[EVO 4G Android Development] nck4857:
I have a 16GB Class 10 and I was running 512, but 384 seems to be faster. I've also been messing with the heapsize and currently running it at 36, which seems to be the best combination I've found so far...
[EVO 4G Android Development] klbjr:
Ok. Gonna edit my script to 384 and see if I notice any difference. Heapsize? Are you talking about the swap size when you partion ext2 to ext3 for a2sd?
[EVO 4G Android Development] nck4857:
No, it's the dalvik heapsize which admittedly I don't know much about.. Some guys on Mik's Rom are running 48, but the new version is set at 36 which seems to be working good. I know your ROM has to be capable of it being changed and you can google it and get more info.

I have a 16GB Class 10 Patriot SDCard and got 11write/18read today, which is the highest I've seen so far..
[EVO 4G Android Development] epmacman:
I was about to do this, but my cheap wintec 16gb (class 4/6ish) cant remember, but the sd card tester is consistently giving me: write 12mb, read: 14mb
[EVO 4G Android Development] klbjr:
I'm actually running Mik's 4.5. Now to look up dalvik heapsize. Thanks!

Sent from my new BFF...Evo 4G that is!
[EVO 4G Android Development] strikeIII:
anyway, to add the tun.ko driver to this kernel for vpn support?
[EVO 4G Android Development] coiledwire:
What are you using to test your SD speed? I'm seeing people report some crazy SD speeds.

I use SD Card Speed Test, but no matter what I try, the SD speed stays the same.

I have a 32GB class 10. Adjusting heap size from 24, 32, 36 with using read ahead values of 128, 256, 512, 1024, 2048 all net the same results; 8 write/ 15 read. I get 11 write/ 21 read when testing on the PC, so I know the card is capable. What gives?? :confused:
[EVO 4G Android Development] t12icky0:
heck yea

before tests

6mb write

3mb read

AFTER TESTS

6mb write(didnt expect to change)

9mb read

Class 6
[EVO 4G Android Development] strikeIII:
What exactly does this zip file do? Is it a kernel? Mod so you don't have to keep changing the file after a reboot? If so, what value does this zip set it to? TIA.
[EVO 4G Android Development] coiledwire:
It adds a file called "10sdreadahead" into the /system/etc/init.d folder and will set the read ahead value to 128 every time you bootup.

One requirement, your kernel must be able to support scripts. Check that init.d folder. If you see other scripts like 04apps2sd, 35zipalign, etc, then your kernel does and flash away.

If yours doesn't, you have to flash to a different kernel before you can use this zip.
[EVO 4G Android Development] Ecsoldier:
So can someone tell me why my Wintec 16gb class 10 card is Writing at 20 mb/s and reading at 200 mb/s ?
[EVO 4G Android Development] aimbdd:
I think somethings wrong here... :D
[EVO 4G Android Development] gpz1100:
Cached results? Try rebooting and rerunning.
[EVO 4G Android Development] strikeIII:
Thanks for the info. I've been using the modded stock HTC kernel that Calkulin made earlier in this thread but I wanted to use a different kernel that supports tun.ko for vpn and using the zip file sounds like it will allow me to implement this fix as well.

I'm currently using netarchy's latest beta 4.3.2-cfs-nosbc-have-more aggressive kernel which actually has this fix implemented into it but only set to 128 and I found that 512 works better for my class 2 32GB sandisk card. So, I modded the zip file to 512 so now everytime I reboot it's set to 512 instead of 128. AND I HAVE CISCO IPSEC VPN TOO!!! :D
[EVO 4G Android Development] skydeaner:
there is a new program on the market made by jim weiler / a.k.a. Vaelek that lets you set it to whatever you want without flashing zips or anything. Well worth the 99 cents to find your card's sweet spot if you ask me! https://market.android.com/details?id=com.vaelek.sdspeedboost

there is a linky for everyone
[EVO 4G Android Development] jdebutts:
thanks for this man
[EVO 4G Android Development] ogrenator:
Bought the app and it is a very nice alternative to doing this manually, and works like a charm. Good find!
[EVO 4G Android Development] Amco:
Using this on CM7 Nightly #12 got pretty low speed like class 2, just tried it now with flashable files just posted.

Test #1

Write 8 MB/s

Reading 25 MB/s

Test #2

Write 9 MB/s

Reading 28 MB/s

Using Transcaend 8gb class 6
[EVO 4G Android Development] jrmatics:
Thanx, just got it from the market
[EVO 4G Android Development] rcatank:
I am getting 13 MB/s write speeds... and 105 MB/s read speeds... but wtf.... when I connect to PC and transfer files from PC.... a whopping 899 KB/sec....

and yes... I mean MB/s and KB/s... and not Mb/s... and kb/s....
[EVO 4G Android Development] ccossin:
What is your read ahead setting, what kind of card, and what benchmark app are you using?

This has been a telepathic transmission from the Outer Limits
[EVO 4G Android Development] DROID_BOOST_75:
i just did it on my miui rom the new one 1.3.5 class 2 micro sd card 2gb sd and i got 5.4mb write and 42.2mb read.
[EVO 4G Android Development] devonparrish:
I love this! Woo!
[EVO 4G Android Development] cityneversleepz:
tested

thanks. free speed test app indicated write speed at 8 mbs and read at 18 mbs. I assume that is pretty good. the class was unknown according to the test as it supports test results up to class 6. Also the result of the root explorer exam was value set at 128 in cm 7 rom.
[EVO 4G Android Development] cityneversleepz:
more on sd card speed optimization

Found an app on 4shared - SD Speed Boost 1.0 apk. Nice thing is that it allows us to set the value. You can set it as low as 4 or a little over 4000. Also sets on boot. I tried some free speed boosts from the android market and some resulted in no change when I ran the free speed test provided in the above thread. Some even lowered my performance results. This one let me find the "sweet spot". For my evo 4g cm nightly #76 (tiamot)...(class 10 card) the sweet spot was in a range from 512 to 1152. Any higher value than 1152 actually lowered my performance. The value 128 preset in the cm, actually gives me a class 6 result. Now I am getting 9mbs write and 18 read and I think that is at least close to class 10 expectations.

Thanks again for leading me in the right direction.

cityneversleepz
[EVO 4G Android Development] runwitme:
Sweet . Thanks for all the info n the flash .

My test b4 fix on stock evo SD card

W-2 R-5

After fix

W-3 R -11

Retested with fix and got

W- 4 R 11

Did another test

W- 4 R 12
[EVO 4G Android Development] billyman:
Ok, what gives?? I'm running MikG v2.52 and mine is set to 4096. I just searched all 35 pages of this thread and didn't find one instance where someone's setting was 4096. I thought maybe it's 4x1024 (4096) so I figured maybe they mean 1024x128, so for ****'s and giggles I changed mine to 131072, but that didn't seem to make a difference.

Thoughts?

Opps, didn't mean to waken a 4 month old thread, but inquiring minds wanna know...
[EVO 4G Android Development] broad_st_bully:
can I use an SD Card booster to speed it up?
[EVO 4G Android Development] k9doog:
After update SD.....

I change the sd card to a 16gb class 10 PNY, since then to transfer a file from PC to Phone take forever, to copy on the phone 84K it took 6 min.

I use the SD Card Speed Booster set to 256, and i am running MIUI.

Any help will be appreciate.
[EVO 4G Android Development] Andromorphone:
The fix doesn't address the flaw in all 2.6.37 and newer kernels' (lack of) ability to write to the sd card over USB in excess of 768-1000KB/s...it only modifies the internal system's ability to read and write to/from the ROM & SD card. Since all current aosp ROMs (cm7, miui) use these newer kernels, we're stuck with the slow USB SD write speed without a program like "multi-mount SD"...but such apps can corrupt SD data in such a way as to bork your ability to backup and/or restore via nandroid, and once this happens a reformat of the card is required to fix..(chkdsk wont work).

So if u don't want to use a sense ROM, ur better off using recovery (faster) or removing the card from the phone (fastest) to transfer large amounts of data to ur SD card.
[EVO 4G Android Development] lbcary:
I set mine to 768 & i am using MikG 2.55,Sense 2.1-3.0 rom. I noticed it set to 4096 & in my experience that seemed high. My nandroids backup & restore just fine at 768 for the sdcard read speed.
[EVO 4G Android Development] Geegolly:
I'm also getting those speeds on the Evo's stock 8gb card.

I'm on CM7 and my read ahead buffer is set to 128.
[EVO 4G Android Development] ncfastls1:
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?
[EVO 4G Android Development] Shigster:
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.
[EVO 4G Android Development] lahma69:
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.
[EVO 4G Android Development] lahma69:
Yes, you do change it from 4 to 128! Sorry my original post was confusing!
[EVO 4G Android Development] zone23:
I guess all we have to do is get one of our kernel geneses to change it for us..
[EVO 4G Android Development] nkawal:
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.
[EVO 4G Android Development] nsxla:
Highly doubtful your card isn't going to run faster than its class - mine is underclocked to class2 :(
[EVO 4G Android Development] ewells38:
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:
[EVO 4G Android Development] wallaceb:
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?
[EVO 4G Android Development] david279:
Ok...Anybody have a idea why it was set so low from the start?
[EVO 4G Android Development] wallaceb:
I am wondering this myself. There is probably a reason why the setting is defaulted to 4 and not 128
[EVO 4G Android Development] m4rk0358:
Just like there was a reason for the 30 FPS cap?
[EVO 4G Android Development] david279:
Or just like why they used the charging method they used instead of trickle charge method?
[EVO 4G Android Development] Jason kiDD:
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...
[EVO 4G Android Development] aimbdd:
you can't overclock an sd card... lol.
[EVO 4G Android Development] Beejis:
I want to say cm already implemented this in his roms, but I'm not certain.

Pocket posted, just not sure how...
[EVO 4G Android Development] tejasrichard:
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.
[EVO 4G Android Development] bmsmith80:
I did notice that the gallery loaded extra quick on CM. I guess that's why!
[EVO 4G Android Development] snovvman:
My Evo is 4. My Epic running DK28 leaked Froyo is 128 by default.

Hmm....
[EVO 4G Android Development] nivron:
I'm using Myn's Warm 2.2 RLS 5 with Ziggy's "BETA Kernel EVO CFS 15 Jan 11 (236)" and the setting was already at 128. Hope this helps!
[EVO 4G Android Development] chris66:
Read speeds up to 10 from 4 (before and after, 2 runs each)on a class 4,16g card Very nice, especially running DT'sA2sd. Thanks!
[EVO 4G Android Development] digitalrurouni:
I wonder if the kernel already does that because I am running netarchy 4.3.1 and mine was set to 4.
[EVO 4G Android Development] INebilim:
Would love to see a flashable zip for this cause i am clueless