CI queue: pause remote grants while Ravion does not start the jobs it has #1177
The problem#
The remote lane of the CI queue has a fixed cap (ciRemoteJobCap). Ravion's capacity is not fixed: it depends on its hosts and on our AWS quota. When the cap is higher than what Ravion can run, the queue grants slots for jobs whose VMs wait for a host.
On 2026-12-01 the site row ci_remote_job_cap went missing, so the cap fell back to 1,000. The queue granted 102 Ravion slots on 8 hosts (48 vCPU). VMs that came after the claim's 10 minutes were refused. About 30 grants then held their slots for half an hour, until #1175's guard was written: it gives up a VM that never took its claim after 12 minutes.
The numbers#
VM start latency of the jobs of TanStack/source that day: each job's first step minus its launch.
| Launched | Jobs started | p50 | p90 | p95 | p99 | max | Over 600 s | Never started (failure) |
|---|---|---|---|---|---|---|---|---|
| Before 13:00 | 249 | 14 s | 49 s | 62 s | 93 s | 126 s | 0 | 0 |
| 13:00 to 13:46, no cap | 96 | 462 s | 581 s | 593 s | 605 s | 606 s | 4 | 13 |
| After 13:46, cap 9 | 35 | 21 s | 575 s | 575 s | 607 s | 607 s | 1 | 1 |
When Ravion has hosts, a VM starts within about a minute and a half. When it does not, the start time climbs to the claim's 10 minutes.
The proposal#
Let the start latency pace the remote lane:
- Keep, on each Ravion slot, the time its job started on a VM (
started_atonci_slot_requests, written when the job reports its start). - In the grant pass, give no new remote slot while 3 or more granted Ravion jobs have waited over 120 s for their VM. 120 s is above the normal p99 of 93 s.
- The lane goes on by itself once those VMs start.
The cap then stays as a safety limit, and the lane follows what Ravion really runs.
- Cost: one column, and one count in the pass.
- Nothing from Ravion: its API gives our key no host capacity; its per-run endpoints answer 401.
When#
After #1175 and the moves of the CI cache and surfaces. Today the cap of 9 matches the 8 hosts, so this adds nothing until the AWS quota rises.
Sign in to join this conversation.