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

Thomas Lamprecht t.lamprecht at proxmox.com
Thu Jan 16 11:26:41 CET 2020


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>
> +
> +The `lz4` algorithm is recommended, since it is highly performant. Other
> +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

Omit the parenthesis and write "...decompresses them on reading." ?

Any maybe move to top of section as introduction to this one?

> +data as quickly as it comes in, having compression enabled can even increase

How can one determine that, or

> +I/O performance. Data that existed before compression was enabled will not
> +be compressed automatically.
> +
> +You can disable compression at any time with:
> +
> + zfs set compression=off <dataset>
> +
> +Again, only new blocks will be afffected by this change.

a "f" to much

> +
> +
>  ZFS Special Device
>  ~~~~~~~~~~~~~~~~~~
>  
> 





More information about the pve-devel mailing list