You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Spec run default parallelism oversubscribes small machines #201
A Spec run's default parallelism (3 Tickets at once), plus any Runs started by hand, easily oversubscribes a small machine. Each Run's agent session builds and tests in its own worktree, so three concurrent sessions mean three cargo test/clippy jobs competing for the same cores.
Evidence (2026-09-30, 4-core / 8GB VM, no swap):
Load average 24–27 with 3 Merge runs and a Spec run's Tickets going. /proc/pressure/cpu showed some avg300=97%, and sys time was 26% from process spawning.
About 2.8GB of memory was available with no swap. Each claude process uses about 200–350MB, and a rustc or linker peak can take 0.5–1GB, so one more parallel link risks the OOM killer rather than just slowing down.
The claude processes themselves cost almost no CPU. Runs waiting on the model or on CI are cheap, and the cost is in their local builds and tests.
To decide:
Should a Spec run's default parallelism come from the machine (e.g. cores / 2, capped by available memory) instead of a fixed 3? parallel <n> and spec.parallel would still override it.
Should thirdshift warn, or hold back starting a Ticket, when the machine is already saturated (CPU pressure, available memory)?
Is anything needed for Runs started by hand in separate terminals, which don't know about each other, or is that left to the user?
thirdshift is language-neutral, so any build-level limit (e.g. CARGO_BUILD_JOBS) would be the repo's or the user's to set, not thirdshift's.
Closing as superseded. #1152 (PR #1206) added the [resources] gate: every agent session now waits while available memory or load per CPU is past resources.min_available_memory_mb or resources.max_load_per_cpu_percent, which is the "hold back on a saturated machine" half. If you also want a spec.parallel default derived from the core count, open it as a narrow issue.
Activity
JacobStephens2 commentedon Oct 25, 2026
Closing as superseded. #1152 (PR #1206) added the
[resources]gate: every agent session now waits while available memory or load per CPU is pastresources.min_available_memory_mborresources.max_load_per_cpu_percent, which is the "hold back on a saturated machine" half. If you also want aspec.paralleldefault derived from the core count, open it as a narrow issue.