Compression Results

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)25651276810241536204840968192
zsync-0.1.0 (pre-release), no compression 564709 353690 279580306050468092
rsync-2.6.3 (total, no compression)579758317418251732232682209608225686275970412720
rsync-2.6.3 (uncompressed file, compressed data transfer)349311165121120567102686830338163885591117775
zsync-0.2.2, gzip --best, with look-inside559703304058 185237 140735149467209643
zsync 0.3.3 (pre-release) with optimised .gz 292684 169582 115396106654149950
zsync-0.2.1, with gzip --rsync, without look-inside449153415905 406514 422712485402617931
rsync-2.6.3, with gzip --rsync, (total)476020427778419292411128420072426864476726583578

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, uncompressedzsync, gzip --best with look-insidezsync, optimised compression & look-insidersync -z (total)
Textual data file27958014073511539681638
Binary data files9021714371597936473873641657
Large source code tarballs21873310563002244885353015492

So zsync still trails rsync -z, but the difference is relatively small. And, importantly, zsync does this without any special load on the server.