top of page
Writer's picturekyle Hailey

Direct I/O for Solaris benchmarking

ZFS doesn’t have direct I/O. Solaris dd doesn’t have a iflag= direct.

Thus for I/O benchmarking it requires mounting and umounting the file system between tests for UFS and for ZFS exporting and re-importing the pools.

But there is a trick. Reading off of /dev/rdsk will by pass the cache.

Here is a simple piece of code that will benchmark the disks. The code was put together by George Wilson and Jeff Bonwick (I beleive)

#!/bin/ksh
disks=`format < /dev/null | grep c.t.d | nawk '{print $2}'`
getspeed1()
{
       ptime dd if=/dev/rdsk/${1}s0 of=/dev/null bs=64k count=1024 2>&1 |
           nawk '$1 == "real" { printf("%.0f\n", 67.108864 / $2) }'
}
getspeed()
{
       for iter in 1 2 3
       do
               getspeed1 $1
       done | sort -n | tail -2 | head -1
}
for disk in $disks
do
       echo $disk `getspeed $disk` MB/sec
done

1 view0 comments

Recent Posts

See All

Comments


bottom of page