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