Changeset View
Standalone View
en_US.ISO8859-1/books/handbook/zfs/chapter.xml
Show First 20 Lines • Show All 2,920 Lines • ▼ Show 20 Lines | mypool/compressed_dataset logicalused 496G -</screen> | ||||
compression caused them to reach their quota limit.</para> | compression caused them to reach their quota limit.</para> | ||||
<para>Compression can have a similar unexpected interaction with | <para>Compression can have a similar unexpected interaction with | ||||
backups. Quotas are often used to limit how much data can be | backups. Quotas are often used to limit how much data can be | ||||
stored to ensure there is sufficient backup space available. | stored to ensure there is sufficient backup space available. | ||||
However since quotas do not consider compression, more data | However since quotas do not consider compression, more data | ||||
may be written than would fit with uncompressed | may be written than would fit with uncompressed | ||||
backups.</para> | 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 is the default in | |||||
&os; 13.0.</para> | |||||
debdrup: Should this be "is the default as of FreeBSD 13-CURRENT and will be in 13.0-RELEASE"? | |||||
<para>Zstandard 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 | |||||
pauamma_gundo.comUnsubmitted Done Inline ActionsAfter the initial introduction of both "Zstandard" and its acronym "Zstd", I'd use one consistently, not a mix of both. pauamma_gundo.com: After the initial introduction of both "Zstandard" and its acronym "Zstd", I'd use one… | |||||
allanjudeAuthorUnsubmitted Done Inline ActionsDone allanjude: Done | |||||
independent of the compression level. For data that is | |||||
written once but read many times, there is no disadvantage | |||||
to using higher compression levels as the read speed will be | |||||
emasteUnsubmitted Done Inline ActionsI wonder if it would be clear to say no advantage to lower compression levels to avoid the double negative. Or something like "but read many times, Zstd allows the use of high compression levels without a performance penalty." emaste: I wonder if it would be clear to say no advantage to lower compression levels to avoid the… | |||||
Done Inline Actionsmmm, reading it again, maybe we should mention without a "read" performance penalty? emaste: mmm, reading it again, maybe we should mention without a "read" performance penalty? | |||||
Done Inline Actionsagreed allanjude: agreed | |||||
just as fast as if a lesser compression level had been | |||||
used.</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 | |||||
pauamma_gundo.comUnsubmitted Not Done Inline ActionsClarification: here and in the following paragraph, is it ZFS or OpenZFS? pauamma_gundo.com: Clarification: here and in the following paragraph, is it ZFS or OpenZFS? | |||||
allanjudeAuthorUnsubmitted Done Inline ActionsThey are fairly synonymous, I think we'll have to do an entire pass over the handbook at some point allanjude: They are fairly synonymous, I think we'll have to do an entire pass over the handbook at some… | |||||
Cache (<acronym>ARC</acronym>) caches the compressed version | |||||
of the data in <acronym>RAM</acronym>, decompressing it each | |||||
Done Inline Actionss/cache/memory/ debdrup: s/cache/memory/ | |||||
Done Inline Actions
Or better yet: debdrup: > s/cache/memory/
Or better yet:
<acronym>RAM</acronym> instead of the word cache or the word… | |||||
time it is needed. This allows the same amount of cache to | |||||
store more data and metadata, increasing the cache hit | |||||
ratio.</para> | |||||
<para><acronym>ZFS</acronym> offers 19 levels of Zstandard | |||||
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 | |||||
Zstandard <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> | |||||
pauamma_gundo.comUnsubmitted Not Done Inline ActionsThat paragraph doesn't state how to change the compression from the default. pauamma_gundo.com: That paragraph doesn't state how to change the compression from the default. | |||||
allanjudeAuthorUnsubmitted Done Inline Actions
That is covered in the properties chapter, not sure if it makes sense to repeat it here. It might. allanjude: > That paragraph doesn't state how to change the compression from the default.
That is covered… | |||||
<para>If ZFS is not able to allocate the required memory to | |||||
compress a block with Zstandard, it will fall back to | |||||
storing the block uncompressed. This is unlikely to happen | |||||
outside of the highest levels of Zstandard 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> | ||||
<sect2 xml:id="zfs-zfs-deduplication"> | <sect2 xml:id="zfs-zfs-deduplication"> | ||||
<title>Deduplication</title> | <title>Deduplication</title> | ||||
<para>When enabled, | <para>When enabled, | ||||
<link linkend="zfs-term-deduplication">deduplication</link> | <link linkend="zfs-term-deduplication">deduplication</link> | ||||
uses the checksum of each block to detect duplicate blocks. | uses the checksum of each block to detect duplicate blocks. | ||||
▲ Show 20 Lines • Show All 1,422 Lines • Show Last 20 Lines |
Should this be "is the default as of FreeBSD 13-CURRENT and will be in 13.0-RELEASE"?