Difference between revisions of "Compression"

From sigrok
Jump to navigation Jump to search
(Created page with "== Comparison == All tests were performed using lzbench 1.7.3 (64-bit Linux), default compile options, gcc 7.3.0. All lzbench runs were performed twice in a row, the second...")
 
Line 3: Line 3:
All tests were performed using lzbench 1.7.3 (64-bit Linux), default compile options, gcc 7.3.0.
All tests were performed using lzbench 1.7.3 (64-bit Linux), default compile options, gcc 7.3.0.


All lzbench runs were performed twice in a row, the second run is recorded here.
All lzbench runs were performed twice in a row, the second run is recorded here. Only 1 core is used by all algorithms in this test set (though some of them are multi-threading capable).


'''Hardware''': Laptop, AMD A10-8700P (4 cores, 1.8MHz); all 4 cores set to "performance" cpufreq governor; 8GB RAM.
'''Hardware''': Laptop, AMD A10-8700P (4 cores, 1.8MHz); all 4 cores set to "performance" cpufreq governor; 8GB RAM
 
All results should be taken with a grain of salt, this is not a very scientific setup; speeds can vary quite a bit with each run as well, and the results can depend on quite a lot of things and will vary for other systems, other data, etc. etc.


=== 100MB /dev/zero ===
=== 100MB /dev/zero ===
Line 12: Line 14:
  $ '''dd if=/dev/zero of=devzero_100mb.dd bs=1M count=100''' # 104857600 bytes
  $ '''dd if=/dev/zero of=devzero_100mb.dd bs=1M count=100''' # 104857600 bytes
  $ '''./lzbench -elibdeflate,9,6,1/lz4/lz4fast,9,6,1/zstd,22,9,6,1,-1 devzero_100mb.dd'''
  $ '''./lzbench -elibdeflate,9,6,1/lz4/lz4fast,9,6,1/zstd,22,9,6,1,-1 devzero_100mb.dd'''
lzbench 1.7.3 (64-bit Linux)  Assembled by P.Skibinski
Compressor name        Compress. Decompress. Compr. size  Ratio Filename
memcpy                  3489 MB/s  3417 MB/s  104857600 100.00 devzero_100mb.dd
libdeflate 0.7 -9          37 MB/s  3695 MB/s      105985  0.10 devzero_100mb.dd
libdeflate 0.7 -6        285 MB/s  3744 MB/s      105985  0.10 devzero_100mb.dd
libdeflate 0.7 -1        286 MB/s  3744 MB/s      105985  0.10 devzero_100mb.dd
lz4 1.8.0                5019 MB/s  2605 MB/s      411217  0.39 devzero_100mb.dd
lz4fast 1.8.0 -9        4876 MB/s  2609 MB/s      411217  0.39 devzero_100mb.dd
lz4fast 1.8.0 -6        4978 MB/s  2742 MB/s      411217  0.39 devzero_100mb.dd
lz4fast 1.8.0 -1        4989 MB/s  2637 MB/s      411217  0.39 devzero_100mb.dd
zstd 1.3.3 -22          2644 MB/s  2802 MB/s        8810  0.01 devzero_100mb.dd
zstd 1.3.3 -9            739 MB/s  2931 MB/s        8812  0.01 devzero_100mb.dd
zstd 1.3.3 -6            1342 MB/s  2934 MB/s        8812  0.01 devzero_100mb.dd
zstd 1.3.3 -1            4475 MB/s  2504 MB/s        9611  0.01 devzero_100mb.dd
zstd 1.3.3 --1          4738 MB/s  2637 MB/s        9611  0.01 devzero_100mb.dd
done... (cIters=1 dIters=1 cTime=1.0 dTime=2.0 chunkSize=1706MB cSpeed=0MB)
</small>
</small>


Line 19: Line 37:
  $ '''dd if=/dev/urandom of=devurandom_100mb.dd bs=1M count=100''' # 104857600 bytes
  $ '''dd if=/dev/urandom of=devurandom_100mb.dd bs=1M count=100''' # 104857600 bytes
  $ '''./lzbench -elibdeflate,9,6,1/lz4/lz4fast,9,6,1/zstd,22,9,6,1,-1 devurandom_100mb.dd'''
  $ '''./lzbench -elibdeflate,9,6,1/lz4/lz4fast,9,6,1/zstd,22,9,6,1,-1 devurandom_100mb.dd'''
