From 494972cc7736c8816000899f236541c6b7feb4bc Mon Sep 17 00:00:00 2001 From: Sagar Sagar Date: Thu, 20 Nov 2025 12:54:22 +0000 Subject: [PATCH] pmlogcompress: increase default xz compression level from 0 to 3 Raise the default xz compression level from 0 to 3 for improved compression efficiency. For smaller archives with xz -0 level 533M total --> 26M total in 16.4695 sec For smaller archives with xz -3 level 533M total --> 13M total in 24.1473 sec For larger archives with xz -0 level 15G total -->695M total in 815.4636 sec For larger archives with xz -3 level 15G total -->428M total in 1016.3921 sec --- src/pmlogcompress/pmlogcompress | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pmlogcompress/pmlogcompress b/src/pmlogcompress/pmlogcompress index 6ef004e1804..782c2e0952c 100755 --- a/src/pmlogcompress/pmlogcompress +++ b/src/pmlogcompress/pmlogcompress @@ -74,18 +74,18 @@ _xz_setup() { if [ -z "${xz_args+onetrip}" ] then - if xz -0 --block-size=10MiB /dev/null 2>&1 + if xz -3 --block-size=10MiB /dev/null 2>&1 then # want minimal overheads, -0 is the same as --fast ... # these options were selected after extensive analysis # for original settings in pmlogger_daily # - xz_args="-0 --block-size=10MiB" - elif xz -0 /dev/null 2>&1 + xz_args="-3 --block-size=10MiB" + elif xz -3 /dev/null 2>&1 then # no --block-size in older versions of xz # - xz_args="-0" + xz_args="-3" else xz_args='' fi