In my home PC, one of my two HDD that I have in (btrfs) RAID 0 failed. So, I am shopping for the replacement. I am planning to install FreeBSD (zfs) and set up RAIDZ (buying 3 SSDs).
Now, I am reading everywhere that mirroring 2 disks(1 vdev per disk) is faster than RAIDz1 with 3 disks. And it doesn't make any sense to me.
Yes, RAIDz1 has to compute the parity info for the third disk. Although being realistic, 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.
But the much more impactful consideration is, when writing on disks, RAIDz1 splits the load between two disks, Mirroring does not. In other words, if I write on disk a 1 MiB file, RAIDz1 should write 512 KiB on one disk and the other 512 KiB on the other disk. And this should be done in (or close to) parallel. Which should translate in (or close to) half the time it takes to write the whole 1 MiB in one disk. I mean, this is the whole schtick of RAID 0. Isn't RAID 5 (RAIDz1) equal to RAID 0 plus a third disk for parity?
I can see, when READING from disk, that 2 mirror disks have equal performance than RAIDz1. Because, one could read one half from each disk in parallel (like RAIDz1). It is not efficient to read the whole thing from just one of the disks. But when WRITING, you have to write the whole thing on each of the mirror disks, the whole 1 MiB of the previous example in each disk. When the mirror disks are writing .. 640 KiB .. 768 KiB .. The RAIDz1 should be more than done writing 512 KiB.
Your help will be appreciated, it will influence what I end up buying. Thanks in advance.
Edit: It is not 1 vdev per disk. It is 1 vdev with the 2 disks in it, otherwise nothing is being mirrored.
Now, I am reading everywhere that mirroring 2 disks
Yes, RAIDz1 has to compute the parity info for the third disk. Although being realistic, 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.
But the much more impactful consideration is, when writing on disks, RAIDz1 splits the load between two disks, Mirroring does not. In other words, if I write on disk a 1 MiB file, RAIDz1 should write 512 KiB on one disk and the other 512 KiB on the other disk. And this should be done in (or close to) parallel. Which should translate in (or close to) half the time it takes to write the whole 1 MiB in one disk. I mean, this is the whole schtick of RAID 0. Isn't RAID 5 (RAIDz1) equal to RAID 0 plus a third disk for parity?
I can see, when READING from disk, that 2 mirror disks have equal performance than RAIDz1. Because, one could read one half from each disk in parallel (like RAIDz1). It is not efficient to read the whole thing from just one of the disks. But when WRITING, you have to write the whole thing on each of the mirror disks, the whole 1 MiB of the previous example in each disk. When the mirror disks are writing .. 640 KiB .. 768 KiB .. The RAIDz1 should be more than done writing 512 KiB.
Your help will be appreciated, it will influence what I end up buying. Thanks in advance.
Edit: It is not 1 vdev per disk. It is 1 vdev with the 2 disks in it, otherwise nothing is being mirrored.
Last edited: