yashsingh1/xdaforums huggingface dataset:
[EVO 4G Android Development] Beknatok:
No ADB Wireless?

And yes, it is not a new kernel.

If you've just manually modified the file, then yes, it will reset upon reboot.

Either flash my file, which will set it to 128, or there is another file that will flash it to 256. Use the latter if that value results in better performance with your phone and SDCard.

I fully documented how. Post #47.

Keep in mind that your results will vary, depending on whether an app is already loaded into memory or not. Remember that Android pre-loads a number of applications and keeps them in the background, just in case you invoke them.

As with any read ahead buffering, random access times MAY be adversely affected. The optimal scenario for read ahead buffering, is if all of the files being retreived in a given read operation are stored linearly. If you have heavy fragmentation or many individual files are physically scattered all over, then buffering will benefit the operation less.

The above is a generalization... as different OS's and buffering implementations have done various things to try and optimize their behaviors and algorithms.
[EVO 4G Android Development] Beknatok:
Yes - you missed that Ziggy's kernels already have this tweak implemented. Other custom developers MAY have implemented this as well (I believe someone noted it was implemented in CM).
[EVO 4G Android Development] m4rk0358:
I flashed your file and it is came up as 4 after rebooting.
[EVO 4G Android Development] Beknatok:
What ROM are you using?

Are you stock? If so, this will not work.