lzbench 1.7.3 (64-bit Linux)  Assembled by P.Skibinski
Compressor name        Compress. Decompress. Compr. size  Ratio Filename
memcpy                  3425 MB/s  3443 MB/s  104857600 100.00 devurandom_100mb.dd
libdeflate 0.7 -9          23 MB/s  2143 MB/s  104866340 100.01 devurandom_100mb.dd
libdeflate 0.7 -6          53 MB/s  2144 MB/s  104866340 100.01 devurandom_100mb.dd
libdeflate 0.7 -1          54 MB/s  2134 MB/s  104866340 100.01 devurandom_100mb.dd
lz4 1.8.0                2937 MB/s  3160 MB/s  105268808 100.39 devurandom_100mb.dd
lz4fast 1.8.0 -9        2933 MB/s  3169 MB/s  105268808 100.39 devurandom_100mb.dd
lz4fast 1.8.0 -6        2942 MB/s  3145 MB/s  105268808 100.39 devurandom_100mb.dd
lz4fast 1.8.0 -1        2940 MB/s  3138 MB/s  105268808 100.39 devurandom_100mb.dd
zstd 1.3.3 -22          1.87 MB/s  1737 MB/s  104860009 100.00 devurandom_100mb.dd
zstd 1.3.3 -9              40 MB/s  1722 MB/s  104860010 100.00 devurandom_100mb.dd
zstd 1.3.3 -6              48 MB/s  1721 MB/s  104860010 100.00 devurandom_100mb.dd
zstd 1.3.3 -1            730 MB/s  1673 MB/s  104860010 100.00 devurandom_100mb.dd
zstd 1.3.3 --1            531 MB/s  1719 MB/s  104860010 100.00 devurandom_100mb.dd
done... (cIters=1 dIters=1 cTime=1.0 dTime=2.0 chunkSize=1706MB cSpeed=0MB)
</small>
=== 1000MB /dev/zero ===
<small>
$ '''dd if=/dev/zero of=devzero_1000mb.dd bs=1M count=1000''' # 1048576000 bytes
$ '''./lzbench -elibdeflate,9,6,1/lz4/lz4fast,9,6,1/zstd,22,9,6,1,-1 devzero_1000mb.dd'''
lzbench 1.7.3 (64-bit Linux)  Assembled by P.Skibinski
Compressor name        Compress. Decompress. Compr. size  Ratio Filename
memcpy                  3073 MB/s  2969 MB/s  1048576000 100.00 devzero_1000mb.dd
libdeflate 0.7 -9          36 MB/s  3390 MB/s    1059753  0.10 devzero_1000mb.dd
libdeflate 0.7 -6        272 MB/s  3421 MB/s    1059753  0.10 devzero_1000mb.dd
libdeflate 0.7 -1        262 MB/s  3583 MB/s    1059753  0.10 devzero_1000mb.dd
lz4 1.8.0                4567 MB/s  2249 MB/s    4112073  0.39 devzero_1000mb.dd
lz4fast 1.8.0 -9        4344 MB/s  2355 MB/s    4112073  0.39 devzero_1000mb.dd
lz4fast 1.8.0 -6        4399 MB/s  2338 MB/s    4112073  0.39 devzero_1000mb.dd
lz4fast 1.8.0 -1        4478 MB/s  2027 MB/s    4112073  0.39 devzero_1000mb.dd
zstd 1.3.3 -22          1636 MB/s  2452 MB/s      88011  0.01 devzero_1000mb.dd
zstd 1.3.3 -9            647 MB/s  2635 MB/s      88012  0.01 devzero_1000mb.dd
zstd 1.3.3 -6            1128 MB/s  3076 MB/s      88012  0.01 devzero_1000mb.dd
zstd 1.3.3 -1            4388 MB/s  2534 MB/s      96011  0.01 devzero_1000mb.dd
zstd 1.3.3 --1          4594 MB/s  2479 MB/s      96011  0.01 devzero_1000mb.dd
done... (cIters=1 dIters=1 cTime=1.0 dTime=2.0 chunkSize=1706MB cSpeed=0MB)
</small>
=== 1000MB /dev/urandom ===
<small>
$ '''dd if=/dev/urandom of=devurandom_1000mb.dd bs=1M count=1000''' # 1048576000 bytes
$ '''./lzbench -elibdeflate,9,6,1/lz4/lz4fast,9,6,1/zstd,22,9,6,1,-1 devurandom_1000mb.dd'''
lzbench 1.7.3 (64-bit Linux)  Assembled by P.Skibinski
Compressor name        Compress. Decompress. Compr. size  Ratio Filename
memcpy                  2525 MB/s  3364 MB/s  1048576000 100.00 devurandom_1000mb.dd
libdeflate 0.7 -9          22 MB/s  2043 MB/s  1048663385 100.01 devurandom_1000mb.dd
libdeflate 0.7 -6          51 MB/s  2109 MB/s  1048663385 100.01 devurandom_1000mb.dd
libdeflate 0.7 -1          52 MB/s  2053 MB/s  1048663385 100.01 devurandom_1000mb.dd
lz4 1.8.0                3222 MB/s  3176 MB/s  1052688064 100.39 devurandom_1000mb.dd
lz4fast 1.8.0 -9        3293 MB/s  3265 MB/s  1052688064 100.39 devurandom_1000mb.dd
lz4fast 1.8.0 -6        3362 MB/s  3276 MB/s  1052688064 100.39 devurandom_1000mb.dd
lz4fast 1.8.0 -1        3292 MB/s  3251 MB/s  1052688064 100.39 devurandom_1000mb.dd
zstd 1.3.3 -22          1.32 MB/s  1728 MB/s  1048600010 100.00 devurandom_1000mb.dd
zstd 1.3.3 -9              42 MB/s  1779 MB/s  1048600010 100.00 devurandom_1000mb.dd
zstd 1.3.3 -6              50 MB/s  1705 MB/s  1048600010 100.00 devurandom_1000mb.dd
zstd 1.3.3 -1            719 MB/s  1663 MB/s  1048600010 100.00 devurandom_1000mb.dd
zstd 1.3.3 --1            531 MB/s  1722 MB/s  1048600010 100.00 devurandom_1000mb.dd
done... (cIters=1 dIters=1 cTime=1.0 dTime=2.0 chunkSize=1706MB cSpeed=0MB)
</small>
=== dcf77_1800s.sr ===
<small>
$ '''unzip dcf77_1800s.sr; ls -l logic-1''' # 1800000000 bytes
$ '''./lzbench -elibdeflate,9,6,1/lz4/lz4fast,9,6,1/zstd,22,9,6,1,-1 logic-1'''
</small>
=== voltcraft_vc940_multiple_modes.sr ===
<small>
$ '''unzip voltcraft_vc940_multiple_modes.sr; cat logic-1-* >> all.dd''' # 77332480 bytes
$ '''./lzbench -elibdeflate,9,6,1/lz4/lz4fast,9,6,1/zstd,22,9,6,1,-1 all.dd'''
</small>
</small>

