From: Dan van der Ster Date: Wed, 4 Sep 2019 08:34:42 +0000 (+0200) Subject: ceph.spec.in: reserve 2500MB per build job X-Git-Tag: v15.1.0~1626^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=e466c43b2371d74477ae51c57df362491afd0fd5;p=ceph-ci.git ceph.spec.in: reserve 2500MB per build job On our 14GB build machines, 8 parallel jobs results in the compiler going OOM. Reserving 2500MB per job allows it to succeed with 5 jobs. Fixes: https://tracker.ceph.com/issues/41659 Signed-off-by: Dan van der Ster --- diff --git a/ceph.spec.in b/ceph.spec.in index 810560a7b62..633f99d5df8 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -1176,7 +1176,7 @@ free -h echo "System limits:" ulimit -a if test -n "$CEPH_SMP_NCPUS" -a "$CEPH_SMP_NCPUS" -gt 1 ; then - mem_per_process=1800 + mem_per_process=2500 max_mem=$(LANG=C free -m | sed -n "s|^Mem: *\([0-9]*\).*$|\1|p") max_jobs="$(($max_mem / $mem_per_process))" test "$CEPH_SMP_NCPUS" -gt "$max_jobs" && CEPH_SMP_NCPUS="$max_jobs" && echo "Warning: Reducing build parallelism to -j$max_jobs because of memory limits"