zramctl
(8)set up and control zram devices
Options
12-a--algorithmSet the compression algorithm to be used for compressing data in the zram device. The list of supported algorithms could be inaccurate as it depends on the current kernel configuration. A basic overview can be obtained by using the command "cat /sys/block/zram0/comp_algorithm"; however, please note that this list might also be incomplete. This is due to the fact that ZRAM utilizes the Crypto API, and if certain algorithms were built as modules, it becomes impossible to enumerate all of them.
-f--findFind the first unused zram device. If a --size argument is present, then initialize the device.
-n--noheadingsDo not print a header line in status output.
-o--outputlistDefine the status output columns to be used. If no output arrangement is specified, then a default set is used. Use --help to get a list of all supported columns. The default list of columns may be extended if list is specified in the format +list (e.g., zramctl -o+COMP-RATIO).
-p--algorithm-paramsSet the algorithm parameters, for example, level=9 dict=/etc/dictionary to set compression level and pre-trained dictionary. Parameters are algorithm specific.
--output-allOutput all available columns.
--rawUse the raw format for status output.
-r--resetReset the options of the specified zram device(s). Zram device settings can be changed only after a reset.
-s--sizesizeCreate a zram device of the specified size. Zram devices are aligned to memory pages; when the requested size is not a multiple of the page size, it will be rounded up to the next multiple. When not otherwise specified, the unit of the size parameter is bytes. The size argument may be followed by the multiplicative suffixes KiB (=1024), MiB (=1024*1024), and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB") or the suffixes KB (=1000), MB (=1000*1000), and so on for GB, TB, PB, EB, ZB and YB.
-t--streamsnumberSet the maximum number of compression streams that can be used for the device. The default is use all CPUs and one stream for kernels older than 4.6.
-h--helpDisplay help text and exit.
-V--versionDisplay version and exit.
DESCRIPTION
zramctl is used to quickly set up zram device parameters, to reset zram devices, and to query the status of used zram devices.
If no option is given, all non-zero size zram devices are shown.
Note that zramdev node specified on command line has to already exist. The command zramctl creates a new /dev/zram<N> nodes only when --find option specified. It’s possible (and common) that after system boot /dev/zram<N> nodes are not created yet.
EXIT STATUS
FILES
EXAMPLE
AUTHORS
Timofey Titovets nefelim4ag@gmail.com, Karel Zak kzak@redhat.com
SEE ALSO
Linux kernel documentation https://docs.kernel.org/admin-guide/blockdev/zram.html
REPORTING BUGS
For bug reports, use the issue tracker https://github.com/util-linux/util-linux/issues.
AVAILABILITY
The zramctl command is part of the util-linux package which can be downloaded from Linux Kernel Archive https://www.kernel.org/pub/linux/utils/util-linux/.