zstd Storage Compression
SeaweedFS Enterprise compresses newly written data with zstd by default, instead of the open source gzip codec. Zstandard gives you a better compression ratio and dramatically faster reads, with full backward compatibility — no configuration required.
The codec only affects new writes. Existing gzip data keeps reading exactly as before, gzip and zstd data coexist, and there is nothing to migrate.
When to use it
- Read-heavy clusters — zstd decodes several times faster than gzip, lowering read latency and CPU on the hot path.
- Cost-sensitive storage — zstd typically compresses text, logs, JSON, and CSV 10–30% smaller, and the savings compound across replication and erasure coding.
- Archival tiers — turn the level up for a higher ratio when CPU is cheap and data is cold.
- Gradual adoption — gzip and zstd data coexist, so you can roll zstd out without migrating anything.
How to use it
zstd is the default, so most deployments need no configuration — new data is compressed with zstd automatically. To tune or opt out, two per-process flags are available:
-compression.level— raise it for a smaller output at more CPU (e.g.19for cold data), lower it for speed.-compression.method=gzip— opt back out to gzip.
# Default: new data is compressed with zstd automatically — no flag needed
weed volume -dir=/data -mserver=master:9333
# Tune the zstd level for a colder dataset (higher ratio, more CPU)
weed filer -master=master:9333 -compression.level=19
Upgrade all volume servers to the enterprise binary before rolling zstd out to writers. Reading zstd never requires a license, but open source SeaweedFS cannot read zstd data.
Benefits
- Lower storage cost — zstd typically compresses smaller than gzip, and the savings compound across replication and erasure coding.
- Faster reads — zstd decodes several times faster than gzip.
- No migration — existing gzip data keeps reading, and gzip and zstd data coexist.
- Zero-risk reads — reading never requires a license, so data stays readable across license changes and gradual rollouts.
- On by default — used automatically with no configuration; tune with
-compression.levelor opt out with-compression.method=gzip.
Want the internals — the gzip vs zstd comparison, the full flag reference, rollout and downgrade rules, and license behavior? See the zstd Storage Compression technical reference.