1 .TH ZRAMCTL 8 "July 2014" "util-linux" "System Administration"
3 zramctl \- set up and control zram devices
9 .BR zramctl " [options]"
19 Print name of first unused zram device:
29 .RB [ \-f " | "\fIzramdev\fP ]
41 is used to quickly set up zram device parameters, to reset zram devices, and to
42 query the status of used zram devices.
44 If no option is given, all non-zero size zram devices are shown.
46 Note that \fIzramdev\fP node specified on command line has to already exist. The command
48 creates a new /dev/zram<N> nodes only when \fB\-\-find\fR option specified. It's possible
49 (and common) that after system boot /dev/zram<N> nodes are not created yet.
52 .BR \-a , " \-\-algorithm lzo" | lz4 | lz4hc | deflate | 842
53 Set the compression algorithm to be used for compressing data in the zram device.
56 Find the first unused zram device. If a \fB\-\-size\fR argument is present, then
57 initialize the device.
59 .BR \-n , " \-\-noheadings"
60 Do not print a header line in status output.
62 .BR \-o , " \-\-output " \fIlist
63 Define the status output columns to be used. If no output arrangement is
64 specified, then a default set is used.
65 Use \fB\-\-help\fP to get a list of all supported columns.
68 Output all available columns.
71 Use the raw format for status output.
73 .BR \-r , " \-\-reset"
74 Reset the options of the specified zram device(s). Zram device settings
75 can be changed only after a reset.
77 .BR \-s , " \-\-size " \fIsize
78 Create a zram device of the specified \fIsize\fR.
79 Zram devices are aligned to memory pages; when the requested \fIsize\fR is
80 not a multiple of the page size, it will be rounded up to the next multiple.
81 When not otherwise specified, the unit of the \fIsize\fR parameter is bytes.
83 The \fIsize\fR argument may be followed by the multiplicative suffixes KiB (=1024),
84 MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB"
85 is optional, e.g., "K" has the same meaning as "KiB") or the suffixes
86 KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.
88 .BR \-t , " \-\-streams " \fInumber
89 Set the maximum number of compression streams that can be used for the device.
90 The default is one stream.
92 .BR \-V , " \-\-version"
93 Display version information and exit.
96 Display help text and exit.
100 returns 0 on success, nonzero on failure.
108 The following commands set up a zram device with a size of one gigabyte
109 and use it as swap device.
112 # zramctl --find --size 1024M
118 # zramctl --reset /dev/zram0
121 .UR http://git.\:kernel.\:org\:/cgit\:/linux\:/kernel\:/git\:/torvalds\:/linux.git\:/tree\:/Documentation\:/admin-guide\:/blockdev\:/zram.rst
122 Linux kernel documentation
126 Timofey Titovets <nefelim4ag@gmail.com>
127 Karel Zak <kzak@redhat.com>
130 The zramctl command is part of the util-linux package and is available from
131 https://www.kernel.org/pub/linux/utils/util-linux/.