Global Information Lookup Global Information

Zram information


zram
Initial releaseMarch 30, 2014; 10 years ago (2014-03-30) (Linux 3.14)
Written inC
Operating systemLinux
TypeLinux kernel features
LicenseGNU General Public License
Websitewww.kernel.org

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 general-purpose RAM disk. The two most common uses for zram are for the storage of temporary files (/tmp) and as a swap device. Initially, zram had only the latter function, hence the original name "compcache" ("compressed cache"). Unlike swap, zram only uses 0.1% of the maximum size of the disk when not in use.[1]

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.[2] 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"),[3] Zstandard (ZSTD), 842 (842). From kernel 5.1, the default is LZO-RLE,[3] which has a balance of speed and compression ratio. Like most other system parameters, the compression algorithm can be selected via sysfs.[4]

When used as a compressed swap space, zram is similar to zswap, which is not a general-purpose RAM disk, but rather an in-kernel compressed cache for swap pages. Until the introduction of CONFIG_ZRAM_WRITEBACK in kernel version 4.14, unlike zswap, zram was unable to use a storage device as a backing store, so it was unable to move less-frequently used pages to disk. However, zswap always requires a backing store, which is not the case for zram.

When used for swap, zram (like zswap) allows Linux to make more efficient use of RAM, since the operating system can then hold more pages of memory in the compressed swap than if the same amount of RAM had been used as application memory or disk cache. This is particularly effective on machines that do not have much memory.[5][6] In 2012, Ubuntu briefly considered enabling zram by default on computers with small amounts of installed RAM.[7] For this same reason, Fedora enabled zram by default starting with release 33.[8]

Using compressed swap space with zram or zswap also offers advantages for low-end hardware devices such as embedded devices and netbooks. Such devices usually use flash-based storage, which has limited lifespan due to write amplification, and may also use it to provide swap space. Using zram or zswap reduces the swap usage, which effectively reduces the amount of wear placed on flash-based storage and makes it last longer. Using zram also results in significantly reduced I/O for Linux systems that require swapping.[9][10]

  1. ^ "zram: Compressed RAM-based block devices — The Linux Kernel documentation". docs.kernel.org. Retrieved February 25, 2024.
  2. ^ "Linux kernel 3.14, Section 1.2. zram: Memory compression mechanism considered stable". kernelnewbies.org. March 30, 2014. Retrieved April 1, 2014.
  3. ^ a b "ZRAM Will See Greater Performance On Linux 5.1 - It Changed Its Default Compressor - Phoronix". www.phoronix.com.
  4. ^ "Linux kernel 3.15, Section 1.7. zram: LZ4 compression support, improved performance". kernelnewbies.org. June 8, 2014. Retrieved June 15, 2014.
  5. ^ "Increased performance in Linux with zram (virtual swap compressed in ram)". webupd8.org. October 2, 2011. Retrieved November 8, 2011.
  6. ^ "compcache Compressed Caching for Linux". code.google.com. April 27, 2010. Retrieved November 11, 2011.
  7. ^ Dinsan, Francis (December 8, 2012). "Ubuntu Linux Considers Greater Usage of zRAM". Retrieved October 30, 2013.
  8. ^ "Fedora 33 Looking To Use Swap On zRAM By Default With systemd's zram-generator - Phoronix". www.phoronix.com. Retrieved March 29, 2021.
  9. ^ "ZRAM Might Finally Be Moved Out Of Linux Staging". Phoronix. August 14, 2013. Retrieved February 9, 2014.
  10. ^ "zRAM Is Still Hoping For A Promotion". Phoronix. November 25, 2013. Retrieved February 9, 2014.

and 10 Related for: Zram information

Request time (Page generated in 0.5105 seconds.)

Zram

Last Update:

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...

Word Count : 703

Zswap

Last Update:

is zram, which provides a similar but still different "swap compressed pages to RAM" mechanism to the Linux kernel. The main difference is that zram provides...

Word Count : 1129

Android version history

Last Update:

Optimizations for performance on devices with lower specifications, including zRAM support and "low RAM" device API. Wireless printing capability. NFC host...

Word Count : 9288

15 Puzzle

Last Update:

Brüngger, A. Marzetta, K. Fukuda and J. Nievergelt, The parallel search bench ZRAM and its applications, Annals of Operations Research 90 (1999), pp. 45–63...

Word Count : 2069

Linux kernel version history

Last Update:

(Mailing list). Retrieved 14 August 2014. "Linux kernel 3.15, Section 1.7. zram: LZ4 compression support, improved performance". kernelnewbies.org. 8 June...

Word Count : 7804

Android KitKat

Last Update:

devices and modify their functionality accordingly. KitKat also supports zram. WebView components were updated to utilize a version of the Google Chrome...

Word Count : 1678

Fedora Linux release history

Last Update:

(also referred to as the "Application Stream" or AppStream), Gnome 3.30, ZRAM for ARM images, Fedora Scientific Vagrant images Fedora 30 was released on...

Word Count : 4443

Virtual memory compression

Last Update:

and therefore takes less time. In some implementations, including zswap, zram and Helix Software Company’s Hurricane, the entire process is implemented...

Word Count : 2916

Rust for Linux

Last Update:

Framebuffer LVM KMS driver Netfilter Netlink nftables Network scheduler perf SLUB zram zswap Process and I/O schedulers: Brain Fuck Scheduler Completely Fair Scheduler...

Word Count : 535

Lubuntu

Last Update:

Chromium. This release also used LightDM for screen locking and included zRam. In reviewing the beta release in September 2013, Joey Sneddon of OMG Ubuntu...

Word Count : 12231

PDF Search Engine © AllGlobal.net