From 2b2b2cac1f8faf146818889d36c592eece54f43f Mon Sep 17 00:00:00 2001 From: sakridge Date: Tue, 14 Apr 2020 16:40:13 -0700 Subject: [PATCH] limit test jobs to 16 to prevent OOM (#9500) --- ci/test-stable.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ci/test-stable.sh b/ci/test-stable.sh index 4ba5bd6f6..b25bd6da4 100755 --- a/ci/test-stable.sh +++ b/ci/test-stable.sh @@ -38,10 +38,15 @@ test -d target/release/bpf && find target/release/bpf -name '*.d' -delete # Clear the BPF sysroot files, they are not automatically rebuilt rm -rf target/xargo # Issue #3105 +# Limit compiler jobs to reduce memory usage +# on machines with 1gb/thread of memory +NPROC=$(nproc) +NPROC=$((NPROC>16 ? 16 : NPROC)) + echo "Executing $testName" case $testName in test-stable) - _ cargo +"$rust_stable" test --all --exclude solana-local-cluster ${V:+--verbose} -- --nocapture + _ cargo +"$rust_stable" test --jobs "$NPROC" --all --exclude solana-local-cluster ${V:+--verbose} -- --nocapture _ cargo +"$rust_stable" test --manifest-path bench-tps/Cargo.toml --features=move ${V:+--verbose} test_bench_tps_local_cluster_move -- --nocapture ;; test-stable-perf)