]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
scripts/build_utils.sh: increase mem per job to 2.2GB 1123/head
authorKefu Chai <kchai@redhat.com>
Thu, 13 Sep 2018 08:46:36 +0000 (16:46 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 20 Sep 2018 12:08:21 +0000 (20:08 +0800)
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 <kchai@redhat.com>
scripts/build_utils.sh

index d1f828c832f1d1076935e7e6d89506ebed40b7b1..4ed4dea87c0cb7e05033042d3446b6cd3e167bb7 100644 (file)
@@ -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