[Netem] How to shape traffic while maintaining a constant RTT?

Dominik Kaspar dokaspar.ietf at gmail.com
Wed Oct 13 07:21:39 PDT 2010


Hello,

My goal is to emulate a link with a given bandwidth AND latency. At
the moment I combine tc-htb and netem for this purpose and it
basically it works all fine. Using "iperf", I can easily verify the
specified bandwidth and "ping" shows precisely the latency I set with
netem.

The problem is, however, that the bandwidth and latency settings do
not hold at the same time. When a TCP flow is running, it tries to
occupy the whole bandwidth and the traffic shaping queue gradually
fills up to its limit. As a consequence, the observed
application-layer latency grows to levels that are completely
different than what was specified with netem. The RTT can easily grow
up to several seconds, depending on the size of the queue. On the
other hand, reducing the queue size causes more frequent packet drops
and lowers the TCP throughput below the desired capacity.

It appears to be simply impossible to shape traffic to a given rate
while maintaining a constant RTT. How is this dilemma/tradeoff solved?
Does anyone know about references that target this problem?

Best regards,
Dominik Kaspar


More information about the Netem mailing list