Monday, December 28, 2009

realtime monitoring your zfs pool

I use the following command to see real time transaction per 5 sec on my pool extra:
# zpool iostat -v extra 5
               capacity     operations    bandwidth
pool        alloc   free   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
extra       8.87G  28.4G    134      0  9.47M      0
  c7d0      8.87G  28.4G    134      0  9.47M      0
----------  -----  -----  -----  -----  -----  -----
(note: this was during a file copy over 100Mb/s LAN, reaching the max throughput of such a LAN)

To check local disk performance on my zpool I used:
# time (mkfile 2g /extra/foo)
real    2m7.349s
user    0m0.017s
sys     0m1.247s
(this creates a random file foo of 2GB  in my zpool extra and shows the time to complete)