You need to be on a custom ROM that has init.d support built into it.
[EVO 4G Android Development] SpydaPig:
oh ok, thanks for the info. I did not know that. I've been running ziggy's kernel for a couple days now.
[EVO 4G Android Development] m4rk0358:
Baked Snack 1.8 (I think it's 1.8. He stopped showing the version number in "System Info" at some point)
[EVO 4G Android Development] moseso:
Found this whole thread today.

Running the latest Sprint Lovers ROM on 0003 EVO.

Installed the speed test. Initial run: W - 2, R -1 Card = class 2.

Used Root Explorer and found that /sys/devices/virtual/bdi/179:0/read_ahead_kb was 4.

Changed it to 128.

Speed Test #2: W - 2, R, - 2. Card = class 2.

Well, that's an improvement, I guess....

Checked to see if I had a /etc/init.d directory. I do!

So I flashed the .zip and my read_ahead_kb is now permanently set at 128

It all worked for me...

Now I guess I have to spend the big bucks on a better SD Card to actually reap the benefits of this mod...

I do have a question... Does this change effect only the internal handling of the SD card, or will it also effect the speed of USB file transfers to/from my desktop?
[EVO 4G Android Development] gotshores:
what about the write speed?

I might be asking a stupid question, but can this tweak be applied to the write speed as well?

Before the tweak, on the stock 8 gig card, i was getting write speed of 1MB/s and read speed of 1MB/s. Now, with the tweak applied; I get the same write speed and a read speed of 6MB/s. Even if I can't change the write (unless I get a new higher class card), thanks to the OP for this post!
[EVO 4G Android Development] jauger:
I dont think anyones found the values for write yet.....but Im sure someone will soon...
[EVO 4G Android Development] smw6180:
What this does is changes the read ahead blocks from whatever your default was (4k, typically) to 128k. Since the operating system can make a good guess at what you're trying to read next it can do a 'read-ahead' and grab the information before you actually request it...this gets pushed into RAM and read from there, hence the higher read speeds.

Since the operating system can't 'write-ahead' (it has absolutely no way of scanning your SD card for data that isn't there yet...or you wouldn't be writing the data in the first place) there's no way to implement a similar fix for write speeds.

However. There SHOULD be a way to stage all writes through internal RAM and then have it stage from there to SD card. I just have no idea how to implement that....and the potential for bogging down your phone (because all the data you're attempting to write would sit in your RAM until the SD card caught up to it, which in turn would slow your phone all to hell since it uses RAM for...well everything basically) is extremely huge.

Edit: I'm using 256, incidentally, which increased my read speed even more. But again you have to be careful of higher numbers because at some point you'll start bogging down system RAM as it's now holding a lot more data while your software is reading and looking for stuff. Theoretically it shouldn't matter unless you're attempting to read in a WHOLE LOT OF DATA all at once (large PDF files, for example), but it's probably best to stick with 128.
[EVO 4G Android Development] 4g evo:
Thanks!!!!

write speed 2mb

read speed 8mb

=D
[EVO 4G Android Development] merkk:
FYI - i tested this on an app i have for viewing photos - all stored on the sd card - noticeably better performance. So while this tweak may not give you a X times improvement on everything, it might help on some things.

You will also get better speeds transferring between the pc. I also have a class 2 16gb card - but i guess i got lucky because my read speed went from 1mb to 5mb in the internal test, and i see a similar increase in speed copying files from the phone to my pc.

If you are going to get faster card, you should check out newegg. They have a class 10 16gb card (wintec) for $30 w/free shipping.
[EVO 4G Android Development] Clarkkent434:
I am running Warm TwoPointTwo Rls 5. I have tried Baked Snack 1.9 and Fresh1.1 with the SD card fix kernals but no luck on the SD fix. Cm6.1.2 see to be the only ROM to read the SD but I have seen some sign of SD failure. I have formated it with windows as Fat32 twice no luck.

My Evo has already corrupted the stock SD card so I would love to get this fixed.
[EVO 4G Android Development] jalexishg:
Coolio, thanks gonna try this now.
[EVO 4G Android Development] skydeaner:
Mine was already set at 128 also. I get 4mb write and 14mb read on a class 4. Just about right.
[EVO 4G Android Development] beartrap:
Here's my results for AData 16GB Class 6. All results are an average of 3 or more runs at each setting. I am running Re-Engineered 3.70 ROM with stock HTC 15 kernal and Collin's battery tweak.

Initial test w/setting at 4: 7w/5r

Manually changed setting to 128: 8w/11r

No difference for settings at 256 or 512

Flashed Caulkins Kernal w/ SDCard fix: 2w/11r

Flashed stock HTC 15 kernal and setting stayed at 128: 4w/11r

Restored nand to pre-test and setting went back to 4: 6w/5r

Manually changed setting to 128: 7w/12r

Flashed Caulkin's SDCard fix: 6w/13r

Why the drop in write speeds with Caulkins kernal? All runs at each test were consistent with each other. Yes, I wiped cache and dalvik before any flash. Also of interest, my Quadrant scores are now about 30-40 points above what they used to be (scored my highest ever at 1309). Photo albums do load faster and I believe boot time has been reduced (didn't time this so it's just my feeling).
[EVO 4G Android Development] Geronimo.USMC:
After I flash the signed zip, do I have to worry about the setting reverting back after reboots?
[EVO 4G Android Development] beartrap:
It has stayed for me after several boots.
[EVO 4G Android Development] gpz1100:
For those of you who have flashed the cache zip, are you actually recognizing a noticeable increase in operation of certain tasks?

What tasks?

Sure it increases benchmark numbers, but what is the practical benefit - besides when copying the contents of the sd over usb. Not trying to diss this tweak, just trying to understand its day to day benefits.
[EVO 4G Android Development] live2ride96:
Same here.
[EVO 4G Android Development] xjreyes:
My card was at set at 4, then when I switched it to 128 saw a big difference

4 WS was 4mb/s

RS was 5mb/s

128 WS is 4mb/s

RS is 14mb/s

on my 16gb Class 2

Thanks for the fix/tip
[EVO 4G Android Development] Jus10o:
Doing anything that uses your sdcard. Like viewing pictures, or using apps that have data stored on the card. You might not notice it with every day use, but just loading my 124 pictures I could tell the difference instantly.

Aside from that, this is a insanely easy "mod" that wont do your sdcard any harm so I dont see a reason in not doing it.

And to all the people that know a little bit about adb or terminal commands..(and have a init.d folder with scripts) mount your system, pull one out.. Add this to the file, at the end if you want..

mount -o remount,rw /

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

mount -o remount,ro /

And then push the file back to the /system/etc/init.d folder and every time the phone boots up it will echo the command.

This is what the flashable zip is doing (maybe little more i didnt look a it).. Just posting this for learning reasons so you know whats going on.
[EVO 4G Android Development] spyderdreams:
quote"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!"

ty i tried that kernel and it works great i am using Myn's Warm 2.2 RLS 5 too
[EVO 4G Android Development] Big517:
Wow, I must have a crappy stock card. I was at w/r 1/1, then after the mod I hit a whopping 1/6 respectively. At least it works, but now it makes sense on why my nandroids take like 15 minutes to write. Time to hit newegg for a new card!

Hmm... just tried 512 and got 1/12!
[EVO 4G Android Development] indiscriminant:
I have a 8g class 4 card, applied the zip file update on Sprint Lovers Rom which had the file set to 4 and now to 128.

Copied my previous Root Files as I just recently rooted my new Evo coming from a hero. Transfer feed to my backup folder on my desktop was 3.96mb/sec according to windows. Class 4 as it should be.

Applied the updated, and then copied my nandroid folder to my backup folder on my desktop computer. Trasnfer rate bounced from 8-9.6mb/sec (2 nandroids one from root and one from prior to flashing the zip).

I will take twice the real world speed for such a simple fix. Good times.
[EVO 4G Android Development] Beknatok:
This is exactly what my file is doing. And my old "manual" instructions, are fundamentally that as well. Except I don't modify an existing init.d script, but created a standalone one. For that, you also have to make sure that execute permissions are granted to the new file.

See my full write-up here:

http://xdaforums.com/showpost.php?p=10760186&postcount=47
[EVO 4G Android Development] kenny111008:
just set mines from 256 to 512 but id just like to know if this will revert back every time i reboot? if so is there a flash able zip that can permanently leave the value at 512 cause this is fast... i have an 8gb class 6
[EVO 4G Android Development] Mikee4fun:
I have a 16GB class 10 Kingston card and still only get 4MB write and 16MB read. Weak sauce!
[EVO 4G Android Development] lahma69:
Blew up!

Wow, when I started this thread,i didn't think it would attract this much attention. I'm glass I found this digging through the desire forums. Great to see it got some attention focused on the sd cards as such fast ones are coming out now.
[EVO 4G Android Development] beartrap:
Correction - I restored a nandroid backup and boot times are virtually the same: average 54 seconds without SDCardFix

average 53 seconds with SDCardFix
[EVO 4G Android Development] freeza:
My read speeds didn't increase that much with the 32GB SanDisk Class 2 card I got from Verizon.

After:

Write: 2 MB/s

Read: 6 MB/s

So, I just bought the Wintec Class 10 from Newegg. :)
[EVO 4G Android Development] live2ride96:
Strange thing is I'm running a 32 gb class 2 and it says I've got a class 4. Weird.
[EVO 4G Android Development] flipper12:
Is it a Sandisk? I've heard that their cards usually run a little faster than their listed speed ratings.
[EVO 4G Android Development] live2ride96:
Why yes as a matter of fact it is. I've heard the same thing too. That's what I chalked it up to.
[EVO 4G Android Development] live2ride96:
Really? That's about what I was getting before. Now I have 4 and 8.
[EVO 4G Android Development] mikeinghilterra:
calk's mod - 512 instead of 128

i changed the script in calk's previous kernel to 512 from 128
[EVO 4G Android Development] cavediver:
I have a Wintec 16 gb class 10 card.

Using the 128 zip I was consistently getting 6mb write / 13-14mb read.

Using the 256 zip I am now consistently getting 10mb write / 15-16mb read.
[EVO 4G Android Development] hcu721:
just curious .. what ROM are you running on?

i have A-Data 16GB class10 running on MikFroyov4.4 w/ apps2sd.

i'm gettting an avg 14/10 using the flash zip by akazabam @ AndroidForums. setting it at 128.

i wonder if 256 would make a difference for me.
[EVO 4G Android Development] Nyckrs:
i have the same result with the same card. Is it safe to change it to 256 or even 512? bad idea right?
[EVO 4G Android Development] MikeBrWade:
You could technically if you tweaked the bus and controller fpga load. But ha, doubt many will do that. ;-)
[EVO 4G Android Development] Rocklee99:
i tried flashing the permanent version and it wont work for me...what i do wrong?
[EVO 4G Android Development] cavediver:
Myn's RLS5
[EVO 4G Android Development] johnnymcmahan:
yeah...tried this kernel...my phone was F.U.B.A.R after I flashed it. Didn't like reading my sd card properly

