Model
When compression speeds up a read
A ratio above ~4× buys you almost nothing on the read path. Everyone chases ratio. The derivation says: chase decode speed.
- Pipe bandwidth
- the bandwidth of the pipe the data travels through (disk or network)
- Ratio
- the compression ratio
- Decode throughput
- the decode throughput, measured in output bytes per second
- Size
- bytes read, uncompressed
How it behaves
One input on the horizontal axis, the others held fixed.
Data table
| Compression ratio r | Decode speed ÷ pipe speed, at least |
|---|---|
| 1.1 | 11× |
| 1.14 | 8.28× |
| 1.18 | 6.68× |
| 1.22 | 5.63× |
| 1.26 | 4.88× |
| 1.3 | 4.33× |
| 1.34 | 3.9× |
| 1.39 | 3.56× |
| 1.44 | 3.28× |
| 1.49 | 3.05× |
| 1.54 | 2.86× |
| 1.59 | 2.7× |
| 1.64 | 2.55× |
| 1.7 | 2.43× |
| 1.76 | 2.32× |
| 1.82 | 2.22× |
| 1.88 | 2.14× |
| 1.94 | 2.06× |
| 2.01 | 1.99× |
| 2.08 | 1.93× |
| 2.15 | 1.87× |
| 2.22 | 1.82× |
| 2.3 | 1.77× |
| 2.38 | 1.73× |
| 2.46 | 1.69× |
| 2.54 | 1.65× |
| 2.63 | 1.62× |
| 2.72 | 1.58× |
| 2.81 | 1.55× |
| 2.9 | 1.53× |
| 3 | 1.5× |
| 3.1 | 1.48× |
| 3.21 | 1.45× |
| 3.32 | 1.43× |
| 3.43 | 1.41× |
| 3.55 | 1.39× |
| 3.67 | 1.37× |
| 3.79 | 1.36× |
| 3.92 | 1.34× |
| 4.06 | 1.33× |
| 4.2 | 1.31× |
| 4.34 | 1.3× |
| 4.49 | 1.29× |
| 4.64 | 1.27× |
| 4.8 | 1.26× |
| 4.96 | 1.25× |
| 5.13 | 1.24× |
| 5.3 | 1.23× |
| 5.48 | 1.22× |
| 5.67 | 1.21× |
| 5.86 | 1.21× |
| 6.06 | 1.2× |
| 6.27 | 1.19× |
| 6.48 | 1.18× |
| 6.7 | 1.18× |
| 6.93 | 1.17× |
| 7.17 | 1.16× |
| 7.41 | 1.16× |
| 7.66 | 1.15× |
| 7.92 | 1.14× |
| 8.19 | 1.14× |
| 8.47 | 1.13× |
| 8.76 | 1.13× |
| 9.06 | 1.12× |
| 9.37 | 1.12× |
| 9.69 | 1.12× |
| 10 | 1.11× |
| 10.4 | 1.11× |
| 10.7 | 1.1× |
| 11.1 | 1.1× |
| 11.4 | 1.1× |
| 11.8 | 1.09× |
| 12.2 | 1.09× |
| 12.7 | 1.09× |
| 13.1 | 1.08× |
| 13.5 | 1.08× |
| 14 | 1.08× |
| 14.5 | 1.07× |
| 15 | 1.07× |
| 15.5 | 1.07× |
| 16 | 1.07× |
Worked examples, recomputed
Every number the mechanisms quote for this relationship is recomputed from it, so none of them disagrees with it.
- r = 2 → 2×
- r = 4 → 1.33×
- r = 8 → 1.14×
- 10 GB, B = 5 GB/s, r = 4, D = 1 GB/s → 10.5 s
- D = 10 GB/s → 1.5 s, against 2 s uncompressed
- break-even D = 5 × 1.33 = 6.7 GB/s
- r = 1.35 → decode ≈ 3.86× the pipe
- local NVMe at 3 GB/s → ≈ 12 GB/s of decode
- 10 Gbps, r = 2 → the codec needs 2.5 GB/s
- 100 Gbps, r = 2 → more than 25 GB/s
Where it appears
Each mechanism states it in its own names. The general symbol each name stands for is shown with it.
- Encoding, Serialization & Compression
What do we turn our values into when we turn them into bytes, and what does that choice cost?
- Execution Engine Runtime
Once a query plan is chosen, why does the machine still sit idle, and what does each mechanism of a query runtime pay to buy that idle time back?
C (codec speed) = · BW (link) =