build-image.sh refuses under 6 GB available, not 9: the cap alone

Tower sat at 8.6-9.1 GB available all evening and no build could start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-16 23:35:12 +00:00
parent c0998f1ac7
commit a96be2f14c
2 changed files with 2 additions and 2 deletions

View File

@@ -52,7 +52,7 @@ Deploying a change is: build and push the image, then pull it and recreate the c
**Build only with `scripts/build-image.sh`, never a bare `docker buildx build`.** On 2026-11-04 **Build only with `scripts/build-image.sh`, never a bare `docker buildx build`.** On 2026-11-04
a plain build of ipx, its dependency layer invalidated by a `Cargo.toml` change, rebuilt a plain build of ipx, its dependency layer invalidated by a `Cargo.toml` change, rebuilt
everything in release on all twelve threads with 5 GB free; Tower thrashed for three hours with everything in release on all twelve threads with 5 GB free; Tower thrashed for three hours with
every core pegged and had to be rebooted. The script refuses to start under 9 GB available or every core pegged and had to be rebooted. The script refuses to start under 6 GB available or
above load 12, and builds in the BuildKit container `ipx-capped` (made on first use), held to 6 above load 12, and builds in the BuildKit container `ipx-capped` (made on first use), held to 6
GB of memory and six threads by its cgroup: a build that outgrows that is killed, and production GB of memory and six threads by its cgroup: a build that outgrows that is killed, and production
keeps running. If one is killed, say so and wait for the user to decide; do not raise the caps or go keeps running. If one is killed, say so and wait for the user to decide; do not raise the caps or go

View File

@@ -12,7 +12,7 @@ set -eu
MEM=6g # the builder's memory cap (Tower has no swap to spill into) MEM=6g # the builder's memory cap (Tower has no swap to spill into)
CPUS=0-5 # six of twelve threads; cargo inside sees six and runs six jobs CPUS=0-5 # six of twelve threads; cargo inside sees six and runs six jobs
NEED_KB=$((9 * 1024 * 1024)) # the cap plus 3 GB for everything else NEED_KB=$((6 * 1024 * 1024)) # the cap; the cgroup kills a build that outgrows it
MAX_LOAD=12 MAX_LOAD=12
BUILDER=ipx-capped BUILDER=ipx-capped