aboutsummaryrefslogtreecommitdiff
path: root/README
blob: c59c53e04cb0516a6c41dfeae41995ab75cab67b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
zram: Compressed RAM based block devices
----------------------------------------
* Introduction

The zram module creates RAM based block devices named /dev/zram<id>
(<id> = 0, 1, ...). Pages written to these disks are compressed and stored
in memory itself. These disks allow very fast I/O and compression provides
good amounts of memory savings. Some of the usecases include /tmp storage,
use as swap disks, various caches under /var and maybe many more :)

Statistics for individual zram devices are exported through sysfs nodes at
/sys/block/zram<id>/

ZRAM Testcases
--------------
zram_lib.sh: create library with initialization/cleanup functions

Two functional tests: zram01 and zram02:
zram01.sh: creates general purpose ram disks with ext4 filesystems
zram02.sh: creates block device for swap

Kconfig required:
CONFIG_ZRAM=y
CONFIG_ZRAM_LZ4_COMPRESS=y
CONFIG_ZPOOL=y
CONFIG_ZSMALLOC=y

For more information please refer:
kernel-source-tree/Documentation/blockdev/zram.txt