Use this when compression may slow or speed up storage I/O.
Compression Performance
Compression performance is the CPU cost and speed of compressing and decompressing data. Fast algorithms like LZ4 often increase effective throughput, because less data hits the disk; heavy levels trade speed for ratio.
1. Compression can raise throughput (less I/O) or limit it (CPU).
2. Measure with real data.
3. High levels slow writes.
4. Decompression usually fast.
5. Watch CPU on storage nodes.
data → CPU compression → I/O
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- Testing with incompressible data.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Less data written can mean faster I/O.
- Heavy levels cost CPU and latency.
- Decompression is usually faster than compression.
top / mpstat 1— CPU during writesfio with/without compression— throughputzfs get compressratio— gain
ReferenceHow it works1 section · depth on demand
Reference
| Algorithm | Compress speed (approx.) |
|---|---|
| LZ4 | 500+ MB/s per core |
| ZSTD-1 | ~400 MB/s |
| ZSTD-19 | Few MB/s |
| GZIP-6 | ~50 MB/s |
Indicative ranges; measure on your CPU.
ReferenceImportant terms & boundaries2 sections · depth on demand
How it works
Compression costs CPU on writes (and a little on reads); fast algorithms are usually limited by disk speed, slow high-ratio ones by CPU. Measure throughput and CPU together when choosing levels.
Reference
Measure CPU and throughput with and without compression. High ZSTD levels can bottleneck on CPU during writes; reads stay fast.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Compression → Compression Performance. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://openzfs.github.io/openzfs-docs/man/master/7/zfsprops.7.html · confidence 94%