Hi folks. This technically applies to everybody, but Proxmox creates the perfect storm where it keeps biting their users in the ass, so I’m going to talk about it in here:
I keep seeing Proxmox users wondering why they don’t see the storage efficiency they expect out of RAIDz2 pools. You’re never going to get the storage efficiency you’re expecting from striped-parity topologies if you run Proxmox with default settings! Here’s why:
- Proxmox uses ZVOLs
- Proxmox defaults to VERY small volblocksize (8K until the most recent version, 16K now)
- When storing a block on a RAIDz vdev, OpenZFS divvies it up into equally sized pieces. On a zvol, those blocks are always
volblocksize
in size–which, remember, was 8K until the most recent version of Proxmox, and is 16K now. - The majority of drives these days use 4KiB sectors, and you can’t have an individual piece of a block smaller than one sector
With me so far? Okay, so what happens when you ask Proxmox to store an 8K block on a six-wide RAIDz2 vdev? Well, it splits that 8KiB block into two 4KiB sectors, which it stores on drives 0 and 1… and then it creates two sectors of parity for that stripe, which it puts on disks 2 and 3, adding up to four sectors needed to store two sectors of data. Disks 4 and 5 aren’t written to at all for this block!
In other words: 50% storage efficiency, literally the same you’d expect from a pool of mirrors but with much lower performance.
With a volblocksize of 16KiB, you can achieve the 67% storage efficiency you’d expect out of a six-wide Z2, because one 16KiB block divvies up into four 4KiB sectors and two 4KiB parity sectors, therefore 4/6 == 2/3 == the 67% you were expecting… but it still won’t get you the 80% you’d expect out of a 10-wide Z2.
Keep in mind, you also see performance problems with these poorly-chosen topologies, too. A six-wide Z2 writing 8KiB blocks to a zvol is doing the same essential workload as a simple pool of mirrors would, but it does it much less optimally, resulting in far lower performance. (It does still enjoy dual parity, but you’d be better off just using 4-wide Z2 if you wanted the dual parity and are willing to tolerate 50% SE.)
And this is without going into the performance advantages the pool of mirrors has over a properly configured and optimally-used RAIDz pool with the same number of drives! If you’re setting up for VMs, I strongly recommend using mirrors instead of RAIDz–even if you’re using SSDs, but especially on rust. You just don’t have the IOPS to spare.