[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How are parallel build parameters choosen by buildd,



Hi,

from time to time i am experiencing some hanging builds that get killed due to inactivity, or even failing tests.

I am not 100% sure why that happens but my suspicion is that the available memory per make thread might be insuffient.
It fluctuates quite a bit between machines used by buildd.

A current example is the failing build of opm-common on mipsel64 [0] on mipsel-aql-03 [1]
It uses "DEB_BUILD_OPTIONS=parallel=4" on machine with 8 GB of ram according to the build log [2].

A previous build (with nearly no changes) on mipsel-osuosl-03 [3] worked. It used 4 make threads but the machine had 16 GB.
That is double the memory.

Is that on purpose? How are the parallel options chosen usually (e.g. min 2GB RAM per make thread)?

Should I try to limit parallel builds based on available ram? E.g. using

free_ram = $(shell free -g | sed -n 2p| sed "s/ \+/ /g"| cut -d " " -f 2)
max_procs = $(shell echo $(free_ram)/4 | bc)
parallel_procs =$(shell if test "$(max_procs)" -lt "1"; then echo 1; else echo "$(max_procs)"; fi)
%:
	dh $@ --builddirectory=build --max-parallel=$(parallel_procs)

Cheers,

Markus

[0] https://buildd.debian.org/status/logs.php?pkg=opm-common&arch=mips64el
[1] https://db.debian.org/machines.cgi?host=mipsel-aql-03
[2] https://buildd.debian.org/status/fetch.php?pkg=opm-common&arch=mips64el&ver=2022.10%2Bds-4&stamp=1675076235&raw=0
[3] https://buildd.debian.org/status/fetch.php?pkg=opm-common&arch=mips64el&ver=2022.10%2Bds-3&stamp=1673902669&raw=0


Reply to: