Tuesday, May 8, 2012

ZFS raidz - Make Sure To Select the Correct Number of Disks

I've read that selecting the correct number of drives when building a raidz ZFS array is important if you are trying to maximize performance.


Of course the best way to maximize performance is to use a straight stripe or a mirror instead of a raidz, but that isn't always an option when you have price, power, or physical space restrictions.

Since I'm perpetually curious, I set up tests to compare the write speed of a 3, 4, 5, 6, and 7 drive raidz array.

I used my saturate.c program to put the arrays under heavy write load, repeated 6 times, and took avg and std deviation.

My results are not clean enough to post, but they would suggest that the number of drives is important - Follow the rules below;

RAIDZ1 vdevs should have 3, 5, or 9 devices in each vdev
RAIDZ2 vdevs should have 4, 6, or 10 devices in each vdev
RAIDZ3 vdevs should have 5, 7, or 11 devices in each vdev

With some luck, I hope to have the time to revisit the tests and obtain results that are postable.


  1. masoodigital@gmail.comJune 14, 2012 at 2:12 PM


    Great topics .
    I am glad to find you and your posts, particularly ZFS issues .
    I need some help for ZFS in distributed model, please contact with me .

    Thank you .

  2. just linked this article on my Facebook account. it’s a very interesting article for all.

    ASC Coding

  3. Hi there,

    I need to increase the size of my raidz pool to increase capacity. The pool is made of 5 data disks plus one cold spare disk. I am willing to use the spare to increase the pool to 6 data disks because there is no cash to replace all disks to greater density ones... Why 6 disks raidz pool is not recomended? What would be the drawnbacks of doing this so?

    1. It's purely a issue of speed, and how it stripes your data across the drives - Keep in mind that this is an older post, and ZFS keeps moving forward - perhaps a 6 drive RAIDZ1 isn't a issue for speed anymore.

      In your situation, you have little option but to go for 6 disks - Just do it, and not worry unless your speed is terrible... but if you're doing raidz, you're not looking for speed anyway.