Skip to content

perf(server): run batches of different installations at once - #185

Merged
sweepies merged 2 commits into
mainfrom
perf/parallel-installations
Nov 4, 2026
Merged

sweepies merged 2 commits into
mainfrom
perf/parallel-installations

Conversation

@sweepies

@sweepies sweepies commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Finding #5 from the speed survey. patchula serve had one worker and one engine lock, so installations waited in one queue even though each has its own GitHub rate limits.

  • New server.workers setting (default 4, 1 to 64, read at start): that many queue workers claim batches side by side.
  • claim_batch never claims an installation whose earlier batch is still running, so each installation still runs one batch at a time.
  • Each installation's engine is behind its own lock (Slot); the map lock is held only to find the slot. A remote run takes its installation's lock, so it still never races that installation's queued batch.
  • Docs: the queue section of the server guide and the settings reference; each batch runs its own lockfile tools, so a small host should lower workers.

Test: a running installation is skipped while another is claimed, and its queued work is claimed once it finishes.

View guided diff Turn on auto-fix

The server ran one installation's batch at a time behind a single engine
lock, though each installation has its own rate limits. `server.workers`
(4 by default, read at start) queue workers now claim batches side by side:
`claim_batch` skips an installation whose batch is still running, and each
installation's engine has its own lock, so a remote run waits only for its
own installation.
The first worker error dropped the JoinSet and cancelled every other
installation's batch mid-run. A stop or a failure now halts the workers
once their current batches finish, and the first failure is returned.
Report file names carry a counter, so two batches that finish in the same
instant cannot collide.
@sweepies
sweepies merged commit 9d7b456 into main Nov 4, 2026
11 checks passed
@sweepies
sweepies deleted the perf/parallel-installations branch November 4, 2026 15:14
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.

1 participant