[Git][qa/jenkins.debian.net][master] debian_live_build: Reduce CPU load
Holger Levsen (@holger)
gitlab at salsa.debian.org
Tue Jan 7 09:49:42 GMT 2025
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
253bfa5e by Roland Clobus at 2025-01-07T10:48:32+01:00
debian_live_build: Reduce CPU load
During the 'mksquashfs' stage, all available CPUs are used per default.
Reduce this to 3/4 of the amount, to have more CPU power available for
other processes, e.g. openQA workers.
For osuosl3 this means a reduction from 16 to 12 cores.
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
2 changed files:
- bin/reproducible_debian_live_build.sh
- hosts/osuosl3-amd64/etc/sudoers.d/live-build
Changes:
=====================================
bin/reproducible_debian_live_build.sh
=====================================
@@ -179,6 +179,8 @@ mkdir -p /srv/workspace/live-build
export BUILDDIR=$(mktemp --tmpdir=/srv/workspace/live-build -d -t ${DESKTOP}-${SUITE}.XXXXXXXX)
cd ${BUILDDIR}
export RESULTSDIR=$(mktemp --tmpdir=/srv/reproducible-results -d -t ${PROJECTNAME}-${DESKTOP}-${SUITE}-XXXXXXXX) # accessible in schroots, used to compare results
+# Reduce the CPU load during the mksquashfs step
+export MKSQUASHFS_OPTIONS="-processors $(echo "$(nproc)*3/4" | bc)"
# Fetch the rebuild script (and nothing else)
output_echo "Fetching the rebuild script."
@@ -277,6 +279,9 @@ if [ $(cat ${RESULTSDIR}/summary_build1.txt ${RESULTSDIR}/summary_build2.txt | g
DIFFOSCOPE="$(schroot --directory /tmp -c chroot:jenkins-reproducible-${DBDSUITE}-diffoscope diffoscope -- --version 2>&1)"
TMPDIR=${RESULTSDIR}
call_diffoscope ${PROJECTNAME} ${DESKTOP}/live-image-amd64.hybrid.iso
+ if [ $RESULT -ne 0 ]; then
+ exit $RESULT
+ fi
fi
cleanup success
=====================================
hosts/osuosl3-amd64/etc/sudoers.d/live-build
=====================================
@@ -1,5 +1,6 @@
Defaults env_keep += "SOURCE_DATE_EPOCH"
Defaults env_keep += "LIVE_BUILD"
+Defaults env_keep += "MKSQUASHFS_OPTIONS"
jenkins ALL=(root) NOPASSWD: /usr/bin/lb build, \
/usr/bin/lb clean --purge, \
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/253bfa5e109373b8d8618cb7d2cb7dc87dfc6a7d
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/commit/253bfa5e109373b8d8618cb7d2cb7dc87dfc6a7d
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20250107/3cae8034/attachment-0001.htm>
More information about the Qa-jenkins-scm
mailing list