From 0b5318ecdbefedf442837491a861b7f09a88dace Mon Sep 17 00:00:00 2001 From: Nick Woolmer <29717167+nwoolmer@users.noreply.github.com> Date: Thu, 11 Jul 2024 15:56:47 +0100 Subject: [PATCH] Add note on compression choices for ZFS (#13) * Add note on compression choices for ZFS * Apply suggestions from code review Thanks Andrei! Co-authored-by: Andrei Pechkurov <37772591+puzpuzpuz@users.noreply.github.com> * Update guides/compression-zfs.md --------- Co-authored-by: Andrei Pechkurov <37772591+puzpuzpuz@users.noreply.github.com> Co-authored-by: goodroot <9484709+goodroot@users.noreply.github.com> --- guides/compression-zfs.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/guides/compression-zfs.md b/guides/compression-zfs.md index 3af0b80a..5633ae82 100644 --- a/guides/compression-zfs.md +++ b/guides/compression-zfs.md @@ -26,3 +26,19 @@ The exact commands depend on which version of ZFS you are running. Use the to customize your ZFS to meet your requirements. Once created, ZFS provides system-level compression. + +## Compression choices, LZ4 and zstd + +ZFS offers a number of compression choices when constructing the volume. + +[LZ4](https://github.com/lz4/lz4) offers a good balance of compression ratio versus increased CPU usage, and slowed performance. For general usage, we recommend using LZ4. + +[zstd](https://github.com/facebook/zstd) is another strong option. This will provide higher compression ratios, but take longer to decompress. We recommend this when storage size is an absolute priority, or for embedded-style deployments (i.e. Raspberry Pi, home IoT setups). + +As always, it is best to benchmark your choice to ensure that the performance matches your use case. + +:::note + +We regularly run tests using *ZFS* with *LZ4* compression. If you encounter issues with other compression algorithms, please let us know. + +:::