Skip to content
WebsiteHosting.com

concept Data & storage

Storage compression and effective capacity

Raw disk size sets a space limit, not a compression ratio. Effective capacity depends on how much of each kind of data you store, the ratio each achieves, and the space needed for metadata.

Latest recorded source check · P0229

What it means

A disk’s raw size limits how much can fit; it does not determine how well the data compresses. At 3:1, three logical units of data occupy one physical unit. At 1:1, those same three units need three physical units. How much logical data you can store therefore depends on the mix of segments and the space their metadata occupies.

To calculate the effective ratio, work in physical units first: divide each segment’s logical size by its own ratio, add those physical sizes, then add metadata. Divide the total logical size by that final physical amount.

Try it

The simulation uses synthetic inputs in abstract capacity units. You supply the ratios; it does not run a compressor on your files. Start with these values:

Storage compression and effective capacity

Vary compressible and incompressible synthetic segments with declared ratios and metadata overhead; calculate physical capacity and show unknown CPU cost.

Simulation

Synthetic inputs only. This is not a measurement of your hardware or service.

Computed under the stated assumptions

Add each segment’s logical amount divided by its own declared ratio, then add metadata. Do not average the segment ratios.

Storage compression and effective capacity: synthetic scenario inputs

Scenario: Starting example

Each preset replaces all fields. Editing any field preserves the other values exactly, including invalid entries.

Weighted capacity, not average ratios

Total logical amount
100 units
Data plus metadata
65/1 units
Total logical / total physical
20/13
CPU cost
unmeasured
Apply each segment ratio separately
SegmentPhysical amount
A20/1 units
B40/1 units

Evaluated evidence

Segment A logical size (abstract capacity units)
60
Segment B logical size (abstract capacity units)
40
Segment A logical-to-physical ratio
3
Segment B logical-to-physical ratio
1
Additional metadata (abstract capacity units)
5

Abstract capacity units; compression algorithms, allocation rounding and CPU cost are not evaluated.

About this model

Every input is local synthetic evidence. Numbers stay as raw text until this model validates them. The shown evaluated values come from the same result as the explanation.

Presets replace the entire scenario. Reset restores all starting fields, scenario selection and model state; it does not change the open or closed state of this help or article FAQ.

No external request, device command, stored-input history or measurement is performed.

  • Segment A logical size is 60 and Segment A logical-to-physical ratio is 3. Segment A occupies 60/3 = 20 physical units.
  • Segment B logical size is 40 and Segment B logical-to-physical ratio is 1. Segment B occupies 40/1 = 40 physical units.
  • Additional metadata is 5. The data occupies 60 physical units, but Data plus metadata is 20 + 40 + 5 = 65 units.

Total logical / total physical is 100/65 = 20/13, or about 1.54:1. Averaging 3 and 1 would give 2:1 and predict 50 units for the data, even though the segments need 60 before metadata.

Choose Use incompressible segments to change A’s ratio to 1 while keeping the sizes and metadata fixed. The effective ratio falls below 1:1: 100 logical units now occupy 105 physical units, for a ratio of 20/21. Neither segment expanded; the extra five units are metadata.

Choose Inspect the evidence boundary to set A’s ratio to unknown. Physical usage and the effective ratio are then unknown. That is different from 1, which explicitly assumes no reduction.

For custom inputs, enter sizes and metadata as whole-number decimal strings from 0 through 1000000, with a nonzero total logical size. Each ratio accepts a whole number from 1 through 100 or the word unknown. A zero ratio is invalid, and a size such as 60.000000000000000001 is rejected rather than rounded to 60. Reset restores all five defaults and the starting scenario, with no prior steps, elapsed simulation time, errors, history or comparison carried over.

In practice

Use measured or otherwise justified ratios for the mix you expect to store. An already compressed segment may save no further space, and a label such as “encrypted” does not establish a ratio. The Linux 6.12 VDO design describes storing data without a compression saving when it cannot be compressed or packed. The OpenZFS 2.3 property documentation describes sector rounding and compression thresholds that this calculation leaves out.

This is an estimate of space at rest, not transfer savings or a performance benchmark. CPU cost, latency and compression speed remain unmeasured. If the data mix changes, recalculate the physical units for each segment and add metadata before comparing the total with available space. Derive the dataset ratio from that total, not from an average of segment ratios.

Frequently asked questions

Editorial questions based on the listed sources and explicitly labeled local examples.

Why not average segment ratios?

Ratios are not additive. Convert each segment to physical usage first, then sum: 60/3 + 40/1 gives 60 units before metadata, not the result of applying an unweighted average ratio to 100 units.

Can encrypted data compress well?

The model cannot infer a ratio from an encrypted label. Supply measured or otherwise justified segment ratios, or leave the result unknown; it does not run a compressor on your data.

Does the calculation include CPU cost?

No. It calculates only abstract capacity from supplied ratios and overhead. It does not estimate CPU time, latency or compression/decompression speed.

Why can effective capacity change over time?

Changing the mixture of segment sizes and ratios changes the total physical usage. Actual filesystems also have allocation rules: the cited OpenZFS documentation describes sector rounding and thresholds that this abstract calculation excludes.

Sources & model boundaries

Primary references used for this explanation. The interactive example is an educational model, not a live check.

  1. OpenZFS zfsprops(7)

    dedup/verify; compression; compressratio. The verify dedup option compares block bytes after matching signatures. Compression ratios depend on actual data and allocation rules.

    Checked .

  2. Design of dm-vdo

    Theory; deduplication index; write path steps8 and11–13. VDO verifies candidate duplicate bytes, tracks shared references, and stores incompressible or unpackable data without a compression saving.

    Checked .

Report an issue. Include the article URL and ID, not passwords or access keys.