[elbe-devel] [PATCH] elbepack: reduce memory usage of xz compressor
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Tue Nov 26 11:28:55 CET 2024
Users reported that the OOM killer would trigger inside the initvm due
to high xz memory usage.
Reduce that memory usage.
It will increase the compression time, but that's preferrable to
inscrutinable errors.
A plan for the next larger release is also to increase the total memory
of the initvm, as the current value of 1GiB is very small.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/elbeproject.py | 2 +-
elbepack/packers.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/elbepack/elbeproject.py b/elbepack/elbeproject.py
index 65b56d993a42241909617d9fe98c3ec5f2f4e1c8..391a209eaa98bbb65949dc1f036fa63c737c0b23 100644
--- a/elbepack/elbeproject.py
+++ b/elbepack/elbeproject.py
@@ -40,7 +40,7 @@ from elbepack.templates import write_pack_template
_xz_env = {
- 'XZ_OPT': '-T0 -M80%',
+ 'XZ_OPT': '-T0 -M40%',
}
diff --git a/elbepack/packers.py b/elbepack/packers.py
index 8b56ede7db317d4aabe14504a87747330bbd9bd0..1d6cd57f770f70c7c2498e866bcb656b326680ec 100644
--- a/elbepack/packers.py
+++ b/elbepack/packers.py
@@ -73,7 +73,7 @@ packers = {'none': NoPacker(),
'gzip': InPlacePacker('gzip -f', '.gz'),
'zstd': InPlacePacker('zstd -T0', '.zst'),
'tar': TarArchiver('--auto-compress', '.tar'),
- 'tarxz': TarArchiver('--use-compress-program="xz -T0 -M80%"', '.tar.xz'),
+ 'tarxz': TarArchiver('--use-compress-program="xz -T0 -M40%"', '.tar.xz'),
'targz': TarArchiver('--auto-compress', '.tar.gz'),
'tarzstd': TarArchiver('--use-compress-program="zstd -T0"', '.tar.zst'),
}
---
base-commit: 517e38aac8a65346030e871da7789ce7447cbc49
change-id: 20241126-xz-mem-ead668ea6214
Best regards,
--
Thomas Weißschuh <thomas.weissschuh at linutronix.de>
More information about the elbe-devel
mailing list