I wanted to observe the congestion window of a TCP flow so for that I have two nodes (using linux namespaces) connected to each other through veth pairs and a bridge.

To limit bandwitdh to 10mbps I use a htb qdisc in each interface with a queue length of 1000 packets.

Then I set an iperf session between them:

  1. You can observe that the bit rate does adapt to the bandwidth the qdisc will shape for us.

  2. However checking the pcap file and queues drop counters also see that there are never drops or as an effect retransmissions

If I start a second flow they both get a fair share of 5mbps.

What it is going on here? How is TCP adapting the flow size if there is the congestion control is not getting signals? Am I missing something ?

1 Answer 1


Wow, I think you could be seeing the effect of the TCP Small Queues feature. Within a single machine, TCP Small Queues will limit the packets queued in qdiscs and device buffers to a default of 128 KB.

TCP would be throttling when that limit is reached, without actually overflowing any buffers.

This suggests that to get drops, you'd want to connect 3 VMs (i.e. separate emulated kernels) together - sender, "router", and receiver.

I vaguely remember there might be reasons for using separate machines/VMs when using netem to simulate delay or limited bandwidth too. It seems like this is good practice in general.

  • What I don't understand is: lets say that the TCP flow is infinite in size (i am filling the sending buffer all the time for example), and there are never drops, the flow should start filling the qdisc at a higher rate than it is getting empty why is that not happening?
    – edgarstack
    Jul 16, 2017 at 12:51
  • I'm not sure what's unclear, sorry. The patch description is great patchwork.ozlabs.org/patch/170486 or you can read about it on LWN lwn.net/Articles/507065 is that any better?
    – sourcejedi
    Jul 16, 2017 at 15:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.