Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F138849163
D27715.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D27715.diff
View Options
diff --git a/en_US.ISO8859-1/books/handbook/zfs/chapter.xml b/en_US.ISO8859-1/books/handbook/zfs/chapter.xml
--- a/en_US.ISO8859-1/books/handbook/zfs/chapter.xml
+++ b/en_US.ISO8859-1/books/handbook/zfs/chapter.xml
@@ -2926,6 +2926,72 @@
However since quotas do not consider compression, more data
may be written than would fit with uncompressed
backups.</para>
+
+ <sect3 xml:id="zfs-zfs-compression-zstd">
+ <title>Zstandard Compression</title>
+
+ <para>In <acronym>OpenZFS</acronym> 2.0, a new compression
+ algorithm was added. Zstandard (<acronym>Zstd</acronym>)
+ offers higher compression ratios than the default
+ <acronym>LZ4</acronym> while offering much greater speeds
+ than the alternative, <acronym>gzip</acronym>.
+ <acronym>OpenZFS</acronym> 2.0 is available starting with
+ &os; 12.1-RELEASE via
+ <package>sysutils/openzfs</package> and has been the
+ default in &os; 13-CURRENT since September 2020, and
+ will by in &os; 13.0-RELEASE.</para>
+
+ <para><acronym>Zstd</acronym> provides a large selection of
+ compression levels, providing fine-grained control over
+ performance versus compression ratio. One of the main
+ advantages of <acronym>Zstd</acronym> is that the
+ decompression speed is independent of the compression
+ level. For data that is written once but read many times,
+ <acronym>Zstd</acronym> allows the use of the highest
+ compression levels without a read performance
+ penalty.</para>
+
+ <para>Even when data is updated frequently, there are often
+ performance gains that come from enabling compression. One
+ of the biggest advantages comes from the compressed ARC
+ feature. <acronym>ZFS</acronym>'s Adaptive Replacement
+ Cache (<acronym>ARC</acronym>) caches the compressed version
+ of the data in <acronym>RAM</acronym>, decompressing it each
+ time it is needed. This allows the same amount of
+ <acronym>RAM</acronym> to store more data and metadata,
+ increasing the cache hit ratio.</para>
+
+ <para><acronym>ZFS</acronym> offers 19 levels of
+ <acronym>Zstd</acronym> compression, each offering
+ incrementally more space savings in exchange for slower
+ compression. The default level is
+ <literal>zstd-3</literal> and offers greater compression
+ than <acronym>LZ4</acronym> without being significantly
+ slower. Levels above 10 require significant amounts of
+ memory to compress each block, so they are discouraged on
+ systems with less than 16 GB of <acronym>RAM</acronym>.
+ <acronym>ZFS</acronym> also implements a selection of the
+ <acronym>Zstd</acronym> <emphasis>fast</emphasis> levels,
+ which get correspondingly faster but offer lower
+ compression ratios. <acronym>ZFS</acronym> supports
+ <literal>zstd-fast-1</literal> through
+ <literal>zstd-fast-10</literal>,
+ <literal>zstd-fast-20</literal> through
+ <literal>zstd-fast-100</literal> in increments of 10, and
+ finally <literal>zstd-fast-500</literal> and
+ <literal>zstd-fast-1000</literal> which provide minimal
+ compression, but offer very high performance.</para>
+
+ <para>If ZFS is not able to allocate the required memory to
+ compress a block with <acronym>Zstd</acronym>, it will fall
+ back to storing the block uncompressed. This is unlikely
+ to happen outside of the highest levels of
+ <acronym>Zstd<acronym> on systems that are memory
+ constrained. The sysctl
+ <literal>kstat.zfs.misc.zstd.compress_alloc_fail</literal>
+ counts how many times this has occurred since the
+ <acronym>ZFS</acronym> module was loaded.</para>
+ </sect3>
</sect2>
<sect2 xml:id="zfs-zfs-deduplication">
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 6, 8:58 AM (3 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26714870
Default Alt Text
D27715.diff (3 KB)
Attached To
Mode
D27715: Add a section about Zstandard compression to the ZFS handbook
Attached
Detach File
Event Timeline
Log In to Comment