Revision as of 18:49, 21 April 2018

Comparison

All tests were performed using lzbench 1.7.3 (64-bit Linux), default compile options, gcc 7.3.0.

All lzbench runs were performed twice in a row, the second run is recorded here. Only 1 core is used by all algorithms in this test set (though some of them are multi-threading capable).

Hardware: Laptop, AMD A10-8700P (4 cores, 1.8MHz); all 4 cores set to "performance" cpufreq governor; 8GB RAM

All results should be taken with a grain of salt, this is not a very scientific setup; speeds can vary quite a bit with each run as well, and the results can depend on quite a lot of things and will vary for other systems, other data, etc. etc.

100MB /dev/zero

$ dd if=/dev/zero of=devzero_100mb.dd bs=1M count=100 # 104857600 bytes
$ ./lzbench -elibdeflate,9,6,1/lz4/lz4fast,9,6,1/zstd,22,9,6,1,-1 devzero_100mb.dd
lzbench 1.7.3 (64-bit Linux)   Assembled by P.Skibinski
Compressor name         Compress. Decompress. Compr. size  Ratio Filename
memcpy                   3489 MB/s  3417 MB/s   104857600 100.00 devzero_100mb.dd
libdeflate 0.7 -9          37 MB/s  3695 MB/s      105985   0.10 devzero_100mb.dd
libdeflate 0.7 -6         285 MB/s  3744 MB/s      105985   0.10 devzero_100mb.dd
libdeflate 0.7 -1         286 MB/s  3744 MB/s      105985   0.10 devzero_100mb.dd
lz4 1.8.0                5019 MB/s  2605 MB/s      411217   0.39 devzero_100mb.dd
lz4fast 1.8.0 -9         4876 MB/s  2609 MB/s      411217   0.39 devzero_100mb.dd
lz4fast 1.8.0 -6         4978 MB/s  2742 MB/s      411217   0.39 devzero_100mb.dd
lz4fast 1.8.0 -1         4989 MB/s  2637 MB/s      411217   0.39 devzero_100mb.dd
zstd 1.3.3 -22           2644 MB/s  2802 MB/s        8810   0.01 devzero_100mb.dd
zstd 1.3.3 -9             739 MB/s  2931 MB/s        8812   0.01 devzero_100mb.dd
zstd 1.3.3 -6            1342 MB/s  2934 MB/s        8812   0.01 devzero_100mb.dd
zstd 1.3.3 -1            4475 MB/s  2504 MB/s        9611   0.01 devzero_100mb.dd
zstd 1.3.3 --1           4738 MB/s  2637 MB/s        9611   0.01 devzero_100mb.dd
done... (cIters=1 dIters=1 cTime=1.0 dTime=2.0 chunkSize=1706MB cSpeed=0MB)

