Jump to content

Improve SD speed.


Recommended Posts

Guest BashyUK
Posted
I seen a thread on XDA on how to improve the SD card speed, http://forum.xda-developers.com/showthread.php?t=815557

I have tried it and here are my results.

I'm using a Class 4 card, 8GB.

Before:

Write 3 MB/s

Read 5 MB/s

Now:

Write 3 MB/s

Read 14 MB/s

Worth noting that applying this overwrites your kernel. The OP has put a version incorporating richardtrip's v4 kernel (a few pages in not on his first post) but if you're using any other then be aware this will overwrite it.

Posted
Worth noting that applying this overwrites your kernel. The OP has put a version incorporating richardtrip's v4 kernel (a few pages in not on his first post) but if you're using any other then be aware this will overwrite it.

and where would be the improvement other than another kernel?

isn't readahead for reading ahead rotating sectors for later use in larger files so that there is no wait for one more rotate of the disk?

and on sdcard and nand all storage is static non rotating and has the same access time?

i don't get it

Guest frankoid
Posted
and where would be the improvement other than another kernel?

isn't readahead for reading ahead rotating sectors for later use in larger files so that there is no wait for one more rotate of the disk?

and on sdcard and nand all storage is static non rotating and has the same access time?

i don't get it

Yes, one would expect readahead to have much less impact when using flash media than when using rotating media, but this change definitely improves SD performance. Perhaps reading from SD is faster when the data is read in larger chunks?

BTW, the readahead constants are 16K to 128K in all of the kernel versions I've looked at except HTC's 2.6.32.15 where they are 4K to 4K. Don't know why they changed them - I wish I could see their git repo so that I could look at the commit comments...

Interestingly, although readahead is 4K in the Bravo and Supersonic kernels it is back up to 16 to 128K in the Vision kernel. Perhaps HTC realised the downside of reducing it to 4K? OTOH the Vision kernel source might not be a 'descendant' of the Bravo or Supersonic kernel source.

Posted (edited)
Yes, one would expect readahead to have much less impact when using flash media than when using rotating media, but this change definitely improves SD performance. Perhaps reading from SD is faster when the data is read in larger chunks?

BTW, the readahead constants are 16K to 128K in all of the kernel versions I've looked at except HTC's 2.6.32.15 where they are 4K to 4K. Don't know why they changed them - I wish I could see their git repo so that I could look at the commit comments...

Interestingly, although readahead is 4K in the Bravo and Supersonic kernels it is back up to 16 to 128K in the Vision kernel. Perhaps HTC realised the downside of reducing it to 4K? OTOH the Vision kernel source might not be a 'descendant' of the Bravo or Supersonic kernel source.

interesting indeed, i have a Intel X25-M SSD, which showed 64 in sysfs and hdparm -a showed 4 in ubuntu.

measured time with hdparm doesn't vary much if i set it to 128 instead of 64 in sysfs, and after rebooting the disk is magically set to 128 in sysfs and 256 instead of 4 in hdparm, and i get the same speed as before?

with default 64k readahead in sysfs

/dev/sda1:

Timing cached reads: 1288 MB in 2.00 seconds = 644.36 MB/sec

Timing buffered disk reads: 508 MB in 3.00 seconds = 169.16 MB/sec

doesn't the controller of the disk optimize read on his own without kernel?

another interesting thing

if i set a value in sysfs ie

:/sys/block/sda/bdi# echo 512 > read_ahead_kb

and do a get readahead with hdparm

the value in hdparm is always the double of sysfs, automatically

well it differs if i set it to 1024 in sysfs / 2048 hdparm

/dev/sda1:

Timing cached reads: 1594 MB in 2.00 seconds = 797.56 MB/sec

Timing buffered disk reads: 694 MB in 3.00 seconds = 231.23 MB/sec

Edited by woti17
Guest BashyUK
Posted
is it safe to flash this kernel with modaco R9?

Safe is boring :P

Providing it says it's for FroYo Sense based ROMS I'd give it a go, just do a Nandroid before and if it all f's up, restore it.

Guest JasonKenny
Posted
Safe is boring :P

Providing it says it's for FroYo Sense based ROMS I'd give it a go, just do a Nandroid before and if it all f's up, restore it.

I flashed it yesterday on MCRv9......all aims ok

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.