[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] reproducible: Reduce parallelism on armhf systems with a lot of cores

Vagrant Cascadian gitlab at salsa.debian.org
Tue Nov 5 00:25:46 GMT 2019



Vagrant Cascadian pushed to branch master at Debian QA / jenkins.debian.net


Commits:
620fa54d by Vagrant Cascadian at 2019-11-05T00:24:32Z
reproducible: Reduce parallelism on armhf systems with a lot of cores
to reduce swapping on highly parallel builds. Also ensure parallelism
for armhf is an odd number on first build, and even on second build.

- - - - -


2 changed files:

- bin/reproducible_build.sh
- bin/reproducible_common.sh


Changes:

=====================================
bin/reproducible_build.sh
=====================================
@@ -568,6 +568,15 @@ first_build() {
 	echo "Date:     $(date)"
 	echo "Date UTC: $(date -u)"
 	echo "============================================================================="
+	if [ "${ARCH}" = "armhf" ]; then
+		# Reduce parallelism on armhf systems with a lot of cores to
+		# reduce swapping on highly parallel builds. Also ensure first
+		# build is always an odd number of CPUs for good measure.
+		case $NUM_CPU in
+			2|4) NUM_CPU=3 ;;
+			*) NUM_CPU=5 ;;
+		esac
+	fi
 	local TMPCFG=$(mktemp -t pbuilderrc_XXXX --tmpdir=$TMPDIR)
 	cat > "$TMPCFG" << EOF
 BUILDUSERID=1111
@@ -625,7 +634,15 @@ second_build() {
 	echo "============================================================================="
 	set -x
 	local TMPCFG=$(mktemp -t pbuilderrc_XXXX --tmpdir=$TMPDIR)
-	NEW_NUM_CPU=$NUM_CPU	# on amd64+i386 we vary this based on node choices (by design), on armhf only sometimes.
+	# on amd64+i386 we vary this based on node choices (by design)
+	if [ "${ARCH}" = "armhf" ]; then
+		# Reduce parallelism on armhf systems with a lot of cores to
+		# reduce swapping on highly parallel builds. Keep second build
+		# with even number of cores.
+		case $NUM_CPU in
+			8) NUM_CPU=6 ;;
+		esac
+	fi
 	# differ locale+language depending on the architecture (mostly for readability by different peopleā€¦)
 	case $ARCH in
 		armhf)	locale=it_CH


=====================================
bin/reproducible_common.sh
=====================================
@@ -494,7 +494,7 @@ write_variation_table() {
 		write_page "<tr><td>build path</td><td>/build/1st/\$pkg-\$ver <em>(not varied for stretch/buster)</em></td><td>/build/2/\$pkg-\$ver/2nd <em>(not varied for stretch/buster)</em></td></tr>"
 		write_page "<tr><td>user's login shell</td><td>/bin/sh</td><td>/bin/bash</td></tr>"
 		write_page "<tr><td>user's <a href="https://en.wikipedia.org/wiki/Gecos_field">GECOS</a></td><td>first user,first room,first work-phone,first home-phone,first other</td><td>second user,second room,second work-phone,second home-phone,second other</td></tr>"
-		write_page "<tr><td>env DEB_BUILD_OPTIONS</td><td>DEB_BUILD_OPTIONS=\"parallel=XXX\"<br />  XXX on amd64: 16 or 15<br />  XXX on i386: 10 or 9<br />  XXX on armhf: 8, 4 or 2</td><td>DEB_BUILD_OPTIONS=\"parallel=YYY\"<br />  YYY on amd64: 16 or 15 (!= the first build)<br />  YYY on i386: 10 or 9 (!= the first build)<br />  YYY is the same as XXX on arm64<br />  YYY on armhf: 8, 4, or 2 (not varied systematically)</td></tr>"
+		write_page "<tr><td>env DEB_BUILD_OPTIONS</td><td>DEB_BUILD_OPTIONS=\"parallel=XXX\"<br />  XXX on amd64: 16 or 15<br />  XXX on i386: 10 or 9<br />  XXX on armhf: 5 or 3</td><td>DEB_BUILD_OPTIONS=\"parallel=YYY\"<br />  YYY on amd64: 16 or 15 (!= the first build)<br />  YYY on i386: 10 or 9 (!= the first build)<br />  YYY is the same as XXX on arm64<br />  YYY on armhf: 2, 4, or 6</td></tr>"
 		write_page "<tr><td>UTS namespace</td><td><em>shared with the host</em></td><td><em>modified using</em> /usr/bin/unshare --uts</td></tr>"
 	elif [ "$1" = "Arch Linux" ]  ; then
 		write_page "<tr><td>env USER</td><td>jenkins</td><td>build 2</td></tr>"



View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/620fa54d0201919e900b117407322e162632f7bf

-- 
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/commit/620fa54d0201919e900b117407322e162632f7bf
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/20191105/984361f6/attachment-0001.html>


More information about the Qa-jenkins-scm mailing list