[opensuse-buildservice] Set maximum number of processors in _constraints?
I see that I can set the minimum number of processors in _constraints, but I don't see how I could set the _maximum_ number of processors. Is this even possible? Background: the problem with Ceph builds running out of memory is due to {%_smp_mflags} expanding to -j16 on many of the OBS build workers (thanks to Tim Serong for debugging this). -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Dne So 21. listopadu 2015 09:00:41, Nathan Cutler napsal(a):
I see that I can set the minimum number of processors in _constraints, but I don't see how I could set the _maximum_ number of processors. Is this even possible?
Background: the problem with Ceph builds running out of memory is due to {%_smp_mflags} expanding to -j16 on many of the OBS build workers (thanks to Tim Serong for debugging this).
How about constraining properly for enough memory? Tom
Dne So 21. listopadu 2015 09:09:31, Tomáš Chvátal napsal(a):
Dne So 21. listopadu 2015 09:00:41, Nathan Cutler napsal(a):
I see that I can set the minimum number of processors in _constraints, but I don't see how I could set the _maximum_ number of processors. Is this even possible?
Background: the problem with Ceph builds running out of memory is due to {%_smp_mflags} expanding to -j16 on many of the OBS build workers (thanks to Tim Serong for debugging this).
How about constraining properly for enough memory?
Tom
Meh I forgot to check the ctrl+v worked: So this is how I had to do it for arm on libreoffice: # do not eat all memory echo "Available memory:" free echo "System limits:" ulimit -a lo_jobs_reduced= if test -n "$lo_jobs" -a "$lo_jobs" -gt 1 ; then mem_per_process=1200 max_mem=`LANG=C free -t -m | sed -n "s|^Mem: *\([0-9]*\).*$|\1|p"` max_jobs="$(($max_mem / $mem_per_process))" test "$lo_jobs" -gt "$max_jobs" && lo_jobs="$max_jobs" && lo_jobs_reduced="yes" && echo "Warning: Reducing number of jobs to $max_jobs because of memory limits" test "$lo_jobs" -le 0 && lo_jobs=1 && echo "Warning: Do not use the parallel build at all becuse of memory limits" fi # finally set jobs PARALLEL_BUILD= if test -n "$lo_jobs" ; then PARALLEL_BUILD="--with-parallelism=$lo_jobs" fi Tom
On Saturday 2015-11-21 09:19, Tomáš Chvátal wrote:
if test -n "$lo_jobs" -a "$lo_jobs" -gt 1 ; then mem_per_process=1200 max_mem=`LANG=C free -t -m | sed -n "s|^Mem: *\([0-9]*\).*$|\1|p"`
It's better to use /proc/meminfo. free(1) output is more prone to changes, and in fact, did so between 13.2 and TW. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
On Saturday 21 November 2015, 09:00:41 wrote Nathan Cutler:
I see that I can set the minimum number of processors in _constraints, but I don't see how I could set the _maximum_ number of processors. Is this even possible?
No, it isn't
Background: the problem with Ceph builds running out of memory is due to {%_smp_mflags} expanding to -j16 on many of the OBS build workers (thanks to Tim Serong for debugging this).
well, you can add a check in your spec file to limit %_smp_mflags to a certain number which is matching to your memory requirements from _constraints. -- Adrian Schroeter email: adrian@suse.de SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg) Maxfeldstraße 5 90409 Nürnberg Germany -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (4)
-
Adrian Schröter
-
Jan Engelhardt
-
Nathan Cutler
-
Tomáš Chvátal