[pve-devel] [PATCH docs] Add section 'Compression in ZFS'

Aaron Lauterer a.lauterer at proxmox.com
Thu Jan 16 11:40:08 CET 2020


Some small suggestions inline

On 1/16/20 10:59 AM, Fabian Ebner wrote:
> Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
> ---
>   local-zfs.adoc | 27 ++++++++++++++++++++++++++-
>   1 file changed, 26 insertions(+), 1 deletion(-)
> 
> diff --git a/local-zfs.adoc b/local-zfs.adoc
> index 15a88bb..69979b5 100644
> --- a/local-zfs.adoc
> +++ b/local-zfs.adoc
> @@ -180,7 +180,7 @@ underlying disk.
>   
>    zpool create -f -o ashift=12 <pool> <device>
>   
> -To activate compression
> +To activate compression (see section <<zfs_compression,Compression in ZFS>>):
>   
>    zfs set compression=lz4 <pool>
>   
> @@ -433,6 +433,31 @@ change-key` commands and the `Encryption` section from `man zfs` for more
>   details and advanced usage.
>   
>   
> +[[zfs_compression]]
> +Compression in ZFS
> +~~~~~~~~~~~~~~~~~~
> +
> +You can enable compression on a ZFS dataset with:
> +
> + zfs set compression=<algorithm> <dataset>
What about changing commands to:

----
# zfs set ...
----

With the 4 dashes, this will make it visually more distinct (grey 
background). In host system administration for example it is done like that.
> +
> +The `lz4` algorithm is recommended, since it is highly performant. Other
s/, since/ because/ (not sure about omitting the comma though)

> +algorithms like `lzjb` and `gzip-N`, where `N` is an integer from `1`
> +(fastest) to `9` (best compression ratio), are also available.
> +
> +Once enabled, ZFS compresses all *new* blocks before writing them (and
> +decompresses them after reading). If your CPU can compress/decompress the
> +data as quickly as it comes in, having compression enabled can even increase
> +I/O performance. Data that existed before compression was enabled will not
> +be compressed automatically.
maybe s/automatically/retroactively/
> +
> +You can disable compression at any time with:
> +
> + zfs set compression=off <dataset>
> +
> +Again, only new blocks will be afffected by this change.
> +
> +
>   ZFS Special Device
>   ~~~~~~~~~~~~~~~~~~
>   
> 




More information about the pve-devel mailing list