From: Kefu Chai Date: Thu, 13 Sep 2018 08:46:36 +0000 (+0800) Subject: scripts/build_utils.sh: increase mem per job to 2.2GB X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1123%2Fhead;p=ceph-build.git scripts/build_utils.sh: increase mem per job to 2.2GB it's observed that on our arm64 build host, using the existing $total_mem/1600, n_build_jobs=37 . but we still have following error when compiling Ceph: virtual memory exhausted: Cannot allocate memory make[3]: *** [src/mds/CMakeFiles/mds.dir/SnapClient.cc.o] Error 1 so increase the denominator to 2200 . Signed-off-by: Kefu Chai --- diff --git a/scripts/build_utils.sh b/scripts/build_utils.sh index d1f828c8..4ed4dea8 100644 --- a/scripts/build_utils.sh +++ b/scripts/build_utils.sh @@ -832,11 +832,11 @@ teardown_vagrant_tests() { } get_nr_build_jobs() { - # assume each compiling job takes 1800 MiB memory on average + # assume each compiling job takes 2200 MiB memory on average local nproc=$(nproc) local max_build_jobs=$(vmstat --stats --unit m | \ grep 'total memory' | \ - awk '{print int($1/1800)}') + awk '{print int($1/2200)}') if [[ $max_build_jobs -eq 0 ]]; then # probably the system is under high load, use a safe number max_build_jobs=16