Flash that one at your own risk!!!
[EVO 4G Android Development] 1975jamie:
this is inserting. I made a rom for my wife phone and just checked hers. I found it was at 128. I have also made a rom for my phone which is listed on xda. I found my phone is at 128.. seems to be that everyone on here is at 4 and has to change it to 128
[EVO 4G Android Development] igotroot:
Wow......my 0004 straight from the store 2 days ago just tested 2 write and 4 read....sucks!!!!
[EVO 4G Android Development] igotroot:
When I ran my recent test, the app stated that speeds are determined by class, so your class 2 SD allegedly has a ratings of allegedly 2W and 4R.

I'm looking to buy a high class 32gb card class 10+
[EVO 4G Android Development] furrelkt:
tried this tonight.

Running class 10, 16g. Wintec

Rom:Myn RLS5

ran the test, the number was at 4, did the speed test and it said class 6 card

write: 6 MB/s

read: 7 MB/s

changed to 128, just changed using root explorer

write: 9 MB/s

read: 14 MB/s

now it says class unknown

should i use calks zip (either modded kernel) and try that or run a ziggy kernel?

Edit: flashed Ziggy latest and it went back to the first speed test numbers, low numbers....

Decided to flash netarchy-toastmod-4.3.1-cfs-havs-nosbc-universal-signed.zip kernel and running much better...results:

