[G1 Android Development] SilentMobius:
Right I made some alterations to my test.

First I tried peppering the copies with "sync" to minimise the effects of caching. But eventually I just gave up and remounted my sdcard with the "sync" option, and it did indeed make quite a difference. One thing to note though, I only ever time the actual copy, I only ready from (in my case urandom) a device before timing, the reason I used urandom is that I just wanted to be absolutely sure that the file in question has high entropy. The reason I don't time reading from /dev/zero is that tests writing and "data-creation from a specific block device" not reading and writing.

So here are my results for a similar 1024000 byte file:

/sdcard/tmp # ash disktst3.sh
ash disktst3.sh
1+0 records in
1+0 records out
real 0m 7.52s
user 0m 0.00s
sys 0m 0.35s

/data # ash disktst3.sh
ash disktst3.sh
1+0 records in
1+0 records out
real 0m 0.66s
user 0m 0.00s
sys 0m 0.08s

more disktst3.sh
dd if=/dev/urandom of=tst0.bin bs=1024000 count=1
time cp tst0.bin tst1.bin
rm tst0.bin
rm tst1.bin

Looks like my previous results reversed, but I just want to make sure that scales as expected.

/sdcard/tmp # ash disktst3.sh
ash disktst3.sh
1+0 records in
1+0 records out
real 0m 31.10s
user 0m 0.01s
sys 0m 1.92s

/data # ash disktst3.sh
ash disktst3.sh
1+0 records in
1+0 records out
real 0m 8.47s
user 0m 0.01s
sys 0m 1.38s

/data # more disktst3.sh
more disktst3.sh
dd if=/dev/urandom of=tst0.bin bs=1024000 count=1
time ash disktst2.sh
rm tst9.bin

/data # more disktst2.sh
more disktst2.sh
cp tst0.bin tst1.bin
rm tst0.bin
cp tst1.bin tst2.bin
rm tst1.bin
cp tst2.bin tst3.bin
rm tst2.bin
cp tst3.bin tst4.bin
rm tst3.bin
cp tst4.bin tst5.bin
rm tst4.bin
cp tst5.bin tst6.bin
rm tst5.bin
cp tst6.bin tst7.bin
rm tst6.bin
cp tst7.bin tst8.bin
rm tst7.bin
cp tst8.bin tst9.bin
rm tst8.bin

Just to be sure that there is no caching on data (just a different type of caching) I remounted /data with "-o sync"

/data # mount
mount
rootfs on / type rootfs (ro)
tmpfs on /dev type tmpfs (rw,mode=755)
devpts on /dev/pts type devpts (rw,mode=600)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /sqlite_stmt_journals type tmpfs (rw,size=4096k)
/dev/block/mtdblock3 on /system type yaffs2 (ro)
/dev/block/loop0 on /system/modules type cramfs (ro)
/dev/block/loop1 on /system/xbin type cramfs (ro)
/dev/block/mtdblock5 on /data type yaffs2 (rw,nosuid,nodev)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev)
/dev/block/mmcblk0p1 on /sdcard type vfat (rw,sync,fmask=0000,dmask=0000,codepage=cp437,iocharset=iso8859-1)

/data # mount -o remount,rw,nosuid,nodev,sync -t yaffs2 /dev/block/mtdblock5 /data
mount -o remount,rw,nosuid,nodev,sync -t yaffs2 /dev/block/mtdblock5 /data
/data # mount
mount
rootfs on / type rootfs (ro)
tmpfs on /dev type tmpfs (rw,mode=755)
devpts on /dev/pts type devpts (rw,mode=600)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
tmpfs on /sqlite_stmt_journals type tmpfs (rw,size=4096k)
/dev/block/mtdblock3 on /system type yaffs2 (ro)
/dev/block/loop0 on /system/modules type cramfs (ro)
/dev/block/loop1 on /system/xbin type cramfs (ro)
/dev/block/mtdblock5 on /data type yaffs2 (rw,sync,nosuid,nodev)
/dev/block/mtdblock4 on /cache type yaffs2 (rw,nosuid,nodev)
/dev/block/mmcblk0p1 on /sdcard type vfat (rw,sync,fmask=0000,dmask=0000,codepage=cp437,iocharset=iso8859-1)

/data # ash disktst3.sh
ash disktst3.sh
1+0 records in
1+0 records out
real 0m 8.97s
user 0m 0.01s
sys 0m 1.37s

Yep very similar, well thats more expected. So in real circumstances the nand flash storage seems to be about 16 Mb/s (Megabits/sec) (9 reads 9 writes of 1024000 bytes)

And my class2 card is about 4.7 Mb/s which seems like a more realistic number for a min 2Mb/sec card.

Oh hang on... are they measuring throughput in MB/sec... odd, bandwidth is generally in bits and si multipliers ok that would be ~0.5 MiB/s

Either way it's an quarter of the speed of the nand flash. Even if we managed to get class 6 16GB cards (assuming the G1 sd interface supports the speed) that would still be approx 3/4 of the speed of the nand flash.

Hmmm, I wonder if the ext partitions that people are making for their apps are mounted with "-o sync", could be important.