Delta Transfer of large binary files
The Delta Transfer feature might improve performance by transferring only the deltas (modified portions) of large, uncompressed binary+F
files to and from remote clients when they use:
-
p4 sync
- supported on P4 Server and P4 CLI 2024.2 or later -
p4 submit
- supported on P4 Server and P4 CLI 2024.1 or later
Delta transfers tend to be more beneficial where users are connected on a slow network. On a very fast network, it might be quicker to transfer the entire file rather than incur the overhead of the calculations required to handle the changed content as a delta transfer.
Prerequisites
-
The files must be of type
binary+F
. To learn more, see File types in P4 CLI Reference. -
The typemap A table in which you assign file types to files. For example, pdf is typically mapped to binary as opposed to text. must be suitable and in effect for those files. To learn more, see:
-
The following configurables can be customized to match your requirements:
-
net.delta.transfer.minsize
, the minimum file size for delta transfers. -
net.delta.transfer.threshold
, the maximum percentage of a file that differs before the whole file is transferred rather than only transferring the deltas.
If the typemap is suitable, these types might use Delta Transfer
Delta transfers are limited to binary+F
files, the "Uncompressed binary types". Some examples of that might be good candidates for delta transfer are .vmdk
, .uasset
, .iso
, .tar
, and .psd
.
Some file types can be configured to work better with delta transfer. For example,
-
gzip
files, if they are be created with the--rsyncable
option. -
.zip
,.jar
,.tiff
,.pdf
, and.wav
files, if they are created without compression.
Examples of file formats that are not suitable for delta transfer
Not all binary+F
files are suitable for delta transfer because the file might use a compression algorithm that causes the entire file to be completely rewritten when edited and saved. This means that unchanged content cannot be identified, and thus the entire file must be transfered. Examples include the .png
, .gif
, .jpg
, .mpeg
, .mp4
, .docx
and .xlsx
file types.