Best number of disks for RAIDZ

Status
Not open for further replies.

spitfire

Dabbler
Joined
May 25, 2012
Messages
41
Hi,

I'm going to build a new pool, to replace my current one. Currently I'm using 4x1TB disks in RAIDZ2, planning to have a RAIDZ(1) pool using 3 or 4 2TB disks (I plan to have it zfs-replicated to the other server - so I'm not worried that much about redundancy).
I'm looking for an advice on what would be the best number of disks for RAIDZ - I've read (in cyberjock's "
Slideshow explaining VDev, zpool, ZIL and L2ARC for noobs!
") that I should use:

If you are not using compression:
RAIDZ1 should have the total number of drives equal to 2n + 1. (ie 3, 5, 9, etc. drives for the VDev)

What if I'm going to use compression? I'm planning to set compression=lz4 (which seems sane).
Is there a way to calculate the "right" (or best performing:)) amount of disks for an lz4 compressed RAIDZ pool?
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
If the compression is enabled (and it should be, there is virtually no downside on having it enabled even if you're not sure if it's useful in your particular case (for lz4 at least)) there is no rule on the number of disks ;)
 
Last edited:

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Is there a way to calculate the "right" (or best performing:)) amount of disks for an lz4 compressed RAIDZ pool?

The question is nonsensical. You don't understand all the layers and how everything works. I can ask an equally nonsensical question.

How much snow falls because the snow is white?
 

spitfire

Dabbler
Joined
May 25, 2012
Messages
41
The question is nonsensical. You don't understand all the layers and how everything works. I can ask an equally nonsensical question.

How much snow falls because the snow is white?
@Bidule0hm somehow understood it, and answered.

I've read your guide, and I think I've unerstood all (or most) of it.

One part says:

¨If you are not using compression:
¡For performance reasons it is preferred that you use these conventions when creating RAIDZ1, RAIDZ2 and RAIDZ3 VDevs. (n is any whole number you want….1, 2, 3 etc.)
¡RAIDZ1 should have the total number of drives equal to 2n + 1. (ie 3, 5, 9, etc. drives for the VDev)
¡RAIDZ2 should have the total number of drives equal to 2n + 2. (ie 4, 6, 10, etc drives for the VDev)
¡RAIDZ3 should have the total number of drives equal to 2n + 3. (ie 5, 7, 11, etc drives for the VDev)
¡This is to ensure ZFS stripes fall on the 4k sector boundary of newer generation hard drives.
¡If you do not intend to transfer large quantities of data constantly this thumbrule can be disregarded. For instance, if you intend to use your server to stream DVD rips of your collection, this thumbrule can be ignored.

It covers an example, where the pool does not use compression. If I understand it correctly, it is adviseable to use compression globaly.

I'll rephrase the question:
What is the best number of drives for RAIDZ1 if I do use compression (ie. lz4)?
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,464
...and the answer is what @Bidule0hm said: there is no "best number of drives" for RAIDZn if compression is enabled (as it is by default, and should remain unless there's something very unusual about your particular situation that would require turning it off).
 
Status
Not open for further replies.
Top