SD card flashing time

James Cameron quozl at
Thu Sep 16 02:15:59 EDT 2010

On 9/15/2010 4:51 PM, Martin Langhoff wrote:
> On Wed, Sep 15, 2010 at 10:14 PM, James Cameron<quozl at>  wrote:
>> For interest, I've compared the time it takes to fs-update using
>> OpenFirmware versus a Linux kernel and shell mediated installation
>> method.
> Why not compared to (linux-based) dd?

Because I did not want to write blocks that did not need to be written.
Both dd and fs-update write everything.

What is interesting about the filesystem result is that it takes longer
despite writing far less data; 1.6 GB out of 4 GB.  And there was no
ext3 journal involved during the write.

> That'd be more fair 

I wasn't trying to be fair, I was trying to win.

> and gives the linux kernel an opportunity to show us whether better IO
> scheduling helps, without gains being clobbered by FS.

Test completed, but fs-update still wins.  fs-update takes 00:19:42, and
dd takes 00:20:46 without fdatasync, and 00:20:51 with fdatasync.  At
least these results are close.

Here are the results in more detail, again with a USB HDD booted using
the OLPC kernel, and a 4 GB microSD:

1.  baseline timings

04:48   dd if=q of=/dev/null bs=65536
09:35   dd if=/dev/mmcblk0 of=/dev/null bs=65536

2.  reading from internal microSD

09:46   dd if=/dev/mmcblk0 of=q bs=65536
09:58   dd if=/dev/mmcblk0 of=q bs=65536 conv=fdatasync

3.  writing to internal microSD

19:42   fs-update
20:46   dd if=q of=/dev/mmcblk0 bs=65536
20:51   dd if=q of=/dev/mmcblk0 bs=65536 conv=fdatasync

Experiments were also conducted with iflag=direct, oflag=direct, and
oflag=nonblock.  No useful results.  They all acted to slow it down.

James Cameron

More information about the Devel mailing list