RAID6 /RAID-Z2 disk number question

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

TLN

Active Member
Feb 26, 2016
523
84
28
34
Hi all.

I got a discussion recently and was told that Raid 6/Z2 works better with 4+2/8+2 number of disks. And if I use for example 8 disks total (6+2) I will get less usable space (in %) and worse performance. Which is surprising, but I can see a possible reasons to that.

1. Any difference in how hardware RAID6 and RAID Z2 works?
2. Do I get a penalty with either of those?
3. I'm about to test this with homelab. Since I don't have 8 spare drives, I wanna create 6-10 VMDKs, limit IOPS for each one and give it a try. Do you think it's a valid test?
If not limiting IOPS, I expect single drive performance and total performance will be about the same, since all VMDKs will be on the same Physical drive.

Thanks.
Vic
 

i386

Well-Known Member
Mar 18, 2016
4,221
1,540
113
34
Germany
1.) Not really, the math behind the parity calculation is the same. For the calculation the hw raid uses a processor (mips cores) on the add on card while zfs uses the main cpu(s).
2.) "No": without any caching hw raid and zfs is slower than a single drive (parity calculation and writing to the drives).
That's why hardware raid controllers have ram as level 1 cache on the add on card and technologies like cachecade or maxcache as level 2 cache, zfs uses ram for that.
3.) No, I don't think that's a valid test. Esxi write and read data in bigger chunks than actual raid6/z2 arrays would do.
 

TLN

Active Member
Feb 26, 2016
523
84
28
34
2. That was my thoughts. According to RAID Performace Calculator - WintelGuy.com performance of RAID array increases with the number of drives(as you have to write less data per drive). Pretty much, hardware RAID gives no performance advantage, if compared to fast CPU.
3. Ok, but do we really care about size of data written? I pretty much want to confirm the math from the link above by using VMDK's. Will be placed on avery fast drive, but slowed down with IOPS limitations per VMDK.
 

gea

Well-Known Member
Dec 31, 2010
3,141
1,184
113
DE
1. Any difference in how hardware RAID6 and RAID Z2 works?
If you compare only the Raid functionality of Z2 vs Raid6 they do similar things. The difference comes with the filesystem behind with pro and cons.

ZFS adds security features like CopyOnWrite that avoids the write hole problem of conventional raid ("Write hole" phenomenon in RAID5, RAID6, RAID1, and other arrays. ). This gives also the advanced snapshot feature. It also adds checksums to verify all data and to repair them on demand or access (self healing filesystem) resulting in a superiour data security, availability and protection against malware like ransomware.

The disadvantage of ZFS Z2 vs Raid6 is that you must read/write more date due the additional checksums and that you get a higher fragmentation on a filled pool due CopyOnWrite. ZFS (over) compensates this with its advanced rambased read and write caches - if you have enough Ram in your system.

About the golden number of disks of a Raid-Z2 (4, 6, 10 = 2^n + 2). This is because you must stripe datablocks like 128k, 64k, 32k etc onto the disks. With other numbers you get a rest, garbage= a lower capacity but no speed degration. The effect is lower with higher stripe sizes than the default 128k like 256k, 512k or 1M.
 
Last edited:

TLN

Active Member
Feb 26, 2016
523
84
28
34
Gea, interesting stuff, Thanks!

About the golden number of disks of a Raid-Z2 (4, 6, 10 = 2^n + 2). This is because you must stripe datablocks like 128k, 64k, 32k etc onto the disks. With other numbers you get a rest, garbage= a lower capacity but no speed degration. The effect is lower with higher stripe sizes than the default 128k like 256k, 512k or 1M.
Does this rule applies to RAID6 too?

Glad that in my planned build I have 6 drives, which goes great with RAID Z2, although I haven't decided yet.