README 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. zram: Compressed RAM based block devices
  2. ----------------------------------------
  3. * Introduction
  4. The zram module creates RAM based block devices named /dev/zram<id>
  5. (<id> = 0, 1, ...). Pages written to these disks are compressed and stored
  6. in memory itself. These disks allow very fast I/O and compression provides
  7. good amounts of memory savings. Some of the usecases include /tmp storage,
  8. use as swap disks, various caches under /var and maybe many more :)
  9. Statistics for individual zram devices are exported through sysfs nodes at
  10. /sys/block/zram<id>/
  11. Kconfig required:
  12. CONFIG_ZRAM=y
  13. CONFIG_CRYPTO_LZ4=y
  14. CONFIG_ZPOOL=y
  15. CONFIG_ZSMALLOC=y
  16. ZRAM Testcases
  17. --------------
  18. zram_lib.sh: create library with initialization/cleanup functions
  19. zram.sh: For sanity check of CONFIG_ZRAM and to run zram01 and zram02
  20. Two functional tests: zram01 and zram02:
  21. zram01.sh: creates general purpose ram disks with ext4 filesystems
  22. zram02.sh: creates block device for swap
  23. Commands required for testing:
  24. - bc
  25. - dd
  26. - free
  27. - awk
  28. - mkswap
  29. - swapon
  30. - swapoff
  31. - mkfs/ mkfs.ext4
  32. For more information please refer:
  33. kernel-source-tree/Documentation/blockdev/zram.txt