PDA

View Full Version : N800 SD speed test


freeman
2007-02-05, 10:28
Just out of the curiosity, after I compiled my own kernel I decided to run speed test on it. For the reference, here is what I used.
/dev/mmcblk0 = Internal slot = A-DATA 8GB SDHC card
/dev/mmcblk1 = External slot = Nokia miniSD 128MB card (the one that came with the N800)
Just in case anyone interested, here are the results:


Nokia-N800-51:/opt# time dd if=/dev/mtdblock4 of=/dev/null bs=8192 count=10240
10240+0 records in
10240+0 records out
real 0m 5.17s
user 0m 0.06s
sys 0m 2.05s

Nokia-N800-51:/opt# time dd if=/dev/mmcblk0 of=/dev/null bs=8192 count=10240
10240+0 records in
10240+0 records out
real 0m 11.12s
user 0m 0.02s
sys 0m 0.71s

Nokia-N800-51:/opt# time dd if=/dev/mmcblk1 of=/dev/null bs=8192 count=10240
10240+0 records in
10240+0 records out
real 0m 22.17s
user 0m 0.01s
sys 0m 0.61s

1st test = raw flash data
2nd test = internal raw sd data (sdhc)
3rd test = external raw sd data (minisd)

Basically this is the reading speed and it seem like flash is about 2x faster than the SDHC card. Appearanly even w/ twice the read speed, the jffs2 compression overhead is more than the bandwidth difference, and that's why SD card boot faster.


Nokia-N800-51:/opt# time dd if=/dev/zero of=zero-file bs=1024 count=10240
10240+0 records in
10240+0 records out
real 0m 8.41s
user 0m 0.00s
sys 0m 2.25s

Nokia-N800-51:/opt# time dd if=/dev/zero of=zero-file bs=1024 count=10240
10240+0 records in
10240+0 records out
real 0m 0.31s
user 0m 0.03s
sys 0m 0.26s

Nokia-N800-51:/media/mmc2# time dd if=/dev/zero of=zero-file bs=1024 count=10240
10240+0 records in
10240+0 records out
real 0m 0.50s
user 0m 0.03s
sys 0m 0.25s
real 0m 3.32s
user 0m 0.00s
sys 0m 0.03s

Nokia-N800-51:/media/mmc1# time dd if=/dev/zero of=zero-file bs=1024 count=10240
10240+0 records in
10240+0 records out
real 0m 0.45s
user 0m 0.02s
sys 0m 0.39s
real 0m 5.12s
user 0m 0.00s
sys 0m 0.02s

1st test = jffs flash
2nd test = ext2 internal SDHC
3rd test = vfat internal SDHC
4th test = vfat external miniSD

second set of tests are written test. For obvious reason, the SDHC card written faster than mini SD, but appearently ext2 written faster than fat32 also. And jffs2 is the worst among all even if it's on the flash.

fanoush
2007-02-05, 11:30
what is interesting is the relatively poor read speed of SD cards. ~7MB/s is a bit low. SD cards use 25Mhz and 4 bit data bus, since omap mmc base clock is 48Mhz, SD cards in N800 should run at 24Mhz which should give you in theory 12MB/s (24x4bit/8bit per byte). 5MB/s difference is too much for mmc and block layer overhead. I wonder whether there is some other bottleneck in n800. That would be bad since 50Mhz high speed SD mode (using 48Mhz clock) would not give us expected 2x speedup. I hope I'll get the device soon to play with kernel myself.

Puck
2007-02-05, 12:54
Hi, I've just bought a N800 and am going to invest in a couple of memory cards. I'm learning some Linux and have been keenly following the Internet Tablets since the 770 came out. Does this data indicate that read speeds (for instance in stored videos) of normal SD cards are the same or slower for the N800 as for SDHC cards, ie should I go ahead now and buy a couple of 4GB SD cards now or buy SDHC cards and either wait for the new Kernel or install the hacked version?

Thanks a lot. I'm really excited about getting to grips with the device and find the forum a great source of info :) :) :)

Milhouse
2007-02-05, 14:41
I'm getting roughly similar read figures for a 4GB SanDisk SDHC in the external slot with vfat:


/home/user # time dd if=/dev/mmcblk1 of=/dev/null bs=8192 count=10240
10240+0 records in
10240+0 records out
real 0m 10.41s
user 0m 0.03s
sys 0m 1.10s


My 128Mb Nokia SD card with vfat (miniSD) has double the read speed of the previous posters equivalent card, which is odd - the only difference is the slot it is in (mine is internal):

/home/user # time dd if=/dev/mmcblk0 of=/dev/null bs=8192 count=10240
10240+0 records in
10240+0 records out
real 0m 10.50s
user 0m 0.01s
sys 0m 1.28s

penguinbait
2007-02-05, 16:40
You have way better times than me, although I am running (booting) from my 2GB Kingston. The thing that confuses me is, the 128MB, Is there a shared bandwidth between the two slots? Milhouse your not running custom kernel right? I will try from flash and see what the times are..


Kingston 2GB MMCMOBILE
Nokia-N800-51:~# time dd if=/dev/mmcblk0 of=/dev/null bs=8192 count=10240
10240+0 records in
10240+0 records out
real 0m 36.03s
user 0m 0.02s
sys 0m 0.75s

1GB SANDISK RSMMC (OLD)
Nokia-N800-51:~# time dd if=/dev/mmcblk1 of=/dev/null bs=8192 count=10240
10240+0 records in
10240+0 records out
real 0m 36.21s
user 0m 0.00s
sys 0m 0.60s

