Compression ratio
Compression ratio divides the byte count before compression by the corresponding byte count after compression, using a declared accounting scope.
Convention: With input B and output C, the convention is B / C, not the retained fraction C / B. SNIA uses the uncompressed-to-compressed convention. A 2:1 ratio means half the input bytes remain; a ratio below 1:1 indicates expansion. [1]
Accounting: Specify whether output includes format headers, dictionaries, padding and allocation overhead. The selected byte population and compression settings belong with the ratio. No finite ratio exists when the denominator is zero; an empty input and empty output give 0/0, not an observed saving.
Product scope: For non-snapshots, OpenZFS 2.3 distinguishes compressratio for used space from refcompressratio for referenced space; descendants and clone sharing affect the former. These are not interchangeable observations. [2]
Selected data: A reported compression ratio may cover only data selected as compressible. Do not silently extend that result to excluded bytes. [3]
Composition: In a deduplication-then-compression model, measure compression on the retained unique data. Multiplying a ratio for all original copies by a deduplication ratio can count overlapping savings twice. The linked capacity analysis provides an exact constructed counterexample, not a compressor benchmark.
Relations
- related
- Data-reduction ratio, Lossless compression, Transparent filesystem compression, Deduplication ratio
Citations
- SNIA Dictionary: compression ratio and data deduplication ratio, generated 17 November 2026
- OpenZFS 2.3 zfsprops(7): compressratio, refcompressratio and logicalused
- Broadcom KB 315553: vSAN ESA 9.1 space-efficiency counter populations
Sources & caveats
- Definition and accounting guidance are an original synthesis; ratios describe byte sizes, not fidelity, throughput, restore speed or future capacity.
- No native compressor, ZFS pool or vSAN experiment was run for this entry.
- The selected-population example follows Broadcom's vSAN ESA 9.1 counter definitions, not a universal convention. [3]