Thanks

Keri
[EVO 4G Android Development] mikeinghilterra:
let me take another look - i flashed in on myns and mikfoyo and it worked fine on both.
[EVO 4G Android Development] cavediver:
Did you flash using Amon's latest recovery? If so, did you toggle signature verification off? If you used Amon's 2.2.1 or greater and you didn't toggle signature verification, the flash might not have worked.
[EVO 4G Android Development] wase4711:
so, I flashed this and it increased my read speed...BUT, now, I notice that when I move files from my pc to the card, the speed is SUPER SLOW; I used to be able to move a 80 meg ROM from my pc to the card in about 10 seconds; not it takes about 5 minutes!!

Is there a way to "undo" this fix? I dont like how slow it has made if for me to move files to the card...
[EVO 4G Android Development] og954:
I just flashed caulkins fix and did another speed test which only showed a minor increase in speed, but then I opened my photo gallery and noticed a huge improvement. Thank you guys.
[EVO 4G Android Development] mikeinghilterra:
just reflashed on a clean install of mikfroyo 4.4 and it worked fine. did you wipe both caches before flashing?
[EVO 4G Android Development] xHausx:
Thanks for this man, I was wondering why it was so freakin slow lately. Although now you've got me wondering about write cacheing...
[EVO 4G Android Development] lahma69:
If you were saying thanks to me for the post, then you are very welcome! It would be the first ;) Its not my my work anyways,I only brought the issue up in the evo forums. I can't believe how much it has blown up! It was so needed...
[EVO 4G Android Development] gpz1100:
The evo people need so little to get their wheels rolling :)
[EVO 4G Android Development] mmmdieselfumes:
Any way you could do a 512 mod to his fix only zip?

Went from 2/2 to 2/6 with the stock 8gb card using calk's fix only zip, using the 128 value I believe. Would really like to see what this stock card can do with 256 or 512!

Sent from my HTC Evo, with Android.
[EVO 4G Android Development] nck4857:
I just noticed this, also.. I went to transfer a file to my card and it took FOREVER and the file was only like 5MG...
[EVO 4G Android Development] catseyenu:
netarchy is now including the 128 SDCard fix in his 4.3.2 kernels.

http://xdaforums.com/showthread.php?t=719763
[EVO 4G Android Development] strongsteve:
Ziggy kernel is giving great results on my patriot 32gb class 10 card
[EVO 4G Android Development] Neo3D:
I have a 32GB Class 2 Card from Sandisk:

Original Test

:read_ahead_kb = 4

Read Speed: 2MB/s

Write Speed: 4MB/s

Test 1

:read_ahead_kb = 8

Read Speed: 4MB/s

Write Speed: 6MB/s

Test 2

:read_ahead_kb = 16

Read Speed: 5MB/s

Write Speed: 6MB/s

Test 3

:read_ahead_kb = 32

Read Speed: 7MB/s

Write Speed: 6MB/s

Test 4

:read_ahead_kb = 64

Read Speed: 8MB/s

Write Speed: 6MB/s

Test 4

:read_ahead_kb = 128

Read Speed: 9MB/s

Write Speed: 6MB/s

Testing Process:

Set screen timeout to 10min

Exit application by pressing EXIT after each test.
[EVO 4G Android Development] phatmanxxl:
Maybe thats why the speed tester app read all my cards at class 2, I thought the app was bunk.
[EVO 4G Android Development] ccaudio1:
using the stock samsung 8 gig class 2 that came with the phone

Read_ahead KB @ 216

write: 4

read: 8

thats the sweet spot for this sdcard.. cant wait to get atleast a class 6 soon
[EVO 4G Android Development] mmmdieselfumes:
Any reason for 216 instead of the 256?
[EVO 4G Android Development] gpz1100:
Was backing up the sdcard tonight via usb. avg'd ~10 MB/s (as indicated in windows 7) using the stock sandisk 8gb class 4 card. I had about 6 GB that got copied over.

My read ahead is set at 128(KB?). What we need is an app does does the sustained read and write, as well as a random read/write test.
[EVO 4G Android Development] naztek:
i opended the file in text editor and it had in the file was 1048!! what the hell does that mean?
[EVO 4G Android Development] crstfr:
lmao.... sorry but that made me laugh dude!!!! omg... ..crying.......

mine was set to 4...... changed it to 128.....

my write is about 10-11.... my read jumped from 7 to 16!..... awesome!
[EVO 4G Android Development] Beknatok:
Whose ROM/kernel are you using?

All this value sets is the size in kb, of the read ahead buffer. 1024 is quite large and probably too aggressive.

