Your network has plenty of bandwidth. So why are your requests still slow?

Linux
Networking
TCP
Performance Engineering
Systems Engineering
Why excessive local buffering inside Linux network stacks hurts latency, how TCP Small Queues (TSQ) limits downstream queue buildup, and how it complements TCP Pacing and qdisc.
Published

December 2, 2026

Tech Blog · 简体中文

The problem might not be in your network.

It might be inside your own Linux server.

Modern network stacks use buffering to improve throughput and absorb bursts.

But excessive buffering can introduce significant queueing delays, even before packets leave the host.

This is one of the problems TCP Small Queues (TSQ) was designed to address.

1. Bandwidth is not the same as latency

Imagine a connection transmitting at 100 Mbps.

If 1 MB of data is queued ahead of a packet, draining that queue takes roughly 80ms at that rate.

That’s 80ms of additional waiting, before considering propagation delay or remote processing.

A larger buffer may improve burst tolerance while simultaneously hurting latency.

2. The problem with excessive local queueing

A simplified Linux transmission path looks like this:

Application → TCP → qdisc → Network Device

TCP can hand packets to lower-layer queues faster than they can be transmitted.

Even when congestion control decides to reduce its sending window, packets already queued downstream cannot simply be taken back.

Excessive queueing delays congestion feedback and can hurt other latency-sensitive flows sharing the interface.

3. How TCP Small Queues helps

TSQ limits how much transmission memory an individual TCP socket can have outstanding in the lower layers of the local network stack.

Once the limit is reached, TCP temporarily stops pushing more data downstream.

Transmission resumes as outstanding buffers are released.

This reduces excessive local queueing without simply shrinking the application’s socket buffer.

Linux exposes a relevant upper-bound parameter:

net.ipv4.tcp_limit_output_bytes

4. TSQ, TCP Pacing, and qdisc solve different problems

  • TSQ limits per-socket downstream queue buildup.
  • TCP Pacing regulates when packets should be transmitted.
  • Queue disciplines manage packet scheduling and competition between flows.

They complement each other rather than replace one another.

For example, a server handling both large file transfers and latency-sensitive RPCs benefits from controlling bulk traffic’s queue buildup and scheduling behavior.

5. The engineering tradeoff

Too much buffering increases latency.

Too little buffering can reduce throughput and batching efficiency, particularly on high-speed network interfaces.

TSQ also cannot eliminate congestion or buffering elsewhere in the network.

The key takeaway:

High bandwidth doesn’t guarantee low latency.

Where packets wait, how long they wait, and how much data is already queued can matter just as much as link capacity.

Sometimes the best way to make a network faster is to make its queues smaller.