Tuesday, August 21, 2007

DD Performance Testing

The following DD aliases will read/write in 8k block sizes (good for HDS arrays) as well as a 1MB read/write blocksize, good for other arrays such as an x4500.

alias ddr='time /usr/local/bin/dd if=test.out of=/dev/null bs=1024k count=10000'
alias ddr8='time /usr/local/bin/dd if=test.out of=/dev/null bs=8192 count=1220703'
alias ddr9='time /usr/local/bin/dd if=test.out of=/dev/null bs=8192 count=10000'
alias ddw='time /usr/local/bin/dd if=/dev/zero of=test.out bs=1024k count=10000'
alias ddw8='time /usr/local/bin/dd if=/dev/zero of=test.out bs=8192 count=1220703'


The output file is a 10GB file.

Using dd from coreutils will automatically calculate throughput rates. The following example is writing to an x4500 16 x 2-way mirror pool, across 6 controllers.

root@sjcitthump1 # ddw
10485760000 bytes (10 GB) copied, 31.7485 s, 330 MB/s

real 0m31.753s
user 0m0.027s
sys 0m14.090s
root@sjcitthump1 # ddr
10485760000 bytes (10 GB) copied, 14.6932 s, 714 MB/s

Followup:

Please ensure when testing you are using the same version of DD during tests. I received differing results with the SunFreeware coreutils package providing dd (3x faster). Best approach is to use the native dd.

No comments: