13

DD command using block device as input

view full story
linux-howto

http://www.unix.com – Hi, I am trying to measure the speed of reading a given block size using the dd command. However depending on which input I use: a regular file (on the same device) or /dev/sdb1, I get some really different results. Code: $sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'; dd if=pirate of=/dev/null bs=512 count=1 1+0 records in 1+0 records out 512 bytes (512 B) copied, 0.0190755 s, 26.8 kB/s $sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'; sudo dd if=/dev/sdb1 of=/dev/null bs=512 count=1 1+0 records in 1+0 records out 512 bytes (512 B) copied, 1.9649e-05 s, 26.1 MB/s No (HowTos)