100MB /dev/urandom

$ dd if=/dev/urandom of=devurandom_100mb.dd bs=1M count=100 # 104857600 bytes
$ ./lzbench -elibdeflate,9,6,1/lz4/lz4fast,9,6,1/zstd,22,9,6,1,-1 devurandom_100mb.dd
lzbench 1.7.3 (64-bit Linux)   Assembled by P.Skibinski
Compressor name         Compress. Decompress. Compr. size  Ratio Filename
memcpy                   3425 MB/s  3443 MB/s   104857600 100.00 devurandom_100mb.dd
libdeflate 0.7 -9          23 MB/s  2143 MB/s   104866340 100.01 devurandom_100mb.dd
libdeflate 0.7 -6          53 MB/s  2144 MB/s   104866340 100.01 devurandom_100mb.dd
libdeflate 0.7 -1          54 MB/s  2134 MB/s   104866340 100.01 devurandom_100mb.dd
lz4 1.8.0                2937 MB/s  3160 MB/s   105268808 100.39 devurandom_100mb.dd
lz4fast 1.8.0 -9         2933 MB/s  3169 MB/s   105268808 100.39 devurandom_100mb.dd
lz4fast 1.8.0 -6         2942 MB/s  3145 MB/s   105268808 100.39 devurandom_100mb.dd
lz4fast 1.8.0 -1         2940 MB/s  3138 MB/s   105268808 100.39 devurandom_100mb.dd
zstd 1.3.3 -22           1.87 MB/s  1737 MB/s   104860009 100.00 devurandom_100mb.dd
zstd 1.3.3 -9              40 MB/s  1722 MB/s   104860010 100.00 devurandom_100mb.dd
zstd 1.3.3 -6              48 MB/s  1721 MB/s   104860010 100.00 devurandom_100mb.dd
zstd 1.3.3 -1             730 MB/s  1673 MB/s   104860010 100.00 devurandom_100mb.dd
zstd 1.3.3 --1            531 MB/s  1719 MB/s   104860010 100.00 devurandom_100mb.dd
done... (cIters=1 dIters=1 cTime=1.0 dTime=2.0 chunkSize=1706MB cSpeed=0MB)

1000MB /dev/zero

