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)

disks=`format < /dev/null | grep c.t.d | nawk '{print $2}'`
       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) }'
       for iter in 1 2 3
               getspeed1 $1
       done | sort -n | tail -2 | head -1
for disk in $disks
       echo $disk `getspeed $disk` MB/sec

1 view0 comments

Recent Posts

See All


bottom of page