zram

From Wikipedia, the free encyclopedia
Jump to: navigation, search

zram is a module of the Linux kernel, previously called "compcache". zram increases performance by avoiding paging on disk and instead uses a compressed block device in RAM in which paging takes place until it is necessary to use the swap space on the hard disk drive. Since using RAM is an alternative way to provide swapping on RAM, zram allows Linux to make more use of RAM when swapping/paging is required, especially on older computers with less RAM installed.[1][2]

Despite the cost of RAM being relatively low (as of February 2014), zram still offers advantages for embedded devices, netbooks and similar low-end hardware devices. Such devices usually use flash-based storage which has a limited lifespan due to its nature, so avoiding its usage for providing swap space prevents it from wearing out quickly. Also, using zram results in a significantly reduced I/O for Linux systems that require swapping.[3][4]

zram was merged into the Linux kernel mainline in kernel version 3.14, released on 30 March 2014.[5]

Use[edit]

  • Google uses zram in Chrome OS and it is also available as an option for Android 4.4 devices.[6][7]
  • Ubuntu is considering enabling zram by default on machines with less RAM installed.[8]
  • Lubuntu started using zram with version 13.10.[9]

See also[edit]

References[edit]

  1. ^ "Increased performance in Linux with zram (virtual swap compressed in ram)". Web Upd8. 2 October 2011. Retrieved 8 November 2011. 
  2. ^ Google Code (27 April 2010). "compcache Compressed Caching for Linux". Retrieved 11 November 2011. 
  3. ^ "ZRAM Might Finally Be Moved Out Of Linux Staging". phoronix.com. 2013-08-14. Retrieved 2014-02-09. 
  4. ^ "zRAM Is Still Hoping For A Promotion". phoronix.com. 2013-11-25. Retrieved 2014-02-09. 
  5. ^ "1.2. zram: Memory compression mechanism considered stable". Linux kernel 3.14. kernelnewbies.org. 2014-03-30. Retrieved 2014-04-01. 
  6. ^ Larabel, Michael (28 March 2013). "Google is Enabling zram for Chrome OS By Default". Chrome Story. Retrieved 29 March 2013. 
  7. ^ Google, Android KitKat | Android Developers
  8. ^ Dinsan, Francis (8 December 2012). "Ubuntu Linux Considers Greater Usage of zRAM". Retrieved 30 October 2013. 
  9. ^ "Next Lubuntu provided with zram enabled! – LinuxVillage (en)". Linuxvillage.org. 17 October 2013. Retrieved 10 November 2013. 

External links[edit]