Skip to content
Queueing network templates

Queueing Network — CI Build Farm

Merge-queue pipeline at six jobs a minute with flaky-test retry loops from both suites, showing how a 90-slot integration executor pool, not the forty compile workers, is the station that touches the 80% target.

Template previewQueueing network
CI build farm — merge queue at peakOpen queueing network · 5 stations · 10 routes · arrivals 6/min · target ρ 80%10.930.850.04 back0.790.09 back6/minarrivalsexit 0.07exit 0.11exit 0.121exitJob queueλ 6/min · ρ 40%Wq 1.52s · Lq 0.15W 9.52s · L 0.95M/M/2 · P(wait) 22.9%Compile×40λ 6.25/min · ρ 70.3%Wq 1.03s · Lq 0.11W 4.5m · L 28.24G/G/40 · P(wait) 2.3%Unit tests×30λ 6.3/min · ρ 66.5%Wq 0.58s · Lq 0.06W 3.2m · L 20G/G/30 · P(wait) 2.4%Integration testsbottleneck×60λ 5.35/min · ρ 80.3%Wq 3.02s · Lq 0.27W 9.1m · L 48.43M/M/60/90 · blocked 0%Artefact publish×4λ 4.23/min · ρ 61.7%Wq 7.04s · Lq 0.5W 42s · L 2.96M/M/4 · P(wait) 30.9%StationModelcK1/μλλ effaρP(wait)P(block)LqWqLWJob queueM/M/22∞8s6/min6/min0.840%22.9%0%0.151.52s0.959.52sCompileG/G/4040∞4.5m6.25/min6.25/min28.1370.3%2.3%0%0.111.03s28.244.5mUnit testsG/G/3030∞3.2m6.3/min6.3/min19.9466.5%2.4%0%0.060.58s203.2mIntegration testsM/M/60/9060909m5.35/min5.35/min48.1680.3%6.7%0%0.273.02s48.439.1mArtefact publishM/M/44∞35s4.23/min4.23/min2.4761.7%30.9%0%0.57.04s2.9642sBottleneck: Integration tests at ρ = 80.3% on 60 servers — 61 servers (1 more) would bring it under the 80% target.Offered 6/min · throughput 6/min · blocked 0/min (0%) · L 100.58 in system · W 16.8m end to end · 5 stationsStable — every station holds ρ below 1. Network response time is Little's law on the solved flows: W = L / throughput.

Make it your own.

title "CI build farm — merge queue at peak"
target 80%
rate unit /min
arrivals "Job queue" 6/min

station "Job queue"         { servers: 2;  service: 8s }
# Compile time depends on cache hit rate, hence cv 1.7.
station Compile             { servers: 40; service: 4m30s; cv: 1.7 }
station "Unit tests"        { servers: 30; service: 3m10s; cv: 1.25 }
# The integration pool is capped at ninety concurrent environments; jobs
# beyond that are rejected by the scheduler rather than queued forever.
station "Integration tests" { servers: 60; service: 9m; capacity: 90 }
station "Artefact publish"  { servers: 4;  service: 35s }

route "Job queue" -> Compile 1.0
route Compile -> "Unit tests" 0.93
route Compile -> exit 0.07                       # compile failures leave
route "Unit tests" -> "Integration tests" 0.85
route "Unit tests" -> Compile 0.04               # flaky retry, rebuilt
route "Unit tests" -> exit 0.11
route "Integration tests" -> "Artefact publish" 0.79
route "Integration tests" -> "Unit tests" 0.09   # re-run a flaky suite
route "Integration tests" -> exit 0.12
route "Artefact publish" -> exit 1.0