Reference Entry

Latency (Systems and Computing)

Reference entry · last updated September 7, 2026

Latency is the time interval elapsed between the initiation of an operation or request and the observation of its initial result or complete delivery. While throughput measures the aggregate rate of completed production units over time, latency quantifies individual turnaround duration or delay. In computer systems, network engineering, distributed services, and machine learning inference, latency is decomposed into physical propagation, transmission delay, serialization, processing execution time, and queuing overhead.

1. First Principles: Latency vs. Throughput

In computer architecture, David A. Patterson and John L. Hennessy distinguish between performance metrics: response time (latency) is the total elapsed time required to complete a single task, whereas throughput is the total amount of work accomplished per unit time [1].

The relationship is often illustrated by physical pipeline dynamics:

A high-throughput system is not necessarily low-latency. For instance, transporting terabytes of data across continents via physical magnetic tape shipments delivers massive throughput, but exhibits extreme latency (measured in hours or days). Conversely, an audio streaming connection requires minimal latency (sub-10ms) while demanding modest throughput.

[Request Origin] → (Propagation + Transmission) → [Queue Wait] → [Service Execution] → [Response Delivery] |←------------------------------------ Total Response Latency (W) ------------------------------------→|

2. Structural Components of Latency

In network and distributed systems engineering, end-to-end latency \(L_{\text{total}}\) decomposes into four additive components [2]:

\[L_{\text{total}} = T_{\text{prop}} + T_{\text{trans}} + T_{\text{proc}} + T_{\text{queue}}\]

2.1 Propagation and Transmission Delays

2.2 Processing and Memory Delays

2.3 Queuing Delays

Queuing Delay (\(T_{\text{queue}}\)): The time a job spends waiting in buffers or scheduler queues before an idle execution worker begins servicing it. While propagation, transmission, and processing times are relatively deterministic for a given payload size, queuing delay is highly variable and depends on resource contention and arrival distribution.

3. Mathematical Models and Queuing Dynamics

Queuing theory establishes formal mathematical bounds governing how latency escalates under increasing operational load.

3.1 Little's Law and Capacity Bounds

John D. C. Little proved in 1961 that for any stable queuing system, the long-term average number of concurrent items inside the system \(L\) equals the arrival rate (throughput) \(\lambda\) multiplied by the average time \(W\) an item spends in the system [3]:

\[L = \lambda W \quad \implies \quad W = \frac{L}{\lambda}\]

Little's Law demonstrates that average latency \(W\) cannot be reduced without either reducing concurrency \(L\) (limiting in-flight work) or increasing processing rate \(\lambda\).

3.2 Kingman's Heavy Traffic Approximation

In single-server queuing systems (\(G/G/1\)), J. F. C. Kingman (1961) proved that average waiting time \(W_q\) diverges non-linearly as system utilization \(\rho\) approaches 100% (\(\rho \to 1\)) [4]:

\[W_q \approx \left( \frac{\rho}{1 - \rho} \right) \left( \frac{c_a^2 + c_s^2}{2} \right) \tau\]

where \(\rho = \lambda \tau\) is utilization, \(\tau\) is mean service time, \(c_a\) is the coefficient of variation of arrivals, and \(c_s\) is the coefficient of variation of service times.

As utilization climbs past 80%, the term \(\frac{\rho}{1 - \rho}\) escalates rapidly. Running hardware or agent pipelines near 100% capacity guarantees queuing collapse and severe latency spikes.

4. Tail Latency and Percentile Distributions

In production environments, mean (average) latency obscures user experience because distribution tails follow heavy-tailed or multi-modal patterns. Systems performance engineers evaluate latency via percentiles:

4.1 The Amplification of Tail Latency at Scale

In modern microservice and distributed retrieval architectures, a single user request fans out to \(M\) distinct backend workers (such as database shards or vector search partitions). In their landmark paper The Tail at Scale (2013), Jeffrey Dean and Luiz André Barroso demonstrated that overall user latency is determined by the slowest responding shard [5]:

\[P(\text{user request encounters } 99\text{th percentile tail}) = 1 - (1 - 0.01)^M\]
Fan-Out Degree (\(M\)) Fraction of User Requests Delayed by 99th Percentile Tail
1 1.0%
10 9.6%
100 63.4%
1,000 99.99%

When a request queries 1,000 servers in parallel, virtually 100% of user interactions will experience the slowest server's 99th percentile delay.

4.2 Tail-Tolerant Architectural Techniques

Dean and Barroso outlined techniques to tame tail latency in distributed architectures:

5. Latency in Machine Learning and LLM Serving

In large language model serving, latency divides into two distinct operational phases [7]:

Techniques like continuous batching, chunked prefill, and speculative decoding specifically balance the trade-off between maximizing server throughput and minimizing per-user generation latency.

See also

References

  1. D. A. Patterson and J. L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 6th ed., Morgan Kaufmann, 2020. Ch. 1: "Computer Abstractions and Technology."
  2. J. F. Kurose and K. W. Ross, Computer Networking: A Top-Down Approach, 8th ed., Pearson, 2021. Ch. 1: "Delay, Loss, and Throughput in Packet-Switched Networks."
  3. J. D. C. Little, "A Proof for the Queuing Formula: \(L = \lambda W\)," Operations Research, vol. 9, no. 3, 1961, pp. 383–387.
  4. J. F. C. Kingman, "The Single Server Queue in Heavy Traffic," Mathematical Proceedings of the Cambridge Philosophical Society, vol. 57, no. 4, 1961, pp. 902–904.
  5. J. Dean and L. A. Barroso, "The Tail at Scale," Communications of the ACM, vol. 56, no. 2, 2013, pp. 74–80. Free full text: https://cacm.acm.org/practice/the-tail-at-scale/
  6. B. Gregg, Systems Performance: Enterprise and the Cloud, 2nd ed., Addison-Wesley, 2020. Ch. 2: "Methodologies and Concepts."
  7. W. Kwon et al., "Efficient Memory Management for Large Language Model Serving with PagedAttention," in Proceedings of the 29th ACM Symposium on Operating Systems Principles (SOSP), 2023, pp. 611–626.