
On Tue, 3 Sep 2013, David <bouncingcats@gmail.com> wrote:
That completes test #1. Next run a second test, with a bigger blocksize. In my experience larger than 4k gives no benefit so I use bs=4k. Again, for useful data you will need to change of=/dev/null to your actual disk, but you can do a practice run with of=/dev/null so long as you don't forget that the number you get is meaningless.
I've just done a test on a system with a 500G SATA disk where sda2 is near the start of the disk (sda1 is /boot). In this case cat (which uses a buffer size of 64K) was slightly faster than dd with a 1MB block size. For a casual user the amount of time spent typing and verifying the dd command line would probably be significant when compared to the <30s data transfer so cat would be a better option. # time dd if=/dev/zero of=/dev/sda2 bs=1024k dd: error writing ‘/dev/sda2’: No space left on device 2049+0 records in 2048+0 records out 2147483648 bytes (2.1 GB) copied, 29.4816 s, 72.8 MB/s real 0m29.483s user 0m0.000s sys 0m1.824s # time cat /dev/zero > /dev/sda2 cat: write error: No space left on device real 0m26.553s user 0m0.016s sys 0m1.448s -- My Main Blog http://etbe.coker.com.au/ My Documents Blog http://doc.coker.com.au/