ZFS Improving iSCSI performance for Block Devices (trick for Volumes)
ZFS has a performance problem with the zvol volumes.
Even using a ZIL you will experience low speed when writing to a zvol through the Network.
Even locally, if you format a zvol, for example with ext4, and mount locally, you will see that the speed is several times slower than the native ZFS filesystem.
zvol volumes are nice as they support snapshots and clone (from the snapshot), however too slow.
Using a pool with Spinning Drives and two SSD SLOG devices in mirror, with a 40Gbps Mellanox NIC accessing a zvol via iSCSI, with ext4, from the iSCSI Initiator, you can be copying Data at 70 MB/s, so not even saturating the 1Gbps.
The trick to speed up this consist into instead of using zvols, creating a file in the ZFS File System, and directly share it through iSCSI.
This will give 4 times more speed, so instead of 70MB/s you would get 280MB/s.
In your opinion this article is relevant even now? This issue still exists on OpenZFS on an Ubuntu 20.04?
Thanks, Pietro.
Hi Pietro, yes, this article is still valid and a nice relevant trick to speed up the performance of ZFS in Ubuntu 20.04 LTS.
The way that Volumes are handled is different from the way a ZFS Filesystem is.
Volumes are basically a good idea for working with Blocks.
If you work with files, a ZFS native Dataset is much more faster.
Even when exporting a volume via iSCSI, it is much more faster to share the Block Device based on a file on the ZFS Filesystem, than creating a zvol and sharing it.
I use OpenZFS in Ubuntu 20.04 LTS in several systems.
You may like my book about OpenZFS in Ubuntu 20.04 LTS:
https://leanpub.com/zfs-ubuntu
Cheers