Zswap
Linux memory compression feature

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 compresses them and then stores them in a memory pool dynamically allocated in the system RAM. This way, writeback to the actual swap device is deferred or even completely avoided, resulting in a significantly reduced I/O load for 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 using it as swap space extends its lifespan.
Internals
zswap is integrated into the Linux kernel's virtual memory subsystem using the API provided by frontswap, which is a kernel mechanism that abstracts various types of storage that can be used as swap space. As a result, zswap operates as a backend driver for frontswap by providing a pseudo-RAM device that is exposed internally. In other words, the frontswap API allows zswap to intercept memory pages while they are being swapped out, and to intercept page faults for the already swapped pages; the access to those two paths allows zswap to act as a compressed write-back cache for swapped pages.
Internally, zswap uses compression modules provided by the Linux kernel's crypto API, which makes it possible, for example, to offload the compression tasks from the main CPU to any hardware compression accelerators supported by the Linux kernel. The selection of the desired compression module can be performed dynamically at boot time through the kernel boot parameter zswap.compressor; if not specified, it selects the Lempel–Ziv–Oberhumer (LZO) compression. As of version 3.13 of the Linux kernel, zswap also needs to be explicitly enabled by setting the kernel boot parameter zswap.enabled; however, it can be enabled by default when configuring the kernel with CONFIG_ZSWAP_DEFAULT_ON=y, or it can be enabled at any point via the sysfs interface:
echo 1 > /sys/module/zswap/parameters/enabled
The maximum size of the memory pool used by zswap is configurable through the sysfs parameter max_pool_percent, which specifies the maximum percentage of total system RAM that can be occupied by the pool.
The public source identifies “Zswap” as linux memory compression feature. This brief keeps that definition visible, then builds a research path around Zswap, Linux and memory.
Why this record matters
A short description can identify a subject without explaining its stakes. For “Zswap”, the useful work is to connect “linux memory compression feature” to the records capable of establishing context and consequence.
The citation trail is more important than the brevity of the summary: it shows where individual claims can be examined in context. The source revision retrieved here is dated Jul 7, 2026. The linked authority identifier is Q17091159. None of the 0 selected statements returned an explicit reference.
The absence of detail may reflect summary conventions rather than a lack of surviving documentation. The source lead contains qualifying language; that uncertainty should survive quotation, summary and reuse. Authority statements aid reconciliation but still require their own references, qualifiers and ranks to be checked.
How to read it
Use the entry as an orientation point, then follow its citations and revision history. Names, dates and institutional relationships should be checked against the original record.
- Subject orientation
- Search vocabulary
- Locating named sources
The closest primary source, responsible institution and strongest cited specialist reference.
Three-step research path
- Establish the record: confirm the title “Zswap”, its source revision and the description used here.
- Expand the search: follow Zswap primary sources, Zswap archive and Zswap research across catalogues and specialist indexes.
- Test the account: compare the strongest cited source with the responsible institution’s current record and note any disagreement.
Questions for further research
- Which source most directly establishes the central claim about “Zswap”?
- What terminology or title could unlock a more precise catalogue search?
- Which institution is responsible for the underlying evidence?
Search terms from this dossier
This entry incorporates text from “Zswap” on English Wikipedia. Contributors are listed in the page history. Text is available under the Creative Commons Attribution-ShareAlike 4.0 License. Selected authority identifiers and statements are retrieved from Wikidata under CC0; their references and qualifiers remain part of the verification path.