Performance: RAIDz1 vs mirroring

JMOR

Cadet
Joined
Dec 15, 2020
Messages
2
For a personal computer (Unix) I have to decide between mirroring 2 SSDs or RAIDz1 3 SSDs.

After some reading, I found places that say mirroring is faster than RAIDz1. This doesn't make any sense to me.

Yes, RAIDz1 has to compute the parity info for the third disk. But, CPU times (for computing parity) are orders of magnitude faster than I/O times (for accessing disks). So, that advantage should be close to negligible.

A more impactful consideration is, when writing on disks, RAIDz1 splits the load between two disks, Mirroring does not. One half in one disk, the other half in the other. And this should be done in (or close to) parallel. Which should translate in (or close to) half the time.
This is the whole schtick of RAID 0. Isn't RAID 5 (RAIDz1) equal to RAID 0 plus a third disk for parity?

When READING from disk, mirroring can read in parallel from both disks and have more or less the same performance than RAIDz1.
But WRITING, you have to write the whole thing on each of the mirror disks. I fail to see how that is faster than RAIDz1.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
A more impactful consideration is, when writing on disks, RAIDz1 splits the load between two disks, Mirroring does not. One half in one disk, the other half in the other. And this should be done in (or close to) parallel. Which should translate in (or close to) half the time.
This is the whole schtick of RAID 0. Isn't RAID 5 (RAIDz1) equal to RAID 0 plus a third disk for parity
You must understad that most discussions around this topic are in relation to many more disks. At the small scale you are talking about, and for a desktop with an interactive user, RAIDz1 is likely the preferable option. As the number of disks scale up, the reasons change. For a storage server I would never recommend RAIDz1, not even with SSD.
When READING from disk, mirroring can read in parallel from both disks and have more or less the same performance than RAIDz1.
But WRITING, you have to write the whole thing on each of the mirror disks. I fail to see how that is faster than RAIDz1
In ZFS, each vdev (talking large implementations) has aproximately the performance of a single component disk of the vdev. I have a system at work with ten vdevs, each vdev consisting of six mechanical disks. The performance of that server would be greately enhanced if I configured it with mirror vdevs because I would then have thirty vdevs instead of only ten. Each additional vdev provides additional IOPS. When discussing only one vdev, you are missig the point.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
This documentation might be useful to the discussion:

 

ChrisRJ

Wizard
Joined
Oct 23, 2020
Messages
1,903
At the end of the day one can approach such topics in two ways: On the principle level or with the specific use-case/scenario in mind. @Chris Moore has addressed the former already. So perhaps you can give more information about your specific requirements.
 

JMOR

Cadet
Joined
Dec 15, 2020
Messages
2
@ChrisRJ thanks for the help. I rather don't bog you down with details, because I don't want to take too much of your time guys. I understand TrueNAS means serious business, i.e. large data storage needs, enterprise level application. Mine is a personal computer with 2 or 3 disks, there is not much more else to it.

And to be honest, I think @Chris Moore gave me very good information for me to chew on, and answered my question. Couldn't ask for more from the forum. Thank you guys.
 

no_connection

Patron
Joined
Dec 15, 2013
Messages
480
"It's not that simple" Would be a good way to start.
I was looking for a good article about mirror vs other options that I read a while back that IIRC concluded that mirrors are always faster for any given/resulting space. Meaning that if you need 10TB and use 1TB drives mirrors will always outperform the other options but will ofc need 20 drives. Things will change a bit if you can't use 20 drives and still need 10TB. And a Z1 would use 11 drives and be slower due to that.

I did however find this and just started reading, seems well written so far: https://arstechnica.com/information...01-understanding-zfs-storage-and-performance/
 
Top