The shipped reference figures for every codec, and how to install the ones that are missing.
Where the numbers come from: a fixed 6,357,223-byte corpus of Drupal-shaped data - 1,000 node
images in toArray() shape, 1,000 user images carrying JSON field values, and 4,000
custom-table rows including hashed API tokens. Split into frames, each frame compressed
independently - which is what Strata actually does - with a zstd dictionary trained on 5% of
the frames. Measured on PHP 8.5.7, arm64, with
ext-zstd 0.18.0 and ext-brotli 0.21.0.
What the numbers say, at 16 KiB frames, which is the shipped default:
codec
level
dict
ratio
compress
decompress
none
-
-
1.00x
18,948 MB/s
-
gzip
1
no
3.84x
180.6 MB/s
589.8 MB/s
gzip
9
no
4.40x
67.0 MB/s
589.8 MB/s
zstd
1
no
4.28x
422.9 MB/s
640.3 MB/s
zstd
1
yes
4.67x
105.1 MB/s
640.3 MB/s
zstd
19
no
4.87x
4.5 MB/s
640.3 MB/s
zstd
19
yes
5.86x
2.4 MB/s
640.3 MB/s
brotli
11
no
5.24x
1.1 MB/s
461.6 MB/s
brotli
11
yes
6.07x
0.9 MB/s
461.6 MB/s
Three things follow, and they are why the defaults are what they are:
zstd level 1 is the flush-path choice. 4.28x at 422.9 MB/s against gzip level 9's 4.40x at
67.0 MB/s: a fraction worse on size for more than six times the throughput, on a path that
runs inside a web request.
A dictionary costs throughput, not just disk. At level 1 it takes 422.9 MB/s down to
105.1 MB/s for 4.28x to 4.67x. Whole-batch measurement hides this, because the dictionary is
loaded once there and per frame here. It is used during compaction, where 5.86x against
4.87x is worth 2.4 MB/s, and by delta coding, which cannot work without it.
brotli wins on size and loses on time. 6.07x is the best figure here, at 0.9 MB/s. That is
a compaction codec on a large site and nothing else.
What they do not say: ratio depends on content. This corpus includes incompressible hashed
tokens, so it runs low against a prose-heavy site and high against one storing mostly media.
These figures exist so two hosts can be compared and so a size estimate has somewhere to start;
Calibrator measures the real thing on real site data and the settings form shows both, marking
which is which.