The problem with RAIDZ

You can start with this post, to remove some of the confusions.

There are no “abstraction layers”, per se.

A file is data of a specific size, with said bytes in a specific order.

It physically exists on the platters of an HDD (or cells of an SSD), regardless of filesystem. EXT4, XFS, BTRFS, ZFS, doesn’t matter.

However, for ZFS, this data is divided into blocks that follow certain rules, including the recordsize policy.

To read a file, it doesn’t simply grab all the bytes (that comprise the file) into RAM. It grabs all the blocks-on-disk.

Since these blocks-on-disk can exist as compressed and/or encrypted, they’re not necessarily bit-for-bit identical when held in RAM (decompressed and/or decrypted).

The smallest writable (unit) to construct a block-on-disk is the ashift value, which defaults to 4 KiB with TrueNAS. (This also has implications for compression efficiency.)

Whether your HDD is 512e or 4Kn, ZFS is only issuing 4 KiB writes/reads to/from the drives in the pool. So even if you don’t low-level format your HDD to pure 4Kn (i.e, no more “512-byte emulation”), you really won’t face any performance impact.

3 Likes