Wednesday, November 17, 2010

Timing disk read/write performance with dd

There is easy way to measure your partition performance with dd. Here is how to measure write performance by simply coping a file of length 1 Gb:
deby:~# time dd if=/dev/zero of=file bs=1024 count=1000000
1000000+0 records in
1000000+0 records out
1024000000 bytes (1.0 GB) copied, 13.454 s, 76.1 MB/s

real 0m13.696s
user 0m0.240s
sys 0m5.924s
Same way we can read that file back into a memory (/dev/shm):
deby:~# time dd if=file of=/dev/shm/file
2000000+0 records in
2000000+0 records out
1024000000 bytes (1.0 GB) copied, 4.19182 s, 244 MB/s

real 0m4.334s
user 0m0.592s
sys 0m3.740s
Read more about dd command here.

No comments :

Post a Comment