Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
[deliverable/linux.git] / drivers / staging / zram / zram.txt
CommitLineData
00ac9ba0
NG
1zram: Compressed RAM based block devices
2----------------------------------------
47f9afb3
NG
3
4Project home: http://compcache.googlecode.com/
5
6* Introduction
7
00ac9ba0
NG
8The zram module creates RAM based block devices: /dev/ramX (X = 0, 1, ...).
9Pages written to these disks are compressed and stored in memory itself.
10These disks allow very fast I/O and compression provides good amounts of
11memory savings.
47f9afb3 12
00ac9ba0
NG
13See project home for use cases, performance numbers and a lot more.
14
15Individual zram devices are configured and initialized using zramconfig
16userspace utility as shown in examples below. See zramconfig man page for
17more details.
47f9afb3
NG
18
19* Usage
20
00ac9ba0 21Following shows a typical sequence of steps for using zram.
47f9afb3
NG
22
231) Load Modules:
00ac9ba0
NG
24 modprobe zram num_devices=4
25 This creates 4 (uninitialized) devices: /dev/zram{0,1,2,3}
47f9afb3
NG
26 (num_devices parameter is optional. Default: 1)
27
282) Initialize:
00ac9ba0
NG
29 Use zramconfig utility to configure and initialize individual
30 zram devices. For example:
31 zramconfig /dev/zram0 --init # uses default value of disksize_kb
32 zramconfig /dev/zram1 --disksize_kb=102400 # 100MB /dev/zram1
47f9afb3 33
00ac9ba0 34 *See zramconfig man page for more details and examples*
47f9afb3
NG
35
363) Activate:
00ac9ba0
NG
37 mkswap /dev/zram0
38 swapon /dev/zram0
39
40 mkfs.ext4 /dev/zram1
41 mount /dev/zram1 /tmp
47f9afb3
NG
42
434) Stats:
00ac9ba0
NG
44 zramconfig /dev/zram0 --stats
45 zramconfig /dev/zram1 --stats
47f9afb3
NG
46
475) Deactivate:
00ac9ba0
NG
48 swapoff /dev/zram0
49 umount /dev/zram1
47f9afb3
NG
50
516) Reset:
00ac9ba0
NG
52 zramconfig /dev/zram0 --reset
53 zramconfig /dev/zram1 --reset
54 (This frees memory allocated for the given device).
47f9afb3
NG
55
56
57Please report any problems at:
58 - Mailing list: linux-mm-cc at laptop dot org
59 - Issue tracker: http://code.google.com/p/compcache/issues/list
60
61Nitin Gupta
62ngupta@vflare.org
This page took 0.134482 seconds and 5 git commands to generate.