Fiveable

📡Systems Approach to Computer Networks Unit 4 Review

QR code for Systems Approach to Computer Networks practice questions

4.2 Queuing Theory and Packet Loss

4.2 Queuing Theory and Packet Loss

Written by the Fiveable Content Team • Last updated August 2025
Written by the Fiveable Content Team • Last updated August 2025
📡Systems Approach to Computer Networks
Unit & Topic Study Guides

Queuing Theory and Packet Loss

Queuing theory gives you a mathematical framework for analyzing how packets wait in line at network devices and, critically, when those lines overflow. It connects arrival rates, service rates, and buffer sizes to predict packet loss probability, letting you move from "the network feels slow" to quantifiable performance metrics. This section covers the core parameters, stability conditions, causes of loss, and the queuing disciplines that control how routers decide which packets get served first.

Queuing Theory in Packet Loss

When packets reach a router or switch, they don't get forwarded instantly. They enter a queue (a buffer in memory) and wait for the outgoing link to become available. If packets arrive faster than the device can forward them, the queue grows. Once the buffer is full, every additional arriving packet is dropped. That's packet loss.

Queuing theory formalizes this situation. It models any system where "customers" (packets) arrive, wait, and get "served" (transmitted), and it gives you equations to predict:

  • How long the queue will be on average
  • How long a packet will wait before being forwarded
  • The probability that an arriving packet finds a full buffer and gets dropped

These predictions let network designers size buffers, provision link capacity, and choose queuing disciplines before problems show up in production.

Queuing theory in packet loss, Queueing in the Linux Network Stack | Dan Siemon

Analysis of Network Queue Performance

Three parameters sit at the core of every queuing model:

  • Arrival rate (λ\lambda): the average number of packets arriving at the queue per second.
  • Service rate (μ\mu): the average number of packets the outgoing link can transmit per second. This is determined by link bandwidth and average packet size.
  • Queue length (LL): the average number of packets sitting in the queue at any given moment.

Little's Law ties these together:

L=λ×WL = \lambda \times W

where WW is the average time a packet spends waiting in the queue. This relationship holds for any stable queuing system, regardless of the arrival or service distribution, which makes it extremely useful as a quick sanity check.

Stability condition: λ<μ\lambda < \mu. If the arrival rate meets or exceeds the service rate, the queue grows without bound and packet loss becomes inevitable. The ratio ρ=λμ\rho = \frac{\lambda}{\mu} is called traffic intensity (or server utilization). Values of ρ\rho close to 1 mean the queue is heavily loaded and delays spike sharply.

Common queuing models add specific assumptions so you can get closed-form results:

  • M/M/1: Poisson arrivals, exponential service times, single server (one outgoing link). Average number of packets in the system is ρ1ρ\frac{\rho}{1 - \rho}. Simple to compute, useful as a baseline.
  • M/M/1/K: Same as M/M/1 but with a finite buffer of size KK. This model directly gives you the packet loss probability, since arrivals that find KK packets already queued are dropped.
  • M/M/c: Multiple servers (multiple outgoing links), useful for modeling load-balanced or multi-path scenarios.

The "M" stands for Markovian (memoryless), meaning inter-arrival and service times follow exponential distributions. Real network traffic is often burstier than this, so these models give you a starting point rather than an exact answer.

Queuing theory in packet loss, Packet loss chart in Ping-exp – Dan Siemon

Overloaded Queues and Packet Loss

Packet loss happens when a packet arrives at a full buffer and the device has no choice but to discard it. Three common causes push queues into overflow:

  • Bursty traffic: Network traffic doesn't arrive at a smooth, constant rate. Sudden spikes (a large file transfer starting, a video call ramping up) can temporarily push λ\lambda well above μ\mu, even if the average load is manageable.
  • Insufficient buffer space: Routers have finite memory for queues. A larger buffer can absorb short bursts, but it also increases queuing delay. Buffer sizing is a trade-off, not a simple "bigger is better" decision.
  • Bottleneck links: When many flows converge on a single link whose capacity is lower than the sum of incoming rates, congestion builds at that point regardless of buffer size.

Impact on performance:

  • Reduced throughput: TCP interprets packet loss as a congestion signal and cuts its sending rate. Retransmissions also consume bandwidth that could carry new data.
  • Increased latency: Retransmitted packets add at least one extra round-trip time to delivery. Even packets that aren't lost experience longer queuing delays in a congested buffer.
  • Degraded application quality: Real-time applications like VoIP and video streaming are especially sensitive. They often can't wait for retransmissions, so lost packets translate directly into audio glitches or video artifacts.

Impact on reliability:

  • Lost packets can mean incomplete file transfers or corrupted data at the application layer if the transport protocol doesn't recover them.
  • Retransmissions inject additional traffic into an already congested network, which can create a cascading effect where congestion feeds more congestion.

Queuing Disciplines for Network Performance

A queuing discipline is the rule a router uses to decide which packet in the buffer gets transmitted next. The choice of discipline directly affects which traffic experiences loss and delay during congestion.

First-In-First-Out (FIFO)

Packets are forwarded in the exact order they arrive. FIFO is the default on most interfaces because it's simple and treats all traffic equally. The downside is that it can't distinguish between a time-sensitive VoIP packet and a bulk file download. During congestion, latency-sensitive traffic suffers the same delays and drop rates as everything else.

Priority Queuing (PQ)

Traffic is classified into priority levels (typically high, medium, normal, low). The router always serves the highest-priority non-empty queue first. This guarantees minimal delay for high-priority traffic like voice or emergency services, but it introduces a serious risk: starvation. If high-priority traffic is heavy enough, lower-priority queues never get served at all.

Weighted Fair Queuing (WFQ)

Each traffic class gets a queue with an assigned weight. The scheduler allocates bandwidth proportionally to those weights. A class with weight 4 gets roughly twice the bandwidth of a class with weight 2. WFQ avoids starvation because every class is guaranteed some share of the link, while still letting higher-weighted classes get preferential treatment. The trade-off is increased complexity in configuration and per-packet scheduling overhead compared to FIFO or PQ.

Quick comparison:

DisciplinePrioritizationStarvation RiskComplexity
FIFONoneNoneLow
PQStrictHighMedium
WFQWeighted/proportionalLowHigh

Choosing the right discipline depends on the traffic mix. A network carrying mostly best-effort web traffic may be fine with FIFO. A network supporting VoIP alongside bulk transfers likely needs PQ or WFQ to protect real-time flows without completely starving background traffic.