ZFS Improving iSCSI performance for Block Devices (trick for Volumes)

First Published: .

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.

Views: 8,397 views

2 thoughts on “ZFS Improving iSCSI performance for Block Devices (trick for Volumes)

  1. Pietro

    In your opinion this article is relevant even now? This issue still exists on OpenZFS on an Ubuntu 20.04?

    Thanks, Pietro.

    Reply
    1. Carles Mateo Post author

      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

      Reply

Rules for writing a Comment


  1. Comments are moderated
  2. I don't publish Spam
  3. Comments with a fake email are not published
  4. Disrespectful comments are not published, even if they have a valid point
  5. Please try to read all the article before asking, as in many cases questions are already responded

Leave a Reply

Your email address will not be published.

Time limit is exhausted. Please reload CAPTCHA.