Enable compression option -c during ZFS Send #14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change will allow PVE to utilize
ZFS Send -c
compression option to speed up intra-cluster migration and replication.The current implementation does not compress streams which significantly slows down migration on VMs/CTs with large data sets (ie, databases, filestorage ...). For example, if a VM is assigned a 512GB ZFS dataset and is migrated into another host, the
ZFS Send
will transmit 512GB of data regardless if the VM internally used 1GB of disk space or +500GB of space. Using the-c
option, upon migrating the VM, due to compression only used datablocks are sent significantly increasing speed.Note that even if the underlying ZFS source and destination datasets have the setting
compression=on
(the default setting in PVE),ZFS Send
without the-c
option will "unpack" the blocks and send the blocks uncompressed to the receiver.I've tested this on a production cluster on PVE 8.3.3 with many instances of VMs and CTs with ZFS datasets ranging from 16GB all the way up to 1TB+. Migration and replication works as they did before without any issues.