Lines Matching +full:alternative +full:- +full:a

2 zram: Compressed RAM-based block devices
8 The zram module creates RAM-based block devices named /dev/zram<id>
20 There are several ways to configure and manage zram device(-s):
22 a) using zram and zram_control sysfs attributes
23 b) using zramctl utility, provided by util-linux (util-linux@vger.kernel.org).
28 In order to get a better idea about zramctl please consult util-linux
29 documentation, zramctl man-page or `zramctl --help`. Please be informed
30 that zram maintainers do not develop/maintain util-linux or zramctl, should
31 you have any questions please contact util-linux@vger.kernel.org
33 Following shows a typical sequence of steps for using zram.
45 -EBUSY an attempt to modify an attribute that cannot be changed once
47 -ENOMEM zram was not able to allocate enough memory to fulfil your
49 -EINVAL invalid input has been provided.
50 -EAGAIN re-try operation later (e.g. when attempting to run recompress
58 if [ $? -ne 0 ]; then
74 pre-created. Default: 1.
101 attribute which provides a per-algorithm params configuration.
104 In addition, certain compression algorithms support pre-trained dictionaries,
106 compression algorithm to use external pre-trained dictionary, pass full
109 #pass path to pre-trained zstd dictionary
116 #pass path to pre-trained zstd dictionary and compression level
120 Parameters are algorithm specific: not all algorithms support pre-trained
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.
180 zram provides a control interface, which enables dynamic (on-demand) device
183 In order to add a new /dev/zramX device, perform a read operation on the hot_add
189 cat /sys/class/zram-control/hot_add
192 To remove the existing /dev/zramX device (where X is a device id)
195 echo X > /sys/class/zram-control/hot_remove
200 Per-device statistics are exported as various nodes under /sys/block/zram<id>/
202 A brief description of exported device attributes follows. For more details
203 please read Documentation/ABI/testing/sysfs-block-zram.
236 layer and, thus, not available in zram<id>/stat file. It consists of a
243 invalid_io The number of non-page-size-aligned I/O requests
246 a) the number of pages freed because of swap slot free
250 sent to a swap block device when a swap slot is freed,
251 which implies that this disk is being used as a swap disk.
260 The mm_stat file represents the device's mm statistics. It consists of a single
285 The bd_stat file represents a device's backing device statistics. It consists of
286 a single line of text and contains the following stats separated by whitespace:
321 -------------------
323 zram has built-in support for idle pages tracking (that is, allocated but
333 a particular zram page::
341 ---------
360 Additionally, if a user choose to writeback only huge and idle pages
365 If a user chooses to writeback only incompressible pages (pages that none of
370 If an admin wants to write a specific page in zram device to the backing device,
371 they could write a page index into the interface::
378 `LOW-HIGH` range (or ranges) of pages to be written-back. This reduces the
379 number of syscalls, but more importantly this enables optimal post-processing
383 echo "page_indexes=1-100 page_indexes=200-300" > \
386 We also now permit multiple page_index params per call and a mix of
389 echo page_index=42 page_index=99 page_indexes=100-200 \
390 page_indexes=500-700 > /sys/block/zramX/writeback
409 If admin wants to limit writeback as per-day 400M, they could do it
437 If admin wants to measure writeback count in a certain period, they could
441 -------------
443 With CONFIG_ZRAM_MULTI_COMP, zram can recompress pages using alternative
444 (secondary) compression algorithms. The basic idea is that alternative
445 compression algorithm can provide better compression ratio at a price of
446 (potentially) slower compression/decompression speeds. Alternative compression
449 recompression - pages that are cold and sit in the memory can be recompressed
461 #1: lzo lzo-rle lz4 lz4hc [zstd]
462 #2: lzo lzo-rle lz4 [lz4hc] zstd
464 Alternative compression algorithms are sorted by priority. In the example
465 above, zstd is used as the first alternative algorithm, which has priority
466 of 1, while lz4hc is configured as a compression algorithm with priority 2.
467 Alternative compression algorithm's priority is provided during algorithms
490 The number of idle pages can be significant, so user-space can pass a size
500 It is also possible to limit the number of pages zram re-compression will
505 During re-compression for every page, that matches re-compression criteria,
506 ZRAM iterates the list of registered alternative compression algorithms in
507 order of their priorities. ZRAM stops either when re-compression was
508 successful (re-compressed object is smaller in size than the original one)
509 and matches re-compression criteria (e.g. size threshold) or when there are
511 successfully re-compressed the page such a page is marked as incompressible,
512 so ZRAM will not attempt to re-compress it in the future.
514 This re-compression behaviour, when it iterates through the list of
516 algorithm that successfully compresses a particular page. Sometimes, however,
519 This can be achieved by providing a `algo` or `priority` parameter:::
565 storage. It's a debugging feature so anyone shouldn't rely on it to work