summaryrefslogtreecommitdiff
path: root/start-container-qemu.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-07-19 13:03:02 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-07-26 10:12:26 +0000
commit268e16e2ba1eaef8e211d6a0728c92f8cbde14c0 (patch)
tree0107e824671646d8e1b49629ea6133e906a5b182 /start-container-qemu.sh
parent3922f589ab98b50295674d01287ed7fc693bbb47 (diff)
start-container-docker.sh: Use at most half of RAM on normal builders
This reverts commit 73ab5ac992942292817b1441472d325ed4c553be. Change-Id: Ia4148af0ac04a5f75b63d5c5af5a334939a39a03
Diffstat (limited to 'start-container-qemu.sh')
-rwxr-xr-xstart-container-qemu.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/start-container-qemu.sh b/start-container-qemu.sh
index 6e01d9c1..235c4aea 100755
--- a/start-container-qemu.sh
+++ b/start-container-qemu.sh
@@ -97,7 +97,8 @@ fi
# CPU is limited (on contention) by docker container.
ncpus=$(container_exec nproc --all)
-memory=$(print_memory_limit "$task" "$weight")
+memlimit=$(container_exec free -m | awk '/^Mem/ { print $2 }')
+memory=$(print_memory_limit "$task" "$weight" "$ncpus" "$memlimit")
# Reduce memory limit for VM to leave something for QEMU itself.
memory=$(($memory*2/3))