Re: Wheezy release: CDs are not big enough any more...
On Tue, May 15, 2012 at 09:00:29PM -0500, Peter Samuelson wrote:
>> The major win with dd onto a raw device is that you can specify the
>> block size. For most USB sticks, using a block size of 4MB or so is
>> going to be *much* faster than using the default for dd (512 bytes)
>> or cp (10 KB IIRC).
>That seemed a little fishy to me, since none of the above commands do
>any fsync by default, so I just benched it locally.
>Writing a 50 MB businesscard image to a USB flash drive on my system
>(numbers are MB/s):
> dd bs=512 1.77 1.78 1.77
> dd bs=1024 1.79 1.76 1.77
> dd bs=2048 1.77 1.78 1.78
> dd bs=4096 2.54 2.53 2.51
> dd bs=8192 2.48 2.50 2.55
> dd bs=4194304 2.50 2.50 2.54
> cp 2.49 2.47 2.48
>So it appears that if you aren't going to specify a bs= parameter here,
>there's no point in using dd, unless you just happen to think its
>command line syntax is particularly charming. And even if you do
>specify bs=, you'll only barely beat cp.
You're not measuring the time taken to sync to the flash drive either,
so all you're going to be seeing is the speed of writing to
cache. I've done lots of work with USB flash and MMC/SD cards over the
last few years, and the best results are typically achieved using "dd
bs=4M oflag=sync". That way, you'll normally get nicely-aligned date
writes big enough to cover the internal flash page size and remove the
horrendous effects of read-modify-write cycles.
Steve McIntyre, Cambridge, UK. email@example.com
Can't keep my eyes from the circling sky,
Tongue-tied & twisted, Just an earth-bound misfit, I...