The table below takes the best results from the previous comparison of transfer results with and without compression, and adds one new line, for zsync with the optimised gzip file just discussed.
Blocksize (bytes) | 256 | 512 | 768 | 1024 | 1536 | 2048 | 4096 | 8192 |
zsync-0.1.0 (pre-release), no compression | 564709 | 353690 | 279580 | 306050 | 468092 | |||
rsync-2.6.3 (total, no compression) | 579758 | 317418 | 251732 | 232682 | 209608 | 225686 | 275970 | 412720 |
rsync-2.6.3 (uncompressed file, compressed data transfer) | 349311 | 165121 | 120567 | 102686 | 83033 | 81638 | 85591 | 117775 |
zsync-0.2.2, gzip --best, with look-inside | 559703 | 304058 | 185237 | 140735 | 149467 | 209643 | ||
zsync 0.3.3 (pre-release) with optimised .gz | 292684 | 169582 | 115396 | 106654 | 149950 | |||
zsync-0.2.1, with gzip --rsync, without look-inside | 449153 | 415905 | 406514 | 422712 | 485402 | 617931 | ||
rsync-2.6.3, with gzip --rsync, (total) | 476020 | 427778 | 419292 | 411128 | 420072 | 426864 | 476726 | 583578 |
Note that the optimised gzip file gives a further reduction of almost 25% in the total amount transferred (comparing at the optimum block size for gzip --best and for the optimised .gz). The reduction in the block transfer phase is more pronounced, of course; the benefit accrues entirely in the block transfer phase, as it makes no difference to the size of the .zsync.
In fact, zsync, at 106kB, has now almost caught up with rsync -z, at 82kB. The difference between the two is almost entirely made up of the 23kB in the .zsync file for the map of the compressed data (essential to zsync, since the server is not compressing the data for it, so zsync needs a map to get it out of the middle of the file).
To extend the testing to a wider range of data types, I performed tests with a binary data file (data files from two different editions of a computer game), and with a large source code tarball (part of the source code for the X window system, ~170MB). Blocksize 2048, which seems to give good performance for all the cases above, was used throughout, and I compared zsync with no compression, with gzip --best, and with its own optimised .gz. Total data transferred is shown.
zsync, uncompressed | zsync, gzip --best with look-inside | zsync, optimised compression & look-inside | rsync -z (total) | |
Textual data file | 279580 | 140735 | 115396 | 81638 |
Binary data files | 9021714 | 3715979 | 3647387 | 3641657 |
Large source code tarballs | 21873310 | 5630022 | 4488535 | 3015492 |
So zsync still trails rsync -z, but the difference is relatively small. And, importantly, zsync does this without any special load on the server.