Speed Up Sd Card Write


BAFelton

Well-Known Member
Joined
Jun 23, 2010
Messages
1,273
Website
www.open-consoles.com
Hi !

Zx81 gave us a trick to improve the SD card write speed. Here's a mail he sent to simon (from GPH) :



I don't know if its due to my SD card (i've tried few kinds with the same result, so i guess not). While using the Caanoo as a USB storage device (under linux); the write speed is really slow (10 kB by second) . I've tried also using a ssh/dropbear session on the caanoo and the following command gave me the same result :

... ssh caanoo ...
root@caanoo's password:
~ # mkdir -p /mnt/sd/tmp
~ # cd /mnt/sd/tmp
/mnt/sd/tmp # time dd if=/dev/zero of=pwet bs=1024 count=100
100+0 records in
100+0 records out
real 0m 11.88s
user 0m 0.01s
sys 0m 0.05s

Then i've modified the mount options of the SD card :
/mnt/sd/tmp # mount
/dev/mmcblk0p1 on /mnt/sd type vfat (iocharset=utf8,sync,noatime)
/mnt/sd/tmp # mount /dev/mmcblk0p1 /mnt/sd -o remount,dirsync,noatime
/mnt/sd/tmp # time dd if=/dev/zero of=pwet bs=1024 count=100
100+0 records in
100+0 records out
real 0m 0.01s
user 0m 0.00s
sys 0m 0.02s

And the speed is now much better (but it needs a 'sync' before removing the SD card ...). Using the Caanoo as a mass storage with this mount option, i got very good speed as well.



Simon answered this was for the SD security to make instant writings on it.


So, to improve this, here's a autorun.gpu to add on the root of your SD.

Code:
#!/bin/sh

/bin/mount /dev/mmcblk0p1 /mnt/sd -o remount,dirsync,noatime

cd /usr/gp2x
exec ./gp2xmenu


It will work, but if you have many SD cards, copy this on each of them. This file must be saved in UNIX format. (follow this tuto : http://www.gp32x.de/board/index.php?/topic/60320-tuto-making-ini-files/ )

Here it is : http://www.multiupload.com/63UNEEIU1C

If you don't want it anymore, just remove it from your SD on your PC ;)


We've seen a real improvement with loading some games (I think of Payback with Ginge, it's reaaally faster to load)

I'm not the author of the code, only Zx could answer questions about this.
 
Last edited by a moderator:
Sadly, but nothing happens for me. Speed still pretty low - about 100-200kb/s.
 
this is interesting, if it works- do you have benchmark? (cannot test it atm)
 
Before I installed this, I moved a 30MB file to my Caanoo. Started at about 200 kb/s at increased to around 900 kb/s.

After installation, moved the same file. Started at about 1.25mb/s and increased slightly.
 
What firmware version and sd card are you use?
I have 1.6.0 fw ver. and 16GB class 10 SDHC card. It seems that this method doesn't work for me :(
 
According to the SD specs, the more data you write at once, the better ratio bytes/s you would get. Buffering helps, increasing cluster size also helps:)
The best effect is when you combine buffering enabled and SD card formatted with smart formatting utility (like this one https://www.sdcard.org/downloads/formatter_3/ )
I personally use SD card formatted with ext2 fs, but i have my own reasons to do that:)
 
I have the latest firmware and a Class 10 16GB SDHC.

Yeah, I think that one download might have been a fluke since I get varying USB speeds all the time, which is normal to the standard.
 
Woot.com has a 32GB SDHC card on sale today. One interesting post that I read said that Class 6 cards are more optimized for writing of large, contiguous amounts of data, while Class 10 cards are more optimized for random access of data (I may have the classes switched around). I haven't done the research to verify whether this is correct.
 
Back
Top