Skip to content

Instantly share code, notes, and snippets.

@joshuawscott
Last active August 29, 2015 14:05
Show Gist options
  • Save joshuawscott/4734c3bef8db11b9a8dd to your computer and use it in GitHub Desktop.
Save joshuawscott/4734c3bef8db11b9a8dd to your computer and use it in GitHub Desktop.
gzip vs xz

Compression

935MB nginx log (dpx)

MB/sec in both charts means:

orig. size - compressed size
____________________________
         real time

GZ

level cpu time real time size MB/sec
1 20.4 21.4 244MB 32.29
2 20.7 21.8 236MB 32.06
3 22.7 23.7 231MB 29.70
4 27.8 28.8 215MB 25.00
5 31.0 32.0 207MB 22.75
6 36.4 37.4 202MB 19.60
7 41.0 42.2 199MB 17.44
8 44.8 45.9 198MB 16.06
9 45.3 46.4 198MB 15.88

XZ

size/time comparison is to gzip -6 (default): 202MB, 37.4 sec.

level cpu time real time size MB/sec size savings time cost savings/cost
0 65.3 68.3 165M 11.27 37MB 30.9 1.20
1 64.4 66.2 129M 12.18 73MB 28.8 2.53
2 74.8 77.0 113M 10.68 89MB 39.6 2.25
3 95.8 99.4 102M 8.38 100MB 62 1.61
4 181.8 184.9 104M 4.49 98MB 147.5 0.66
5 273.8 276.9 88M 3.06 114MB 239.5 0.48
6 432.6 435.6 83M 1.96 119MB 398.2 0.30
7 460.1 467.6 77M 1.83 125MB 430.2 0.29
8 494.3 510.4 73M 1.69 129MB 473 0.27
9 535.2 544.6 70M 1.59 132MB 507.2 0.26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment