Skip to content

Commit 6701842

Browse files
authored
chore: lower concurrency slightly more (#36335)
Our compilation process is even more memory hungry than we thought. We are still eating up 100% of memory during the heavy build tasks. Increase the guess at memory per job even more, so that we limit concurrency slightly more. We will keep doing this until our memory consumption dips to ~95%. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 238aafd commit 6701842

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ fi
100100
if [[ "$concurrency" == "" ]]; then
101101
# Auto-limit top-level concurrency to:
102102
# - available CPUs - 1 to limit CPU load
103-
# - total memory / 6GB (N.B: constant here may need to be tweaked, configurable with $CDKBUILD_MEM_PER_PROCESS)
104-
mem_per_process=${CDKBUILD_MEM_PER_PROCESS:-6_000_000_000}
103+
# - total memory / 8GB (N.B: constant here may need to be tweaked, configurable with $CDKBUILD_MEM_PER_PROCESS)
104+
mem_per_process=${CDKBUILD_MEM_PER_PROCESS:-8_000_000_000}
105105
concurrency=$(node -p "Math.max(1, Math.min(require('os').cpus().length - 1, Math.round(require('os').totalmem() / $mem_per_process)))")
106106
echo "Concurrency: $concurrency"
107107
fi

0 commit comments

Comments
 (0)