Coordinated Omission: Why Your Load Tool May Hide the Worst Latency
A closed-loop load generator stops sending when the system stalls, so its percentiles describe a calmer system than users saw. Learn to spot and fix it.
Coordinated omission is a measurement bug that lives inside the load generator. When the system under test stalls, a generator that waits for each response before sending the next request stops sending. The requests that would have queued up behind the stall never get issued, so they never get timed, and the percentile report describes a system that was calmer than the one real users met.
Gil Tene, who named the problem, describes it as the tester and the system coordinating to omit the bad samples. Nobody intends it. It falls out of how the simplest load loop is written.
A worked example
Take a virtual user that sends one request, waits for the reply, sleeps, and repeats. Suppose it is meant to issue a request every second, and the service answers in 10 ms. After a minute you have about 60 samples, all near 10 ms.
Now the service freezes for 20 seconds in the middle of the run. A garbage-collection pause, a lock held by a bad query, a failover: the cause does not matter. The virtual user sends a request, and the response takes 20 seconds. The generator records one slow sample of about 20 seconds, then resumes its normal rhythm. Over the whole minute the run holds about 40 fast samples and one terrible one.
Look at what a real client population does at a steady one request per second. During those 20 seconds, 20 requests arrive on schedule. The first waits 20 seconds, the second 19, the third 18, and so on down to the last, which waits about 1 second. Every one of them is a user who experienced the stall. Your generator recorded one of them. The other 19 were omitted because the thread that would have sent them was busy waiting.
These numbers are an illustration, but the shape is general. A freeze of length S against a schedule with interval I hides roughly S divided by I minus one samples, and the hidden samples are exactly the slow ones. Percentiles computed from the surviving data move toward the fast end. In the example, the recorded run has one slow sample in 41, so even the p95 looks healthy. A correct record has about 20 slow samples out of 60, which means a third of all requests were slow and the median itself sits close to the stall range.
Why closed-loop tools produce it
A closed model ties the next send to the previous completion. Each virtual user is a loop: request, response, think time, request. The offered load is a result of how fast the system answers. When the system slows down, offered load falls, which is the reverse of what happens in an internet-facing service where arrivals are independent of your latency.
An open model schedules arrivals by the clock. A new request starts at its planned time whether or not earlier ones have finished. The arrival rate versus concurrency post covers when each model fits the traffic you are simulating. For this topic the point is narrower: a closed loop is a fine model for some clients, but it cannot be trusted for tail latency during a stall, because the stall removes its own evidence.
Two common mitigations help only partly. Adding more virtual users raises the number of in-flight requests, so more samples land inside the stall, but each thread is still blocked for the full duration and each thread’s schedule is still bent. A pacing timer that delays threads to hit a target rate shapes the average rate but does not send the missed requests once a thread is free. When a thread returns from a 20-second wait, it does not issue 20 catch-up requests with their original timestamps.
How to spot it in your results
You can see the symptoms without a second tool.
Compare the request count with the plan. If the script was meant to issue 3,600 requests over an hour at one per second and the report shows 3,540, the 60 missing requests are a stall footprint. A throughput graph that dips during the same minute your server graphs show a pause is another sign. Real users do not stop arriving because your database paused.
Look at the longest response time against the percentiles. A maximum of 20 seconds beside a p99 of 150 ms means the extreme values are rare in the sample, which is the pattern a stall produces when the generator skips the queued requests. If you are not used to reading these distributions, the histogram guide shows how a long tail looks in bucket form.
Check whether response time and offered rate move in opposite directions. In an open workload the rate line stays flat while latency climbs. In a closed workload the rate line sags as latency climbs, and the two curves mirror each other. That mirror image is the closed-loop signature.
Fixing it at the source: schedule by intent
The reliable fix is to record latency from the time a request was supposed to start, not from the time the generator got around to sending it. If a request was intended at second 31 and the thread only freed up at second 51, its latency is the 20 seconds of delay plus the service time, not the service time alone.
Tools support this in different ways, so check your version’s documentation instead of assuming:
- Open-model executors. k6 offers arrival-rate executors that start iterations at a fixed rate and draw virtual users from a pool, and it reports dropped iterations when the pool runs dry. Gatling’s open injection profiles, such as constant users per second, schedule arrivals by the clock. Both turn the stall into a visible queue or a visible drop count.
- Corrected histograms. HdrHistogram can record a value together with the expected interval between samples and back-fill the missing ones. This is the mechanism behind the corrected output of wrk2, a fork of wrk built for constant-throughput measurement.
- Intended-start timestamps. If you write your own load runner, store the scheduled start and compute latency as completion minus scheduled start.
A sketch of the open-model setup in k6, with an explicit pool large enough to absorb a stall:
export const options = { scenarios: { steady: { executor: 'constant-arrival-rate', rate: 50, // iterations per second, independent of latency timeUnit: '1s', duration: '10m', preAllocatedVUs: 100, maxVUs: 400, // headroom so a stall queues instead of dropping }, },};Sizing maxVUs is the part that needs arithmetic. By Little’s Law the number of requests in flight equals arrival rate times time in system. At 50 requests per second a 20-second stall puts about 1,000 requests in flight, so a ceiling of 400 drops iterations during that event. A drop is an honest signal: it says the generator ran out of capacity to represent the load. Treat dropped iterations as a finding, and either raise the ceiling or report that the system could not keep up. The Little’s Law post gives the arithmetic for picking the pool.
When the generator itself is the bottleneck
An open model can fail in a second way. If the load generator runs out of CPU, its own scheduler falls behind, and the delays it introduces look like service latency. The result is the same distortion with a different cause. Watch generator CPU and run-queue depth during the test, and keep the machine well under saturation. The load generator bottleneck article lists what to check.
What to report
State the model next to the numbers. A line such as “open model, 50 iterations per second, latency measured from scheduled start, 0 dropped iterations” tells a reader how to interpret the percentiles. A line such as “closed model, 100 virtual users, 1 second think time” tells them the run is a concurrency test and that tail latency during stalls is understated.
Keep a closed-loop run when it matches the question. A fixed pool of workers pulling from a queue, a batch job with ten threads, or a connection-limited client is closed in production too, and its latency under a stall is the right thing to measure for that client. The mistake is using a closed loop to answer an open-world question such as what customers see during a pause.
A routine for any new test:
- Decide whether real arrivals depend on your response time. Public web traffic does not. A fixed worker pool does.
- Pick the executor that matches, and write the choice in the test notes.
- Add a deliberate stall in a staging environment, for example a pause in a dependency, and confirm the report shows the queue as slow samples or dropped iterations rather than as a quiet gap.
- Compare the request count against the plan after every run.
Step three pays off most. A load tool you have never watched under a stall is a tool whose behavior during your worst minute is unknown.
Using this on a platform
If you run tests through MaxoPerf, the script you upload decides the model, because the platform runs the underlying tool (k6, Gatling, JMeter or Locust, among others) through Taurus. Pick an open-model scenario in the script and keep the tool’s own dropped-iteration counters in view. The failure criteria you set on a run can then gate on the error rate and latency, so a stall that shows up as slow samples fails the run instead of passing quietly.