[nycbug-talk] Measuring Disk Performance

Pete Wright pete at nomadlogic.org
Fri Dec 16 21:14:11 EST 2011


On Thu, Dec 15, 2011 at 12:54:12AM -0500, Henry M wrote:
> Whenever I've bench-marked disks, I've always just used dd and /dev/zero
> 
>  Example: I want to see how fast I can write a 1GB file
> 
> $ dd if=/dev/zero of=1GB bs=1024 count=1048576
> 1048576+0 records in
> 1048576+0 records out
> 1073741824 bytes (1.1 GB) copied, 8.72947 s, 123 MB/s
> 
> As long as the system load is consistent, you should get consistent
> results. You can have fun by running multiple versions at once, to simulate
> heavier "real-world" load.
> 
> You can change the byte size, or count accordingly. Just be careful what
> values you give dd, you can easily fill up your disk, or break something
> nasty with a typo (Yes I've done both )
> 

not to rehash what everyone else mentioned regarding "dd", another but
interesting tool worth checking out in "lmbench".  lmdd supports
direct-io as well as altering fsync() behaviour, which can be helpful 
for testing hardware:

This is lmbench-3.0-a9, a (sometimes controversial) system performance
measurement tool.  lmbench is a suite of simple, portable, ANSI/C
microbenchmarks for UNIX/POSIX. In general, it measures two key
features:
latency and bandwidth. lmbench is intended to give system developers
insight
into basic costs of key operations. You can go to /usr/local/lib/lmbench
and
do one of the following:

make results (to run the benchmarks)
make rerun   (to rerun the benchmarks)
make see     (to see how you did)

-pete

-- 
Pete Wright
pete at nomadlogic.org




More information about the talk mailing list