Lines Matching refs:zram

2 zram: Compressed RAM-based block devices
8 The zram module creates RAM-based block devices named /dev/zram<id>
14 Statistics for individual zram devices are exported through sysfs nodes at
15 /sys/block/zram<id>/
20 There are several ways to configure and manage zram device(-s):
22 a) using zram and zram_control sysfs attributes
25 In this document we will describe only 'manual' zram configuration steps,
26 IOW, zram and zram_control sysfs attributes.
30 that zram maintainers do not develop/maintain util-linux or zramctl, should
33 Following shows a typical sequence of steps for using zram.
41 zram sysfs attributes always return negative values in case of errors.
47 -ENOMEM zram was not able to allocate enough memory to fulfil your
69 modprobe zram num_devices=4
71 This creates 4 devices: /dev/zram{0,1,2,3}
73 num_devices parameter is optional and tells zram how many devices should be
94 algorithms that are supported by zram.
143 There is little point creating a zram of greater than twice the size of memory
144 since we expect a 2:1 compression ratio. Note that zram uses about 0.1% of the
145 size of the disk when not in use so a huge zram is wasteful.
177 7) Add/remove zram devices
180 zram provides a control interface, which enables dynamic (on-demand) device
185 can use /dev/zram<id>) or an error code.
189 cat /sys/class/zram-control/hot_add
195 echo X > /sys/class/zram-control/hot_remove
200 Per-device statistics are exported as various nodes under /sys/block/zram<id>/
203 please read Documentation/ABI/testing/sysfs-block-zram.
214 writeback_limit WO specifies the maximum amount of write IO zram
220 debug_stat RO this file is used for zram debugging purposes
221 backing_dev RW set up backend storage for zram to write out
228 File /sys/block/zram<id>/stat
233 File /sys/block/zram<id>/io_stat
236 layer and, thus, not available in zram<id>/stat file. It consists of a
258 File /sys/block/zram<id>/mm_stat
274 mem_used_max the maximum amount of memory zram has consumed to
280 huge_pages_since the number of incompressible pages since zram set up
283 File /sys/block/zram<id>/bd_stat
323 With CONFIG_ZRAM_WRITEBACK, zram can write idle/incompressible page
334 To use idle page writeback, first, user need to declare zram pages
339 From now on, any pages on zram are idle pages. The idle mark
355 With the command, zram will writeback idle pages from memory to the storage.
367 If an admin wants to write a specific page in zram device to the backing device,
376 To overcome the concern, zram supports "writeback_limit" feature.
383 Once writeback_limit_enable is set, zram doesn't allow any writeback
412 The writeback_limit count will reset whenever you reset zram (e.g.,
414 writeback happened until you reset the zram to allocate extra writeback
423 With CONFIG_ZRAM_MULTI_COMP, zram can recompress pages using alternative
432 With CONFIG_ZRAM_MULTI_COMP, zram supports up to 4 compression algorithms:
433 one primary and up to 3 secondary ones. Primary zram compressor is explained
471 threshold (in bytes) to the recompress knob: zram will recompress only pages
480 It is also possible to limit the number of pages zram re-compression will
513 zram block. It could be useful to catch cold or incompressible
517 /sys/kernel/debug/zram/zram0/block_state". The output is as follows::
526 zram's block index.