FreeNAS / xcp-ng iSCSI zvol sizing rules

Hey Everyone

Before I go too far down the rabbit hole I was hoping for some input.

I am looking to create an iSCSI connection from FreeNAS to xcp-ng and have created an SSD Pool with 892.93 GiB. The SSD Pool wil only be used for xcp-ng iSCSI.

The FreeNAS Documenation States:

For performance reasons and to avoid excessive fragmentation, keep the used space of the pool below 80% when using iSCSI.

I believe I may be getting mixed up with some terminology e.g. is pool space used “used” when it is assigned a zvol or is it only “used” once the zvol has data on it. Of the following options I would be grateful if someone could point me in the direction of the correct implementation:

  1. Size the zvol to 100% (892.93 GiB) of the SSD Pool Size and ensure the zvol used space does not exceed 80% (714.344GiB).

  2. Size the zvol to 80% (714.344GiB) of the pool size so the zvol cannot exceed 80% off the pool size.

My main concern is with the thick provisioning of VM’s and how many I can squeeze on to the pool as xcp-ng will obviously be seeing them as taking up the full allocated lun space.

Thanks in Advance

P.s. Tom keep up the good work and thank you for the excellent videos…

Cheers

Think of it in the same way you would think of monitoring a volume for disk space, this is exactly the same. You don’t want to go over 80% of pool size. The 80% rule is after about 80% of disk usage ZFS will switch more to a space saving mode than performance mode.

Not wise to fill up the space on the iscsi either as that will cause issues with the o/s being served to as well.

Size the zvol to 80% of the pool size and you should be fine. ZFS needs the space to keep things from being fragmented.

1 Like