Repository navigation
Design: pooled task execution for wide fan-out (nf-spawn#70) - #454
Merged
Merged
Conversation
scttfrdmn
force-pushed
the
design/pooled-task-execution
branch
from
July 31, 2026 02:43
899b22c to
f379d90
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
docs/pooled-task-execution-design.md— a design (no code) for a reusable spawn pooled execution mode to fix dispatch-bound fan-out (nf-spawn#70).Measured problem (real N=108 chr20 bcftools): peaked ~60/108 concurrent, took 5m44s just to dispatch. Root cause is two-layered: (a) serial dispatch, and (b) a boot-per-task tax — by Little's Law, short tasks self-terminate faster than new ones launch, so even instant dispatch can't reach N. Only worker reuse fixes (b).
The plan
Pool-first, bulk deferred. cohort's per-entity launch is already concurrent (
reconcile.go:222), so a warm pool provisioned via cohort dissolves the dispatch bottleneck and attacks the boot tax; bulkRunInstances/CreateFleetis a constant-factor optimization → Phase 3.Reusable spawn infra (all adapters share the fan-out shape):
pkg/taskcohort(new) — cohort adapter mirroringpkg/mpicohort; task fan-out is the easy per-entity-placement case.pkg/queue(extend) — already runs many jobs from a queue on one instance; generalize to a pool-shared queue + per-task workspace reset.cohort— expected zero core change (PartialCohortMinViable = best-effort/eventual;Actuator.Start= warm pool; rung/AZ chain = capacity fallback).Phases: P0 cheap wins (nf-spawn non-blocking submit — spore-host/nf-spawn#75; spawn sizing-skip already merged #413) · P1 pooled workers (spawn, Substrate-tested) · P2 nf-spawn run-scoped integration + real N=108 validation · P3 optional bulk launch + fan-in.
Design only — no code in this PR. Refs nf-spawn#70.