Pcornel
Storage · Compression

Inline Compression

Cheat sheet · https://pcornel.dk/topic.php?topic=4305

Back to the Topic

Answer

Inline compression compresses data as it is written, before it reaches disk, so the saving is immediate and fewer bytes are written. It costs CPU on the write path, unlike post-process compression.

Remember

  • Savings are immediate.
  • Fewer bytes are written to disk.
  • It adds CPU on every write.

First checks

  • zfs set compression=lz4 <ds> — inline ZFS
  • mount -o compress=zstd:3 <dev> <mnt> — Btrfs inline
  • array inline compression — vendor

Verify in this order

write → compress inline → stored

Where it usually breaks

First mismatch in media/provider → controller/pool → logical object → path/protocol → filesystem/share/object namespace → consumer workload; preserve identity/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4305

Confirmation

Confirm action

Continue?