$ dd if=/dev/zero of=devzero_1000mb.dd bs=1M count=1000 # 1048576000 bytes
$ ./lzbench -elibdeflate,9,6,1/lz4/lz4fast,9,6,1/zstd,22,9,6,1,-1 devzero_1000mb.dd
lzbench 1.7.3 (64-bit Linux)   Assembled by P.Skibinski
Compressor name         Compress. Decompress. Compr. size  Ratio Filename
memcpy                   3073 MB/s  2969 MB/s  1048576000 100.00 devzero_1000mb.dd
libdeflate 0.7 -9          36 MB/s  3390 MB/s     1059753   0.10 devzero_1000mb.dd
libdeflate 0.7 -6         272 MB/s  3421 MB/s     1059753   0.10 devzero_1000mb.dd
libdeflate 0.7 -1         262 MB/s  3583 MB/s     1059753   0.10 devzero_1000mb.dd
lz4 1.8.0                4567 MB/s  2249 MB/s     4112073   0.39 devzero_1000mb.dd
lz4fast 1.8.0 -9         4344 MB/s  2355 MB/s     4112073   0.39 devzero_1000mb.dd
lz4fast 1.8.0 -6         4399 MB/s  2338 MB/s     4112073   0.39 devzero_1000mb.dd
lz4fast 1.8.0 -1         4478 MB/s  2027 MB/s     4112073   0.39 devzero_1000mb.dd
zstd 1.3.3 -22           1636 MB/s  2452 MB/s       88011   0.01 devzero_1000mb.dd
zstd 1.3.3 -9             647 MB/s  2635 MB/s       88012   0.01 devzero_1000mb.dd
zstd 1.3.3 -6            1128 MB/s  3076 MB/s       88012   0.01 devzero_1000mb.dd
zstd 1.3.3 -1            4388 MB/s  2534 MB/s       96011   0.01 devzero_1000mb.dd
zstd 1.3.3 --1           4594 MB/s  2479 MB/s       96011   0.01 devzero_1000mb.dd
done... (cIters=1 dIters=1 cTime=1.0 dTime=2.0 chunkSize=1706MB cSpeed=0MB)

1000MB /dev/urandom

$ dd if=/dev/urandom of=devurandom_1000mb.dd bs=1M count=1000 # 1048576000 bytes
$ ./lzbench -elibdeflate,9,6,1/lz4/lz4fast,9,6,1/zstd,22,9,6,1,-1 devurandom_1000mb.dd
lzbench 1.7.3 (64-bit Linux)   Assembled by P.Skibinski
Compressor name         Compress. Decompress. Compr. size  Ratio Filename
memcpy                   2525 MB/s  3364 MB/s  1048576000 100.00 devurandom_1000mb.dd
libdeflate 0.7 -9          22 MB/s  2043 MB/s  1048663385 100.01 devurandom_1000mb.dd
libdeflate 0.7 -6          51 MB/s  2109 MB/s  1048663385 100.01 devurandom_1000mb.dd
libdeflate 0.7 -1          52 MB/s  2053 MB/s  1048663385 100.01 devurandom_1000mb.dd
lz4 1.8.0                3222 MB/s  3176 MB/s  1052688064 100.39 devurandom_1000mb.dd
lz4fast 1.8.0 -9         3293 MB/s  3265 MB/s  1052688064 100.39 devurandom_1000mb.dd
lz4fast 1.8.0 -6         3362 MB/s  3276 MB/s  1052688064 100.39 devurandom_1000mb.dd
lz4fast 1.8.0 -1         3292 MB/s  3251 MB/s  1052688064 100.39 devurandom_1000mb.dd
zstd 1.3.3 -22           1.32 MB/s  1728 MB/s  1048600010 100.00 devurandom_1000mb.dd
zstd 1.3.3 -9              42 MB/s  1779 MB/s  1048600010 100.00 devurandom_1000mb.dd
zstd 1.3.3 -6              50 MB/s  1705 MB/s  1048600010 100.00 devurandom_1000mb.dd
zstd 1.3.3 -1             719 MB/s  1663 MB/s  1048600010 100.00 devurandom_1000mb.dd
zstd 1.3.3 --1            531 MB/s  1722 MB/s  1048600010 100.00 devurandom_1000mb.dd
done... (cIters=1 dIters=1 cTime=1.0 dTime=2.0 chunkSize=1706MB cSpeed=0MB)

dcf77_1800s.sr

$ unzip dcf77_1800s.sr; ls -l logic-1 # 1800000000 bytes
$ ./lzbench -elibdeflate,9,6,1/lz4/lz4fast,9,6,1/zstd,22,9,6,1,-1 logic-1

voltcraft_vc940_multiple_modes.sr

$ unzip voltcraft_vc940_multiple_modes.sr; cat logic-1-* >> all.dd # 77332480 bytes
$ ./lzbench -elibdeflate,9,6,1/lz4/lz4fast,9,6,1/zstd,22,9,6,1,-1 all.dd