Sent from a beach in the Caribbean.
[EVO 4G Android Development] kingtheproducer:
Sweet! My Evo was set at 4. ? ? ? ? Hopefully i see a difference. THANKS!!!;)
[EVO 4G Android Development] phocus:
I have an HTC hero, I have been wondering about this for some time. I replaced my card with a class 6 card and did not notice the difference.

I ran the test on it. 9Mb/Read 2Mb/Write. It identified my card as a class 2. Do you think this fix will work on the HTC Hero.
[EVO 4G Android Development] crstfr:
mine was set to 4... i change it.. seen the big diff..... got back from lunch, went to brag.. check this... boooooo... back to old numbers.... checked the file.. its back to 4... after i saved as well... wild..
[EVO 4G Android Development] moosc:
On my X it is already at 128.
[EVO 4G Android Development] Beknatok:
Did you reboot? The value will not stick. I coded a way around it (see post #47), but my solution only works if you're on a custom ROM with init.d support implemented.
[EVO 4G Android Development] crstfr:
cool, checkin it~.. thanks for the reply`
[EVO 4G Android Development] freeza:
Just got my wintec class 10 32gb, time for tests!
[EVO 4G Android Development] PeoplesHelper:
Thanks works for me just great,reboot and test all good:D
[EVO 4G Android Development] freeza:
What do you guys think is the best setting for a class 10 card?

I read that 256/512 were sweet spots. Can someone who has tested both on a class 10 chime in? :)
[EVO 4G Android Development] ruben1221:
Yea mine was already at 128....Thanks anyway for the great find for the others who were set a different number.
[EVO 4G Android Development] merkk:
each card is different, so your best bet would be to try both and see which one works best for your card. It's not like it's that hard to test it. Either use the sd card test app, or just copy a largish file from your phone to your pc.
[EVO 4G Android Development] aliaselchore:
mine is already on 128

im running cyanogen 6.1 for MetrPcs on my Evo and i was interested in this post. but i checked and my value and it already says 128.

Does someone know is it normal? does the ROM inclued it or im just luky?:eek:
[EVO 4G Android Development] Beknatok:
Yes, the developers of some custom ROMs and/or kernels have known about this tweak for a while, so it is already implemented.
[EVO 4G Android Development] gotshores:
btw, that kernel that calk posted earlier in this thread is giving me great battery. is it because of the undervolting scripts that are included?
[EVO 4G Android Development] nck4857:
Any chance you could create that zip for 528? I've done a lot of testing and that's the best speed for my phone, but I hate resetting it everytime I reboot the thing..

Thanks

>> I guess I could just use root explorer and change it, but it would still be easier to just have a flash to make it semi-permanent..
[EVO 4G Android Development] crstfr:
there is a zip.. just flash it and it will keep the correct 128 value....

i went from 7/8 write and 7/8 read.... on a class 10...with the fix.... i'm 10-12 write...and 15-17 read.....

the love~....
[EVO 4G Android Development] Beknatok:
Use my zip file, and use root explorer to modify /etc/init.d/10sdreadahead. That is the startup script that overwrites the read ahead buffer setting to 128 (or whatever value you want). That startup script is what makes this tweak "permanent."

If I find some extra time today, I think I'll rewrite my post to offer more comprehensive & updated information about this tweak... and collect all of the different zips together (as someone else threw together a 256kb variant as well).
[EVO 4G Android Development] nck4857:
Thanks, I'll give it a try later tonight...
[EVO 4G Android Development] tailsthecat3:
i tried flashing cal's kernel for this fix. i use a stock rooted rom. i flashed the kernel provided but adb still read value of 4. i attached the kernel i flashed.

i dont really have a problem with the speed in which my device operates. id always like it to read and load pics faster. surely there is a way to make this work. thank you
[EVO 4G Android Development] gotshores:
from what i've read, this won't work with a stock rooted rom. something to do with stock roms not being able to run the boot up script i believe
[EVO 4G Android Development] djhvc:
thank you!
[EVO 4G Android Development] lahma69:
Nonetheless, he still should be able to change the value with a file manager.
[EVO 4G Android Development] lahma69:
Have you tried changing the value manually via a file a manager or adb? No reason that shouldn't work, and actually I believe the stock rom does have boot up scripts. Can anyone confirm this?
[EVO 4G Android Development] ccossin:
I use Sprint Lover's ROM (an older version) and the SD speed fix worked for me. I used the flashable zip Calkulin put up. This Rom is generally stock with some added attractions. As a matter of fact the dev just put out an update to include this fix.

This has been a telepathic transmission from the Outer Limits.