SEARCH THE LAB

What are you looking for?

ScienceReview information not provided

A Router with More Memory Makes Web Pages Slower: Bufferbloat in the Queue

Review information not provided · 4 min

Swap in a router with more memory, and web pages become even more sluggish while a large file downloads. This is not mysticism; it is a direct consequence of…

A Router with More Memory Makes Web Pages Slower: Bufferbloat in the Queue

Swap in a router with more memory, and web pages become even more sluggish while a large file downloads. This is not mysticism; it is a direct consequence of queueing theory in the home network. The router's memory has to reserve room for packets waiting to be forwarded. The more memory there is, the longer the queue that can form, and every packet in that queue must wait for the packets ahead of it to be sent out.

Start with a simplified link. Suppose the egress bandwidth is 10 megabits per second and the buffer is 1 megabyte. A 1500-byte packet takes about 1.2 milliseconds to send out, and 1 megabyte comes to roughly 700 packets. When the queue is completely full, the last packet must wait about 0.8 seconds before it begins transmitting. That 0.8 second is pure queueing delay, determined only by how long the queue is and how fast the egress is. Bandwidth buys throughput; the buffer brings waiting.

The trouble is that TCP senses the network through round-trip acknowledgments. The sender emits a batch of packets and advances only after acknowledgments return. The later the acknowledgments come back, the harder it is to tell whether the link capacity is full or the path is merely queued up. A deep buffer delays the acknowledgments and dilutes the congestion signal, so the sender keeps adding more, the queue fills further, and latency rises. This state, in which the queue sits for long stretches at a high water mark and latency is passively inflated, is bufferbloat. In other words, queue length is a passive latency budget determined by the memory ceiling.

The harm is asymmetric. A sustained heavy flow, such as backing up a photo album to the cloud, will push the uplink queue close to full. At that moment, a web request that should take tens of milliseconds, or a voice packet for a video conference, must also line up behind hundreds of packets. What the user feels is not slower downloads but a spinner on everything and a hitch in the conversation. Throughput may not drop at all, yet the interactive experience collapses. Small packets and low-latency flows are especially sensitive to this queueing, and they are precisely the ones that most need timely delivery.

One more easily overlooked detail: queues are usually counted in bytes, so a 1500-byte packet and a 64-byte packet occupy different amounts of space, but when converted to delay both are computed at the egress rate. If the queue uses tail drop and stays near full for long periods, multiple TCP flows hit loss together, slow down together, and then speed up together again, and link utilization rises and falls like breathing. This is called global synchronization. Such synchronization makes latency swing up and down rather than hold at a steady value.

The intuitive fix is to shrink the buffer, but that runs to the other extreme: too small a queue leaves the link idle whenever there is a lull, and bursts get needlessly dropped and trigger retransmissions. The more common approach is active queue management: instead of waiting for the queue to fill before dropping, look at how long a packet has already been queued. As soon as a packet has stayed in the queue longer than a small target value, drop it early or mark it with a congestion flag, so the sender slows down sooner. Queue depth is held at a shallow level; bursts can still be absorbed, and latency does not pile up over the long run. Then queue per flow, so heavy flows and small requests each wait in their own line and do not block each other. In measurement, people often look at loaded latency minus idle latency; that difference exposes the problem best.

The limitations must be stated too. First, laggy web pages are not all bufferbloat: contention and retransmission on the wireless channel, slow domain resolution, slow server processing, and browser rendering all produce a similar feel. Second, latency must be observed separately in idle and loaded states; looking only at the idle value misses the queueing problem. Third, this mechanism mainly constrains TCP that obeys congestion control; it has limited effect on UDP traffic that does not acknowledge. Fourth, queues can appear on the carrier side, in the home gateway, even in the virtualization layer, and changing only one end may not help. Fifth, a target latency set too small sacrifices throughput, and one set too large returns you to the original state; the parameters must be weighed against link characteristics.

So large memory itself is not wrong; the mistake is treating memory as a better network. The buffer is headroom kept for bursts, not a warehouse for long-term queueing. To evaluate a link, besides download speed, one should also look at how responsive it is when busy.