aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2023-08-08 07:11:28 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2023-08-08 07:11:28 -0700
commita458f1ebf823c53fefffd4f458de396409607c80 (patch)
treeb8ff2b02949694cf9165019834e4d1c11108c20c
parentsync-autobuilds: update max-delete, lots of change per pass now (diff)
downloadmastermirror-scripts-a458f1ebf823c53fefffd4f458de396409607c80.tar.gz
mastermirror-scripts-a458f1ebf823c53fefffd4f458de396409607c80.tar.bz2
mastermirror-scripts-a458f1ebf823c53fefffd4f458de396409607c80.zip
snapshots-create: drop max threads to reduce spam
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rwxr-xr-xsnapshots-create.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/snapshots-create.sh b/snapshots-create.sh
index 13b268f..9edbd36 100755
--- a/snapshots-create.sh
+++ b/snapshots-create.sh
@@ -88,7 +88,10 @@ if [ $XZ_PROG == FAIL ]; then
fi
# Newer 'xz' supports threads as well, but defaults to single-threaded
if $XZ_PROG --help |grep -sq threads=NUM ; then
- XZ_PROG="${XZ_PROG} -T 0"
+ # xz: Reduced the number of threads from 12 to 6 to not exceed the memory usage limit of 8,040 MiB
+ nproc=$(nproc)
+ [[ $nproc -gt 6 ]] && nproc=6
+ XZ_PROG="${XZ_PROG} -T $nproc"
fi
# working dir