Elapsed time to copy 1MB from memory to SD card

Hello.

I'm doing some benchmarking on a BeagleBoard xM, and have observed
that it takes about 5 minutes to copy a 1MB file from /media/ram (a
tmpfs filesystem in memory) to an ext3 filesystem on the SD card.

root@beagleboard:~# time cp /media/ram/file.1m /media/mmcblk0p3/
real 5m 56.83s
user 0m 0.00s
sys 0m 0.06s

Is this about what one would expect? Naturally, I was hoping for
something much less than 5 min/MB, but I could be horribly misguided.

Thanks.

A card supplied with the Beagleboard-xM is extremely slow. Throw it away and buy SDHC 6 class. Then you can continue your benchmarking :slight_smile:

2010/12/17 ae6rt <mspetrovic@gmail.com>

That's expected if you mount it with sync, try remounting it with async,relatime

no

it sounds like a 1GB file.

mine ran out of space but gets similar timing for 1GB:

time (dd if=/dev/zero of=/tmp/foo bs=10240 count=102400; sync)
dd: writing `/tmp/foo': No space left on device
86862+0 records in
86861+0 records out
889462784 bytes (889 MB) copied, 202.058 s, 4.4 MB/s

real 3m58.788s
user 0m0.102s
sys 0m6.992s

you have to run sync to flush output to disk and get accurate timings

Mounting with async makes a huge difference.

Copying the same file over ssh to the ext3 filesystem registers 00:00
in scp's stdout output. Wow.

btw, what am I giving up if I mount with async, assuming I sync before
I power down the board?