Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions Documentation/criu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,37 @@ mount -t cgroup -o devices,freezer none devices,freezer
Allows to link unlinked files back, if possible (modifies filesystem
during *restore*).

*-c, --compress*::
Enable LZ4 per-page compression of memory pages during *dump*.
Each 4 KiB page is compressed as an independent LZ4 block.
Zero-filled pages are detected and stored with no data; pages that
do not compress well are stored raw to avoid decompression overhead
on *restore*. The compression choice made at *dump* time is recorded
in the inventory image and applied automatically on *restore*.
Compatible with *--page-server*, *--stream*, *--lazy-pages*,
iterative checkpointing, *--auto-dedup*, and the *dedup* command.

*--compress-region* 'size'::
Enable LZ4 region compression of memory pages during *dump*.
A run of consecutive pages totalling 'size' bytes is compressed as
a single LZ4 block, which yields a better ratio and faster dump
on heap-shaped data than per-page compression at the cost of
slightly slower restore on partial reads. 'size' accepts K/M/G
suffixes (e.g. *256K*, *1M*); it must be a multiple of 4096 and
at most 4M (1024 pages). Mutually exclusive with *--compress*.
Currently supports only the local image path (no
*--page-server* / *--stream*). Hole-punching deduplication is
skipped for compressed images since compressed pages are
variably-sized.

*--compress-acceleration* 'N'::
Set the LZ4 acceleration level for page compression (1 to 65537).
Controls how thoroughly the compressor searches for matching byte
sequences. The default value of 1 gives the best compression
ratio. Higher values skip more match candidates, resulting in
faster compression but larger output. Decompression speed is not
affected. Implies *--compress* unless *--compress-region* is set.

*--timeout* 'number'::
Set a time limit in seconds for collecting tasks during the
dump operation. The timeout is 10 seconds by default.
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ else
export CONFIG_COMPAT := y
export CONFIG_GNUTLS := y
export CONFIG_HAS_LIBBPF := y
export CONFIG_LZ4 := y
endif

#
Expand Down Expand Up @@ -464,7 +465,9 @@ ruff:
scripts/uninstall_module.py \
coredump/ coredump/coredump \
scripts/github-indent-warnings.py \
contrib/criu-service-client/test/*.py
contrib/criu-service-client/test/*.py \
contrib/compression-benchmark/main.py \
contrib/compression-benchmark/workload.py

shellcheck:
shellcheck --version
Expand All @@ -477,6 +480,7 @@ shellcheck:
shellcheck -x test/others/config-file/*.sh
shellcheck -x test/others/action-script/*.sh
shellcheck -x contrib/criu-service-client/test/*.sh
shellcheck -x test/others/compress-mixed/*.sh

codespell:
codespell
Expand Down
8 changes: 8 additions & 0 deletions Makefile.config
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,14 @@ else
$(info $S Install gnutls-devel (RPM) or gnutls-dev (DEB) to fix.)
endif

ifeq ($(NO_LZ4)x$(call pkg-config-check,liblz4),xy)
LIBS_FEATURES += -llz4
export CONFIG_LZ4 := y
FEATURE_DEFINES += -DCONFIG_LZ4
else
$(info Note: Building without LZ4 compression support.)
endif

ifeq ($(call pkg-config-check,libnftables),y)
LIB_NFTABLES := $(shell $(PKG_CONFIG) --libs libnftables)
ifeq ($(call try-cc,$(FEATURE_TEST_NFTABLES_LIB_API_0),$(LIB_NFTABLES)),true)
Expand Down
Loading
Loading