Skip to content

NR4: one scale-up pass for a whole burst — batches of 10, a 120 s timeout - #26

Merged
ruehowl merged 2 commits into
mainfrom
claude/nimbus-runners-perf-test-nmetg9
Oct 14, 2026
Merged

ruehowl merged 2 commits into
mainfrom
claude/nimbus-runners-perf-test-nmetg9

Conversation

@ruehowl

@ruehowl ruehowl commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #27.

The problem. With the Lambda concurrency at 1,500, every lane of a burst gets a runner, but in waves. A 128-lane full verify on sourceplane/orun-cloud#1869:

  • 61 runners started at once;
  • 38 more came about 4 minutes in;
  • the rest trickled in over 13 more minutes;
  • the fleet never passed 68 busy runners, against a cap of 100.

The cause (module v7.11.0 source, scale-up.ts, github-runner.ts, runner-config.ts):

  • The scale-up lambda works through its SQS batch one message at a time: the queued check per job, CreateFleet, then per runner a GitHub JIT config POST, an SSM write and a 25 ms pause.
  • At the fleet's batch of 20 that outran the module's 30 s timeout.
  • A batch that times out has already launched its instances but configured only some. The rest never register, yet they count against runners_maximum_count until scale-down reaps them after runner_boot_time (4 min). The batch's messages come back after the 30 s visibility timeout to a cap full of unconfigured instances.
  • A JIT failure inside a batch that finishes is cleaned up (terminate the instance, retry the message); a timeout skips that.

The change (infra/fleet/terraform/runners.tf):

  • lambda_event_source_mapping_batch_size 20 → 10, the module's default.
  • runners_scale_up_lambda_timeout 30 → 120 s; the build queue's visibility timeout follows it.
  • job_retry stays at 120 s. A re-check shorter than a runner's ~70 s boot finds the job still queued and launches a second runner, so the stopgap the status file suggested earlier is withdrawn.

IMPLEMENTATION-STATUS.md records the measurements, the cause and the fix.

Verification.

  • This pull request's plan shows the change: the scale-up lambda's timeout, the queue's visibility timeout and the event source mapping's batch size.
  • After merge, the apply on main deploys it. A 128-lane burst on orun-cloud should then start up to the 100-runner cap within about 90 s of plan, with no wave four minutes later.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BLimCmjynaJv5BjifMSfws

The quota stopped lanes being lost: 128 of 128 got a runner, against
105 of 128 at the old quota of 10. The burst still arrives in waves:
the first scale-up pass launched 61, the rest came with the job_retry
re-check about four minutes in and over the next 13 minutes, with the
fleet never past 68 busy runners. Records the measurements, what to
look for in the scale-up logs, and the lanes workaround.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BLimCmjynaJv5BjifMSfws
…eout

A 128-lane burst got 41–61 runners at once and the rest over 17 minutes,
with the fleet never past 68 busy runners (#27). The scale-up lambda works
through its batch one message at a time — the queued check, CreateFleet,
then a GitHub JIT config and an SSM write per runner — and at the fleet's
batch of 20 it outran the module's 30 s timeout. A timed-out batch has
already launched its instances but configured only some: the rest never
register, yet count against runners_maximum_count until scale-down reaps
them after runner_boot_time, and the batch's messages come back to a full
cap. A JIT failure inside a batch that finishes is cleaned up (terminate,
retry); a timeout is not.

The batch goes back to the module's 10 and the timeout to 120 s (the build
queue's visibility timeout follows it). job_retry stays at 120 s: a re-check
shorter than a runner's ~70 s boot finds the job still queued and launches a
second runner for it, so the stopgap the status file suggested is withdrawn.

Fixes #27.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BLimCmjynaJv5BjifMSfws
@ruehowl ruehowl changed the title NR4: the 128-lane burst after the Lambda quota went to 1,500 NR4: one scale-up pass for a whole burst — batches of 10, a 120 s timeout Oct 14, 2026
@ruehowl
ruehowl marked this pull request as ready for review October 14, 2026 10:19
@ruehowl
ruehowl merged commit 01a385c into main Oct 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

A 128-job burst gets only 40–60 runners from the first scale-up pass; the rest wait up to 17 min

2 participants