Skip to content
EntityQ17091159· pop 7· linked from 160 articles

zswap is a Linux kernel feature that provides a compressed write-back cache for swapped pages, as a form of virtual memory compression. Instead of moving memory pages to a swap device when they are to be swapped out, zswap performs their compression and then stores them into a memory pool dynamically allocated in the system RAM. Later writeback to the actual swap device is deferred or even completely avoided, resulting in a significantly reduced I/O for Linux systems that require swapping; the tradeoff is the need for additional CPU cycles to perform the compression.

Described at

Link to a page describing this subject · 6,323 chars · not written by Vinony

~6 min read

Encyclopedic overview

5 sections
Contents
  • {{Anchor|FRONTSWAP|ZBUD|ZSMALLOC}}Internals
  • History
  • {{Anchor|VS-OTHERS}}Alternatives
  • See also
  • References

zswap is a Linux kernel feature that provides a compressed write-back cache for swapped pages, as a form of virtual memory compression. Instead of moving memory pages to a swap device when they are to be swapped out, zswap performs their compression and then stores them into a memory pool dynamically allocated in the system RAM. Later writeback to the actual swap device is deferred or even completely avoided, resulting in a significantly reduced I/O for Linux systems that require swapping; the tradeoff is the need for additional CPU cycles to perform the compression.

As a result of reduced I/O, zswap offers advantages to various devices that use flash-based storage, including embedded devices, netbooks and similar low-end hardware devices, as well as to other devices that use solid-state drives (SSDs) for storage. Flash memory has a limited lifespan due to its nature, so avoiding it to be used for providing swap space prevents it from wearing out quickly.

Excerpted from Wikipedia’s “zswap” article, available under the CC BY-SA 4.0 licence.

Available in 7 languages

via Wikidata sitelinks · CC0