Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Before we go further, it would be better to see the benchmark result of Zstandard. I compared the compressed size and compression time of 3 1kb-sized messages (3102 bytes in total), with the Draft-implementation of ZStandard Compression Codec and all currently available CompressionCodecs. You can see the benchmark code from this commit. All elapsed times are the average of 1000 trials.100 iterations, preceded by 5 warm up iterations. (To run the benchmark in your environment, move to jmh-benchmarks and run following command: ./jmh.sh -wi 5 -i 100 -f 1)

 

CodecLevelSize (byte)Time (ms)Description
Gzip-3961530.083 ± 0.008 
Snappy-1,063370.030 ± 0.001 
LZ4-387570.012 ± 0.001 
Zstandard1374560.045 ± 0.003Speed-first setting.
2374580.039 ± 0.001 
3379830.057 ± 0.003Facebook's recommended default setting.
43792260.121 ± 0.013 
53731020.081 ± 0.004 
63732520.135 ± 0.016 
73736670.688 ± 0.060 
83737070.805 ± 0.072 
93738301.038 ± 0.060 
103731,029.400 ± 0.099 
113731,9732.515 ± 0.188 
123731,9852.413 ± 0.195 
133732,352.889 ± 0.219 
143732,324.340 ± 0.030 
153741,668.943 ± 0.118 
163744,9966.759 ± 0.625 
173712,4183.045 ± 0.198 
183717,4348.508 ± 0.787 
193689,9978.721 ± 0.499 
2036824,70129.475 ± 2.456 
2136890,04454.713 ± 5.023 
22368282,768227.643 ± 18.390Size-first setting.

...

As you can see above, ZStandard outplays all existing algorithms shows outstanding performance in both of compression rate and speed, especially working with the speed-first setting (level 1). To the extent that only LZ4 can be compared to ZStandard.

Public Interfaces

This feature requires modification on both of Configuration Options and Binary Log format.

...