CONFIG_ZRAM Compressed RAM block device support
- Off
- Module
- Built in
Creates virtual block devices called /dev/zramX (X = 0, 1, ...). Pages written to these disks are compressed and stored in memory itself. These disks allow very fast I/O and compression provides good amounts of memory savings.
It has several use cases, for example: /tmp storage, use as swap disks and maybe many more.
See Documentation/admin-guide/blockdev/zram.rst for more information.
If ZRAM
CONFIG_ZRAM_BACKEND_LZ4 lz4 compression support
- Depends on
BLK_DEV && ZRAM - Selects
LZ4_COMPRESS if BLK_DEV && ZRAM - Selects
LZ4_DECOMPRESS if BLK_DEV && ZRAM
CONFIG_ZRAM_BACKEND_LZ4HC lz4hc compression support
- Depends on
BLK_DEV && ZRAM - Selects
LZ4HC_COMPRESS if BLK_DEV && ZRAM - Selects
LZ4_DECOMPRESS if BLK_DEV && ZRAM
CONFIG_ZRAM_BACKEND_ZSTD zstd compression support
- Depends on
BLK_DEV && ZRAM - Selects
ZSTD_COMPRESS if BLK_DEV && ZRAM - Selects
ZSTD_DECOMPRESS if BLK_DEV && ZRAM
CONFIG_ZRAM_BACKEND_DEFLATE deflate compression support
- Depends on
BLK_DEV && ZRAM - Selects
ZLIB_DEFLATE if BLK_DEV && ZRAM - Selects
ZLIB_INFLATE if BLK_DEV && ZRAM
CONFIG_ZRAM_BACKEND_842 842 compression support
- Depends on
BLK_DEV && ZRAM - Selects
842_COMPRESS if BLK_DEV && ZRAM - Selects
842_DECOMPRESS if BLK_DEV && ZRAM
CONFIG_ZRAM_BACKEND_FORCE_LZO
CONFIG_ZRAM_BACKEND_LZO lzo and lzo-rle compression support
- Depends on
BLK_DEV && ZRAM - Selects
LZO_COMPRESS if BLK_DEV && ZRAM - Selects
LZO_DECOMPRESS if BLK_DEV && ZRAM
Default zram compressor
CONFIG_ZRAM_DEF_COMP_LZORLE lzo-rle
- Depends on
BLK_DEV && ZRAM && ZRAM_BACKEND_LZO
CONFIG_ZRAM_DEF_COMP_LZO lzo
- Depends on
BLK_DEV && ZRAM && ZRAM_BACKEND_LZO
CONFIG_ZRAM_DEF_COMP_LZ4 lz4
- Depends on
BLK_DEV && ZRAM && ZRAM_BACKEND_LZ4
CONFIG_ZRAM_DEF_COMP_LZ4HC lz4hc
- Depends on
BLK_DEV && ZRAM && ZRAM_BACKEND_LZ4HC
CONFIG_ZRAM_DEF_COMP_ZSTD zstd
- Depends on
BLK_DEV && ZRAM && ZRAM_BACKEND_ZSTD
CONFIG_ZRAM_DEF_COMP_DEFLATE deflate
- Depends on
BLK_DEV && ZRAM && ZRAM_BACKEND_DEFLATE
CONFIG_ZRAM_DEF_COMP_842 842
- Depends on
BLK_DEV && ZRAM && ZRAM_BACKEND_842
CONFIG_ZRAM_DEF_COMP
CONFIG_ZRAM_WRITEBACK Write back incompressible or idle page to backing device
This lets zram entries (incompressible or idle pages) be written back to a backing device, helping save memory. For this feature, admin should set up backing device via /sys/block/zramX/backing_dev.
With /sys/block/zramX/{idle,writeback}, application could ask idle page's writeback to the backing device to save in memory.
See Documentation/admin-guide/blockdev/zram.rst for more information.
CONFIG_ZRAM_TRACK_ENTRY_ACTIME Track access time of zram entries
With this feature zram tracks access time of every stored entry (page), which can be used for a more fine grained IDLE pages writeback.
CONFIG_ZRAM_MEMORY_TRACKING Track zRam block status
With this feature, admin can track the state of allocated blocks of zRAM. Admin could see the information via /sys/kernel/debug/zram/zramX/block_state.
See Documentation/admin-guide/blockdev/zram.rst for more information.
CONFIG_ZRAM_MULTI_COMP Enable multiple compression streams
This will enable multi-compression streams, so that ZRAM can re-compress pages using a potentially slower but more effective compression algorithm. Note, that IDLE page recompression requires ZRAM_TRACK_ENTRY_ACTIME.
- arch/alpha/Kconfig:89
- arch/arc/Kconfig:70
- arch/arm/Kconfig:319
- arch/arm64/Kconfig:278
- arch/csky/Kconfig:160
- arch/hexagon/Kconfig:57
- arch/loongarch/Kconfig:787
- arch/m68k/Kconfig:84
- arch/microblaze/Kconfig:93
- arch/mips/Kconfig:3046
- arch/nios2/Kconfig:69
- arch/openrisc/Kconfig:54
- arch/parisc/Kconfig:106
- arch/powerpc/Kconfig:30
- arch/riscv/Kconfig:292
- arch/s390/Kconfig:2
- arch/sh/mm/Kconfig:4
- arch/sparc/Kconfig:140
- arch/um/Kconfig:52
- arch/x86/Kconfig:356
- arch/xtensa/Kconfig:94