128MD came with it
Nokia-N800-51:~# time dd if=/dev/mmcblk1 of=/dev/null bs=8192 count=10240
10240+0 records in
10240+0 records out
real 0m 24.97s
user 0m 0.02s
sys 0m 0.86s

Milhouse
2007-02-05, 17:19
I'm running the SDHC Kernel posted by Unhinged (post #73 I think) in the "4GB+ work/not working" thread. I booted off jffs2 flash, and tested over SSH.

Milhouse
2007-02-05, 17:29
I've just run the read test against a second N800 with stock Nokia 51-6 kernel and the SD card (1GB SD) in this device has returned a time of 11.23s (external slot) while a 1GB RS-MMC card turns in 37.22s (internal slot).

So it would seem all my SD cards - whether SD or SDHC, custom or stock kernel - turn in read times between 10.41 - 11.23 seconds, not fantastic and hopefully we can do better. RS-MMC is obviously much much worse - I'm using it for swap but not for much longer! :)

freeman
2007-02-05, 18:54
I'm running the SDHC Kernel posted by Unhinged (post #73 I think) in the "4GB+ work/not working" thread. I booted off jffs2 flash, and tested over SSH.
Of course you are, there is no other way to get SDHC on non-patch kernel right now.
I too use SHDC patched kernel, but mine is difference from your in the fact that I custom built my own kernel w/ the help of Unhinged. I asked him to e-mail me the patched files needed to compile my own kernel. So mine is 1.7MB kernel instead of 1.3MB, but it has the SDHC patch+ ext2+ext3+ntfs+smbfs+cifs+nfs+tis620

freeman
2007-02-05, 18:55
I've just run the read test against a second N800 with stock Nokia 51-6 kernel and the SD card (1GB SD) in this device has returned a time of 11.23s (external slot) while a 1GB RS-MMC card turns in 37.22s (internal slot).

So it would seem all my SD cards - whether SD or SDHC, custom or stock kernel - turn in read times between 10.41 - 11.23 seconds, not fantastic and hopefully we can do better. RS-MMC is obviously much much worse - I'm using it for swap but not for much longer! :)

LOL, you are using the slowest card to store you swap. That make too much sense.

fanoush
2007-02-05, 19:03
slow mmc speed is expected. Nokia kernel has support only for legacy 1 bit MMC rated at 20MHz which runs at 48/3=16MHz (finally, N770 had such cards running at 12Mhz). It is easy to add mmcplus modes to n800 kernel and also enable 4 bit mode, which would make kingston 2gb mmcmobile run at same speed as high speed SD cards (i.e. 4 bit mode at 48MHz).

toby
2007-02-15, 15:36
hi All,

I'd add my benchmarks here with some new SD cards, but I can't seem to hack the commands you're using sufficiently to get a benchmark that works - can someone break the command down a little bit so a new guy like me can understand it?

Specifically what to use for the if=/blah and of=/blah - I assume these are source and destination files, right?

BTW, I'm using the stock kernel and have gainroot already available

Ta!

TA-t3
2007-02-15, 17:43
>dd --help
Usage: dd [OPERAND]...
or: dd OPTION
Copy a file, converting and formatting according to the operands.

bs=BYTES force ibs=BYTES and obs=BYTES
cbs=BYTES convert BYTES bytes at a time
conv=CONVS convert the file as per the comma separated symbol list
count=BLOCKS copy only BLOCKS input blocks
ibs=BYTES read BYTES bytes at a time
if=FILE read from FILE instead of stdin
iflag=FLAGS read as per the comma separated symbol list
obs=BYTES write BYTES bytes at a time
of=FILE write to FILE instead of stdout
oflag=FLAGS write as per the comma separated symbol list
seek=BLOCKS skip BLOCKS obs-sized blocks at start of output
skip=BLOCKS skip BLOCKS ibs-sized blocks at start of input
status=noxfer suppress transfer statistics

BLOCKS and BYTES may be followed by the following multiplicative suffixes:
xM M, c 1, w 2, b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,
GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.
...

I guess the 'dd' version on the N800 is a busybox version, if so it'll have slightly fewer options than the above (which is from the desktop version). But the basics are there for sure.
Other than that:
/dev/zero is a device-file which is an unlimited source of binary zeroes, i.e. it will pump out bytes (all with the binary value 0) as long as you read from it.
/dev/null is a device-file that will swallow everything you write to it.
You can also read from it, if so it will give you exactly 0 bytes of data.

dd if=/dev/zero bs=1024 count=100 of=/media/mmc1/file
will write 100 kilobytes (KiB) to the file /media/mmc1/file, and the file will contain only binary zero values.
dd if=/dev/zero bs=1024 count=100 of=/dev/null
will write the same data to a bottomless pit (/dev/null) and you'll not see any data stored anywhere. But it will test how fast you can transport data through an application if it's not read from any medium and not written to any medium: You're not measuring flash speed.
dd if=/dev/null of=/media/mmc1/file
will give you a file /media/mmc1/file of length 0.
(Note that with this data source there's no need to limit (with count=) how much to read, as it stops after 0 bytes read.)

dd if=/dev/zero bs=1024 count=100 of=/media/mmc1/file
will measure (if you time it) the write speed to that file, no actual reading involved.

Edit: For those 'dd' versions that don't calculate the speed itself you can always use the 'time' command in front (time dd if=...)
or simply 'date; dd if=..; date', and do the calculations yourself, with the N800 calc app..