Increase mem_per_process to avoid random oom kills
Signed-off-by: Boris Ranto <branto@redhat.com>
This commit is contained in:
parent
840cecd85d
commit
e14ca57795
@ -944,7 +944,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=2700
|
||||
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"
|
||||
|
Loading…
Reference in New Issue
Block a user