update ceph.spec.

revert jobs to 32 
modify mem_per_processor to 3000
This commit is contained in:
wangzengliang 2022-03-16 01:32:29 +00:00 committed by Gitee
parent ee78a1f028
commit 8a016a4d06
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1240,7 +1240,7 @@ export CXXFLAGS=$(echo $RPM_OPT_FLAGS | sed -e 's/-Wp,-D_FORTIFY_SOURCE=2//g')
%endif
# Parallel build settings ...
CEPH_MFLAGS_JOBS="-j16"
CEPH_MFLAGS_JOBS="-j32"
CEPH_SMP_NCPUS=$(echo "$CEPH_MFLAGS_JOBS" | sed 's/-j//')
%if 0%{?__isa_bits} == 32
# 32-bit builds can use 3G memory max, which is not enough even for -j2
@ -1252,7 +1252,7 @@ free -h
echo "System limits:"
ulimit -a
if test -n "$CEPH_SMP_NCPUS" -a "$CEPH_SMP_NCPUS" -gt 1 ; then
mem_per_process=2500
mem_per_process=3000
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"