MergeRamp / Guides / Field Guide 05
Serial merge queue throughput
Will a serial queue keep up? A queue can take over the work of coordinating merges. Before you adopt one, check what happens when several approved pull requests arrive together.
Free calculator. No account or repository access needed.
Imagine your team finishing a round of reviews. Several pull requests are approved, and everyone wants their changes on main. One developer updates a branch and waits for CI. Another asks whether it’s their turn to merge.
A merge queue takes over that coordination. In a serial queue, one pull request goes through validation at a time. That makes the order easy to follow, but every PR behind it has to wait for that turn to finish.
For a team with quick checks and occasional merges, the wait may barely matter. With a longer pipeline or a burst of approved PRs, it can stretch across the afternoon. Before choosing a serial queue, estimate how much work it can clear during your busiest hour. Start with required CI duration.
For one PR validated at a time, the ideal throughput ceiling is 60 divided by required CI duration in minutes. Ten-minute CI gives an ideal ceiling of six PRs per hour. Orchestration, failed checks and retries can reduce actual throughput. This is a planning model, not a product benchmark.
Try the free capacity calculator to compare your workload with a higher-volume scenario and model a burst of approved PRs.
Start with required CI duration
Let T be the elapsed minutes for the required CI run, including runner waits. Then ideal capacity is 60 / T PRs per hour. The model assumes a continuously supplied queue, one PR per candidate, successful checks, and no overlapping validation. This is the same CI-only ceiling used by the capacity calculator.
If required jobs run in parallel, use elapsed time until the last required result, rather than adding every job’s duration. Branch updates, merging and queue orchestration add time outside CI. They lower observed throughput; this starting calculation does not assume an arbitrary allowance for them.
| Required CI duration | PRs per hour | PRs in eight hours |
|---|---|---|
| 5 minutes | 12 | 96 |
| 10 minutes | 6 | 48 |
| 15 minutes | 4 | 32 |
| 20 minutes | 3 | 24 |
| 30 minutes | 2 | 16 |
Actual merged PRs can be lower: failed candidates consume time without producing a merge, and an empty queue does not produce work merely because capacity is available.
Worked example: ten-minute CI
Suppose required CI takes ten minutes. The ideal ceiling is 60 / 10 = 6 PRs per hour, before orchestration or retries. This is the calculator’s starting example.
If five attempts pass and one fails, and each consumes ten minutes, that hour produces five merges despite continuous CI activity. This illustrative example ignores orchestration time and assumes equal duration for passing and failing runs; measure your own failure behavior.
Reducing check time from ten to eight minutes raises the ideal ceiling from six to 7.5 PRs per hour. That is a rate, not a promise that a fractional PR can merge. Adding more runners only helps this serial model if runner availability or job execution is part of the measured bottleneck.
Daily averages can hide an afternoon queue
Twenty PRs over eight hours average 2.5 per hour. A six-per-hour ideal ceiling appears sufficient. But if eight ready PRs arrive together after a review session, the last completes after 80 minutes in the ten-minute CI model.
That is 70 minutes waiting plus ten minutes being processed, assuming an initially empty queue, no failures, no orchestration delays, no priority changes, and uninterrupted execution. It is a deterministic example, not a prediction of average waiting time.
Inspect the busiest merge windows as well as the daily total. Leave capacity for retries and bursts rather than scheduling the queue at its theoretical maximum all day.
A one-week measurement worksheet
- Record ready times. When did each PR become approved and ready for validation? Opening time includes unrelated review delays.
- Record elapsed checks. Measure wall-clock duration for the required set, including runner waits.
- Compare actual completions. Count merges in the same busy windows. Orchestration delays can make observed throughput lower than the CI-only ceiling.
- Count unsuccessful attempts. Keep failures, retries, and conflicts visible rather than counting only merges.
- Inspect bursts. Compare arrivals and completions in the busiest hour, and note the longest wait.
Use typical duration for an initial estimate and repeat the calculation with a slower observed duration. That gives two explicit scenarios without pretending a short sample establishes a reliable long-term percentile.
Choose based on the bottleneck
A serial queue is a reasonable candidate when peak demand fits its measured capacity and waiting stays acceptable. If it does not, compare faster required checks, less coordination overhead, batching, or speculative validation.
Batching and concurrency change the model. They can increase throughput, but failures and retesting also change cost and latency. Mergify’s performance guide discusses those configuration tradeoffs. GitHub documents its native queue’s controls.
MergeRamp focuses on a serial workflow. Use these calculations to assess whether that approach fits your workload, then compare GitHub Team options and review MergeRamp pricing. MergeRamp’s current limits are in Limits. The illustrative queue demo shows the coordination concept; it is not a throughput benchmark.