zswap · shipping · also Linux zswap, Compressed swap cache

zswap

zswap is a Linux compressed-memory cache for swap pages that can defer writes to a backing swap device.

Related Observatory article: zswap on hesela.com

The swap subsystem offers pages to a dynamically allocated compressed pool; zswap is not a separate block device. Eviction can send pages to backing swap, so enabling the cache does not guarantee zero storage writes. Compression uses CPU time, and its benefit depends on the workload. [1]

Disabling zswap at runtime stops new stores but does not immediately empty existing compressed entries. Cached pages remain until invalidated or faulted back into memory. [1]

Accounting consequence: each cached page retains a swap entry identified by its swap type and offset. The compressed pool therefore does not add swap address capacity to the configured backing area. [1]

Relations

related
tmpfs, zram, Swapfile

Citations

  1. Linux 6.12: zswap, backing swap and runtime disabling (accessed 2026-11-14)
Sources & caveats
  • Linux 6.12 documentation: overview and design sections. Configuration and distribution defaults may differ.
  • The capacity distinction is inferred from the documented swap-entry-to-pool mapping, not from a capacity or memory-pressure experiment.

JSON: /data/terms/zswap.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. zswap. Hesela. 2026-11-14. https://hesela.dev/terms/zswap/