aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-12-03 10:41:36 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-12-03 10:41:36 +0000
commit036b7091d719f417f1822e870c14e000fb6a432e (patch)
tree308c4b13c9c7a1c7893a3bdf475427f36826abdb
parent64d2d047f651b25373d53ed6c69b95896aa3590c (diff)
tcwg-llvmbot: Limit ninja on avg-load on silent bots, but not on normal bots
There are two sources of massive parallelism in LLVM bots: (1) ninja-driven builds of LLVM and (2) llvm-lit-driven testsuites. We are, currently, limiting parallelism under high load for (1), but can't do it effectively for (2). This causes a situation when "normal" bots gracefully yield CPU time by running single-threaded ninja to "silent" bots during their llvm-lit testsuites. Since the linaro-armv8-01 machine seems to be OK with running under 500+ average process load, this patch removes avg-load limit from "normal" bots, which will increase the overall system load, but will shift CPU time towards "normal" bots. Change-Id: I2dcd27b9e9b800344a1acea0ec17681d5b97c341
-rwxr-xr-xtcwg-base/tcwg-llvmbot/run.sh24
1 files changed, 18 insertions, 6 deletions
diff --git a/tcwg-base/tcwg-llvmbot/run.sh b/tcwg-base/tcwg-llvmbot/run.sh
index f9d74916..d3308d49 100755
--- a/tcwg-base/tcwg-llvmbot/run.sh
+++ b/tcwg-base/tcwg-llvmbot/run.sh
@@ -137,14 +137,26 @@ exec /usr/bin/ninja -j$n_cores "\$@"
EOF
;;
*)
- # Throttle ninja on system load, system memory and container memory limit.
- # When running with "-l 2*N_CORES -m 50 -M 50" ninja will not start new jobs
- # if system or container memory utilization is beyond 50% or when load is
- # above double the core count. Ninja will also stall up to 5 seconds (-D 5000)
- # before starting a new job to avoid rapid increase of resource usage.
+ # Throttle ninja on system load, system memory and container memory
+ # limits.
+ case "$1" in
+ lab.llvm.org:9994)
+ # Run silent bots with single-threaded ninja when average load
+ # is beyond twice the number of cores.
+ avg_load_opt="-l $((2*$n_cores))"
+ ;;
+ *)
+ avg_load_opt=""
+ ;;
+ esac
+ # Make ninja run single-threaded if system or container memory
+ # utilization is beyond 50% (-m 50 -M 50).
+ # Make ninja stall for up to 5 seconds (-D 5000) before starting
+ # a new job when usage decreases under threshold (to avoid rapid
+ # increase of resource usage from N_CORES-1 new processes).
cat > /usr/local/bin/ninja <<EOF
#!/bin/sh
-exec /usr/local/bin/ninja.bin -j$n_cores -l $((2*$n_cores)) -m 50 -M 50 -D 5000 "\$@"
+exec /usr/local/bin/ninja.bin -j$n_cores $avg_load_opt -m 50 -M 50 -D 5000 "\$@"
EOF
;;
esac