summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--jenkins-helpers.sh7
-rwxr-xr-xstart-container-docker.sh2
-rwxr-xr-xstart-container-qemu.sh2
3 files changed, 3 insertions, 8 deletions
diff --git a/jenkins-helpers.sh b/jenkins-helpers.sh
index eef41fde..71d60a22 100644
--- a/jenkins-helpers.sh
+++ b/jenkins-helpers.sh
@@ -686,15 +686,10 @@ print_memory_limit ()
set -euf -o pipefail
local task="$1"
local weight="$2"
- local nproc="$3"
local memory
case "$task" in
build)
- # 1GB per compilation core
- memory=$(( 1000 * $weight * $nproc ))
- if [ "$memory" -gt "30000" ]; then
- memory="30000"
- fi
+ memory="unlimited"
;;
test)
# 0.75GB per session
diff --git a/start-container-docker.sh b/start-container-docker.sh
index 4b5cbecd..b3f3a66f 100755
--- a/start-container-docker.sh
+++ b/start-container-docker.sh
@@ -241,7 +241,7 @@ nproc=$($SSH $session_host nproc --all)
pids=$(print_pids_limit "$task" "$weight")
cpus=$(print_cpu_shares "$task" "$weight")
-memory=$(print_memory_limit "$task" "$weight" "$nproc")
+memory=$(print_memory_limit "$task" "$weight")
memory_opt="--memory=${memory}M"
if [ x"$memory" = x"unlimited" ]; then
memory_opt=""
diff --git a/start-container-qemu.sh b/start-container-qemu.sh
index b20bb2f3..6e01d9c1 100755
--- a/start-container-qemu.sh
+++ b/start-container-qemu.sh
@@ -97,7 +97,7 @@ fi
# CPU is limited (on contention) by docker container.
ncpus=$(container_exec nproc --all)
-memory=$(print_memory_limit "$task" "$weight" "$ncpus")
+memory=$(print_memory_limit "$task" "$weight")
# Reduce memory limit for VM to leave something for QEMU itself.
memory=$(($memory*2/3))