Jerome Benoit, on 2019-06-22: > How can we check that a compressed file is rsyncable ? > > In fact I would like to know if tarball compress with plzip > are rsyncable ?
Good Day,
If by "rsyncable", you mean "can be transferred by rsync", then
yes, like most files. :)
If you wonder if the delta-transfer algorithm will be in use,
although I have not tested directly plzip, chances are the
compression will not enable it.
If you wish to assess the efficiency of the delta-transfer, use
the option "--stats". At first transfer of the current source
code of rsync, repacked:
$ rsync --stats -a rsync-3.1.3.tar.xz 192.168.1.101:
Number of files: 1 (reg: 1)
Number of created files: 1 (reg: 1)
Number of deleted files: 0
Number of regular files transferred: 1
Total file size: 676,984 bytes
Total transferred file size: 676,984 bytes
Literal data: 676,984 bytes
Matched data: 0 bytes
File list size: 0
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 677,262
Total bytes received: 35
>>>>>> sent 677,262 bytes received 35 bytes 43,696.58 bytes/sec
total size is 676,984 speedup is 1.00
Then I add an empty "toto" file, repack, and see changes:
$ rsync --stats -a rsync-3.1.3.tar.xz 192.168.1.101:
Number of files: 1 (reg: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 1
Total file size: 677,000 bytes
Total transferred file size: 677,000 bytes
>>>>>> Literal data: 677,000 bytes
>>>>>> Matched data: 0 bytes
File list size: 0
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 677,278
Total bytes received: 5,015
>>>>>> sent 677,278 bytes received 5,015 bytes 454,862.00 bytes/sec
total size is 677,000 speedup is 0.99
In the case of tar archive compressed with XZ's LZMA2, the delta
transfer is not in use, the whole file is resent. (The
bandwidth increase here is most likely related to the drive
spinup time at first transfer, the target was a low end laptop.)
When delta transfer is in use, given a file with the following
properties at first transfer :
$ rsync --stats -aSH rsync_3.1.3-6.dsc 192.168.1.101:
Number of files: 1 (reg: 1)
Number of created files: 1 (reg: 1)
Number of deleted files: 0
Number of regular files transferred: 1
Total file size: 1,877 bytes
Total transferred file size: 1,877 bytes
Literal data: 1,877 bytes
Matched data: 0 bytes
File list size: 0
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 1,993
Total bytes received: 35
>>>>>> sent 1,993 bytes received 35 bytes 1,352.00 bytes/sec
total size is 1,877 speedup is 0.93
append a line with "toto" at the end of file, resend, and you
should see a non-zero value for matched data:
$ rsync --stats -aSH rsync_3.1.3-6.dsc 192.168.1.101:
Number of files: 1 (reg: 1)
Number of created files: 0
Number of deleted files: 0
Number of regular files transferred: 1
Total file size: 1,884 bytes
Total transferred file size: 1,884 bytes
>>>>>> Literal data: 484 bytes
>>>>>> Matched data: 1,400 bytes
File list size: 0
File list generation time: 0.001 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 613
Total bytes received: 53
>>>>>> sent 613 bytes received 53 bytes 1,332.00 bytes/sec
total size is 1,884 speedup is 2.83
See what it gives when you test transfers of you plzip archives.
Happy hacking,
--
Étienne Mollier <[email protected]> 59DA 56FE FFF3 882D
signature.asc
Description: OpenPGP digital signature

