Search This Blog

2013-04-30

Disk Performance with dd

Write Performance

UPDATE 2015-12-31

There is also a method of testing disk performance which ensures each write is committed to disk prior to issuing the next write
dd bs=1M count=256 if=/dev/zero of=test oflag=dsync

dd if=/dev/zero of=/filesystem.dd bs=1M count=10000 conv=fdatasync,notrunc
conv=fdatasync

This tells dd to require a complete “sync” once, right before it exits. So it commits the whole of the data, then tells the operating system: “OK, now ensure this is completely on disk”, only then measures the total time it took to do all that and calculates the benchmark result.
http://romanrm.ru/en/dd-benchmark

Read Performance

Clear caches:
echo 3 > /proc/sys/vm/drop_caches

Writing to this will cause the kernel to drop clean caches, dentries and inodes from memory, causing that memory to become free.

To free pagecache:
echo 1 > /proc/sys/vm/drop_caches

To free dentries and inodes:
echo 2 > /proc/sys/vm/drop_caches

To free pagecache, dentries and inodes:
echo 3 > /proc/sys/vm/drop_caches

As this is a non-destructive operation, and dirty objects are not freeable, the user should run "sync" first in order to make sure all cached objects are freed.

http://www.linuxinsight.com/proc_sys_vm_drop_caches.html
https://wiki.archlinux.org/index.php/SSD_Benchmarking

Then run your read tests:

dd if=/filesystem.dd of=/dev/null bs=1M count=10000

References:
https://romanrm.net/dd-benchmark

No comments:

Post a Comment