Skip to content
WebsiteHosting.com

concept Hosting

Noisy neighbors and tail latency in shared hosting

A shared server can be busy for the same fraction of time yet make some requests wait much longer. Compare spaced arrivals with a burst to see what average utilization leaves out.

Latest recorded source check · P0116

What it means

Average CPU use alone cannot tell you a site's p99 latency. On a shared host, another site's requests can reach a busy resource just before yours. Your request then takes longer to finish, not because it needs more service, but because it has to wait its turn. This is one possible noisy-neighbor effect. A slow request by itself does not identify a neighbor as the cause.

Try it

Simulation: Compare 100 identical requests at one server that handles them one at a time, in arrival order. Start with spread, 10 ms of service per request, a 20 ms arrival interval, and scenario evidence provided. Then change only the arrival pattern to burst. All 100 requests now arrive at time zero. How much does the 99th-ranked response time change when the amount of work stays the same?

Noisy neighbors and tail latency in shared hosting

Show why shared resource queues change p99 latency independently of average CPU use

Simulation
Modeled outcome: Queue

Single-server FIFO completion times reflect arrival clustering, even with the same total work.

Noisy neighbors and tail latency in shared hosting: synthetic scenario inputs
Replaces all inputs with the documented starting example and the indicated change. Reset restores the starting example.
Same work, different tail

Workload

  1. Patternspread
  2. Total service work1000 ms
  3. Reference window3000 ms
  4. Modeled busy fraction33.3%
p50 · 50th ranked request10 ms
p99 · 99th ranked request10 ms
Request 1 serviceArrived 0 ms · waited 0 ms · finished 10 ms
Arrival 0 ms
Request 2 serviceArrived 20 ms · waited 0 ms · finished 30 ms
Arrival 20 ms
Request 3 serviceArrived 40 ms · waited 0 ms · finished 50 ms
Arrival 40 ms
070 ms

The percentile bars share a millisecond scale. The first three requests illustrate service occupancy and waiting; the reference window is not the actual finish time.

Evaluated inputs

Required scenario evidence
provided
Arrival pattern
spread
Spread arrival interval
20 ms
Per request service time
10 ms

100 identical requests, one FIFO server, fixed observation window long enough to finish; not a measured hosting or CPU benchmark.

About this model

The controls set only a local, bounded scenario. The computed branch is not a verdict about a live system. Inputs listed as not evaluated did not participate in this branch after validation.

Reset restores the original inputs. It does not change the open or closed state of help or FAQ answers.

Result at the shared resourceSpreadBurst
p50 response time10 ms500 ms
p99 response time10 ms990 ms
Total service time1,000 ms1,000 ms
Observation window3,000 ms3,000 ms

The server is busy for one-third of each window. That fraction counts busy milliseconds; it does not say whether those milliseconds came in short stretches or one uninterrupted run. It is utilization of the simulated server, not a host CPU reading.

Service time and spread arrival interval each accept whole numbers from 1 to 100 ms. In burst, the interval still helps set the observation window, but it does not space the arrivals. With valid settings, choosing missing for scenario evidence gives no latency estimate, not a latency of zero. An invalid setting gives an input error rather than a previous result. Reset restores the spread example.

Where the extra 980 ms comes from

With spread arrivals, the server takes the first request at 0 ms and finishes it at 10 ms. The next request arrives at 20 ms and finishes at 30 ms. Its response time is 10 ms, not 30 ms: the clock for a request starts at its own arrival. Each subsequent request also finds the server free.

With burst arrivals, only the first request starts immediately. The next waits 10 ms before its own 10 ms of service. The request in position 99 waits for 98 earlier requests: 980 ms waiting plus 10 ms in service makes 990 ms from arrival to completion.

In the default first-three-request timeline, the spacing is at least the service time, so each request arrives no earlier than the previous completion. If spacing is shorter than service time, even evenly spaced arrivals build a queue. For a burst, the arrival markers coincide, while the service bars remain sequential. This is why a longer response does not imply a longer service duration. The three displayed intervals illustrate the mechanism; the percentile bars summarize all 100 requests.

The model uses nearest-rank percentiles. Sort the 100 response times from shortest to longest and take the 50th for p50 and the 99th for p99, without averaging adjacent values. In the burst, response times increase in 10 ms steps. That puts p50 at 500 ms and p99 at 990 ms; the last request takes 1,000 ms. It is the overlap between arrivals and unfinished work that changes those ranks, not a slower service time.

In practice

For a real slowdown, start with the requests behind the percentile. Compare the same kind of request at the same measurement point over comparable windows. If arrival, service-start, and finish times are available at a suspected resource, separate the wait before service from time spent in service. A cluster of arrivals followed by longer waits and unchanged service times is evidence of queueing there. It still does not tell you whose work was ahead of yours.

On Linux cgroup v2, CPU throttling counters in cpu.stat offer a different clue: an increase in throttling counters is evidence of CPU limit enforcement for the group. Those counters do not record how long each request took, so they cannot supply its p99 or identify a noisy neighbor.

The useful comparison is when work arrived versus when the resource could serve it. If all you have is an average utilization number, the timing of contention is still unknown. Look for request timing in the affected interval before attributing the slowdown to shared hosting.

Frequently asked questions

Editorial questions based on the listed sources and explicitly labeled local examples.

Why p99 rather than average?

The average summarizes all observations. The p99 depends on the upper part of the ordered sample, so a small group of slow requests can be important even when the average looks acceptable.

Is this a provider benchmark?

No. Arrival times and service slots are synthetic. Compare observed request distributions at the same measurement scope before assessing any real hosting service.

Can utilization be equal?

Yes, if total busy time and measurement window match.

Do more workers always fix it?

Not if a different resource is limiting completions. In a separate hypothetical example, a device can complete at most 100 operations per second. More workers may submit more work but cannot raise that stipulated service ceiling. Identify the limiting resource before choosing a change.

Sources & model boundaries

Primary references used for this explanation. The interactive example is an educational model, not a live check.

  1. Dean and Barroso: The Tail at Scale

    Latency variability and hedged requests. Aggregate requests can wait for slow subtasks; hedged requests may reduce tail delay at the cost of extra work. No universal numeric speedup follows.

    Checked .

  2. Linux Control Group v2

    CPU interface; cpu.stat. On Linux cgroup v2, CPU throttling counters give evidence of limit enforcement; they are not themselves a request latency distribution.

    Checked .

Report an issue. Include the article URL and ID, not passwords or access keys.