ZFS ZFS FAQ

… (like this ZFS tuning), but it is a complicated process for an average user. …

There's direction from the old wiki page to a superior resource:

Workload Tuning — OpenZFS documentation

Related: Compression for performance · Issue #232 · openzfs/openzfs-docs



L2ARC-specific

 
It remains unclear to me when zstd is preferred above lz4 .

Whenever you might have picked gzip over lz4. (Whenever compression rate is more important than throughput.) I don’t think there are any use cases (other than backwards compatibility) where you would pick gzip today.

If you’re looking for minimal impact (CPU-performance-wise) you still want lz4.

I’m sure you could cook up corner cases (data that compresses significantly better with zstd than lz4, with slow media where that gain provides an overall performance boost) — but I have yet to run into a case where zstd is more (throughput) performant.
 
… One of the main advantages of Zstd is that the decompression speed is independent of the compression level. For data that is written once but read many times, Zstd allows the use of the highest compression levels without a performance penalty. …

Zstandard Compression in OpenZFS (Allan Jude, 2021-07-22)

<https://issue.freebsdfoundation.org/publication/?m=33057&i=706299&p=25&ver=html5> | <https://freebsdfoundation.org/wp-content/uploads/2021/05/Zstandard-Compression.pdf>
 
Back
Top