Is multithreaded LZ4 actually competitive?

Benchmarking the opt-in --mt/-T# LZ4 build against reference parallel compressors — pigz, pzstd and multithreaded zstd — at equal thread counts.

Earlier work showed the multithreaded LZ4 benchmark mode runs 13–16× faster than single-threaded LZ4. That alone doesn't prove much: any tool looks good against its own single-threaded self. The question answered here is whether those speeds hold up against other parallel compressors given the same hardware and the same number of threads.

Setup

ItemDetail
Machine2× Intel Xeon @ 2.80 GHz — 16 physical cores, 32 hardware threads, 125 GB RAM
LZ4v1.10.0 dev + opt-in MT bench mode, PGO/LTO/native build (~/LZ4-ks/lz4), level -1
Referencespigz 2.8 (parallel gzip), pzstd 1.5.5 (parallel zstd frontend), zstd 1.5.5 (native -T#), all at their fastest level -1
Corporasilesia.tar (212 MB), enwik8 (100 MB); for wall-clock runs each was concatenated ×8 (1.7 GB / 800 MB) so the fastest runs still take hundreds of milliseconds
MethodAll I/O in tmpfs (/dev/shm), output to /dev/null, best of 3 runs, idle machine; every tool's output decompressed and md5-verified against the original (8/8 checks passed)

1 · In-memory benchmark: LZ4 -b1 -T# vs zstd -b1 -T#

Both tools ship an official in-memory benchmark mode that removes all file I/O — the cleanest apples-to-apples comparison of the compression engines themselves. (pigz and pzstd have no such mode, so they appear only in the file test below.)

Compression throughput, silesia.tar (MB/s)

ThreadsLZ4 MTzstd MTLZ4 advantageLZ4 scalingzstd scaling
1555.5348.61.59×1.0×1.0×
83,478.22,111.31.65×6.3×6.1×
165,566.62,569.62.17×10.0×7.4×
327,154.53,106.92.30×12.9×8.9×
LZ4 -T327,155 MB/s
LZ4 -T165,567 MB/s
zstd -T323,107 MB/s
zstd -T162,570 MB/s
LZ4 -T1556 MB/s
zstd -T1349 MB/s

In-memory compression, silesia.tar, level -1.

Compression throughput, enwik8 (MB/s)

ThreadsLZ4 MTzstd MTLZ4 advantageLZ4 scalingzstd scaling
1408.5261.91.56×1.0×1.0×
83,245.31,425.52.28×7.9×5.4×
163,501.71,945.01.80×8.6×7.4×
326,680.32,331.92.86×16.4×8.9×

Decompression

LZ4's MT benchmark decodes independent blocks in parallel: 18.0–33.6 GB/s on silesia (T8→T32) and up to 36.7 GB/s on enwik8. The zstd format cannot be decoded in parallel from a standard stream, so zstd's bench holds at ~0.9–1.1 GB/s regardless of -T. LZ4-MT decode is therefore ~30× faster than zstd's at 32 threads — though the fairer parallel-decode rival is pzstd, covered next.

2 · File-based wall clock: all four CLIs, real files

Real end-to-end runs — read a tmpfs file, compress (or decompress) to /dev/null — measure each tool's whole pipeline, not just its engine. Throughput is uncompressed bytes per second of wall time, best of 3.

Compression, silesia ×8 (1.7 GB), MB/s

ThreadsLZ4 -T#pigzpzstdzstd -T#
142790345333
82,0346952,5402,401
162,0241,3512,9892,936
321,9551,3143,3693,266
pzstd -p323,369 MB/s
zstd -T323,266 MB/s
LZ4 -T82,034 MB/s
pigz -p161,351 MB/s

File-mode compression, best configuration per tool, silesia×8.

Decompression, silesia ×8 (1.7 GB), MB/s

ThreadsLZ4 CLIpigzpzstdzstd
11,7242801,0811,024
81,7272826,9171,011
161,7252878,0251,023
321,7312877,8561,019

enwik8×8 shows the same pattern: LZ4 wins single-threaded compression (332 vs 264/248/81 MB/s) and single-threaded decode; pzstd wins multi-threaded file compression (2,897 MB/s at p32 vs LZ4's 2,000 plateau) and parallel file decode (6,730 MB/s).

Compression ratio (unchanged by threading)

CorpusLZ4 -1pigz -1pzstd -1zstd -1
silesia2.102.752.882.89
enwik81.752.372.462.46

LZ4 trades ratio for speed by design — that trade-off is identical in the single-threaded version and is not an artifact of the MT work.

Verdict

Yes — the 13–16× MT speedups are competitive, not an artifact of a weak baseline.

Honest caveats

Reproduce

# in-memory engine comparison (equal threads)
~/LZ4-ks/lz4 -b1 -i3 -T16 ~/LZ4-ks-bench/silesia.tar
zstd        -b1 -i3 -T16 ~/LZ4-ks-bench/silesia.tar

# file-based wall clock (tmpfs)
cp ~/LZ4-ks-bench/silesia.tar /dev/shm/ && cd /dev/shm
time ~/LZ4-ks/lz4 -1 -T16 -c silesia.tar > /dev/null
time pigz  -1 -p16 -c silesia.tar > /dev/null
time pzstd -1 -p16 -c silesia.tar > /dev/null
time zstd  -1 -T16 -c silesia.tar > /dev/null

Raw data: ~/LZ4-ks/OPTIMIZATION-RESULTS.md (section “Competitive benchmark vs reference parallel compressors”). Tools: pigz 2.8, pzstd/zstd 1.5.5, LZ4 v1.10.0-dev (commit 0ad1b65 + PGO/LTO build). All measurements taken on an idle machine, August 2026.