Skip to content
EntityQ609431· pop 13· linked from 167 articles

zram, formerly called compcache, is a Linux kernel module for creating a compressed block device in RAM, i.e. a RAM disk with on-the-fly disk compression. The block device created with zram can then be used for swap or as a general-purpose RAM disk. The two most common uses for zram are for the storage of temporary files () and as a swap device. Initially, zram had only the latter function, hence the original name "compcache" ("compressed cache"). When empty, zram block device allocates about 0.1% of its size.

Key facts

Software.name
zram
Software.title
zram
Software.screenshot
Example of zram on Linux screenshot.webp
Software.caption
Screenshot of zram running on openSUSE Tumbleweed
Software.released
(Linux 3.14)
Software.programming language
C
Software.operating system
Linux
Software.genre
Linux kernel features
Software.license
GNU General Public License

via Wikipedia infobox

Described at

Link to a page describing this subject · 12,770 chars · not written by Vinony

Wikidata facts

Image
Example of zram on Linux screenshot.webp
Show 1 more fact
Sources (2)

via Wikidata · CC0

~4 min read

Article

4 sections
Contents
  • Usage by Android
  • See also
  • References
  • External links

zram, formerly called compcache, is a Linux kernel module for creating a compressed block device in RAM, i.e. a RAM disk with on-the-fly disk compression. The block device created with zram can then be used for swap or as a general-purpose RAM disk. The two most common uses for zram are for the storage of temporary files () and as a swap device. Initially, zram had only the latter function, hence the original name "compcache" ("compressed cache"). When empty, zram block device allocates about 0.1% of its size.

After four years in the Linux kernel's driver staging area, zram was introduced into the mainline Linux kernel in version 3.14, released on March 30, 2014. From Linux kernel version 3.15 onwards (released on June 8, 2014), zram supports multiple compression streams and multiple compression algorithms. Compression algorithms include DEFLATE (DEFLATE), LZ4 (LZ4, and LZ4HC "high compression"), LZO (LZO-RLE "run-length encoding"), Zstandard (ZSTD), 842 (842). From kernel 5.1, the default is LZO-RLE, which has a balance of speed and compression ratio. Like most other system parameters, the compression algorithm can be selected via sysfs.

Connections

Categories