Re: Can't get tc to limit network traffic

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Mon, Sep 15, 2014 at 8:27 PM, Andy Furniss <adf.lists@xxxxxxxxx> wrote:
> Dave Taht wrote:
>>> tc qdisc add dev ifb0 parent 1:1 handle 10: fq_codel noecn target
>>> 50ms interval 100ms
>> the fq_codel internet draft[1] suggests that "interval"
>> SHOULD be set on the order of the worst-case RTT through the
>> bottleneck to give end-points sufficient time to react.
>> so if you are using a satellite comms system, use 1200ms as the
>> interval, if you are in new zealand, use 240ms, for most of the rest
>> of the world, 100ms is the default and "good enough".
>> As for "interval"

Thinko: meant "target"

>> The default target value is 5 ms, but this value SHOULD be tuned to
>> be at least the transmission time of a single MTU-sized packet at
>> the prevalent egress link speed (which for e.g. 1Mbps and MTU 1500
>> is ~15ms).
>> and should be 5-10% of the interval, regardless. We hope to remove
>> the target parameter entirely in some future version of codel - it's
>> actually the interaction with tbf/htb/hfsc which buffers up an extra
>> packet here that requires it be increased at very low bandwidths.
>> So in this case, 2mbit, a target 8ms would be sufficient. It doesn't
>> hurt to go bigger, but 50ms is overmuch.
> Thanks for that, I am really out of date with the new stuff.
> While doing a quick test of this I just noticed that fq_codel saw
> maxpacket 4542 but htb didn't count a giant - so I guess htbs limit is
> higher than it used to be at least.
> Of course the packet was fake (I know nothing that big goes on the
> wire), but it serves to remind me that generic-receive-offload is on by
> default and if I were to shape for real on this box it would be better
> off (for low speed shaping).
> ethtool -K eth0 gro off

Note that on a router GRO should be off on *all* interfaces. In fact I recommend
tso,gso,gro, and lro all be off on a router. Let packets be packets!

There is a script out there that helps. See also:

If anyone out there is up for patching new kernels and doing some
benchmarking, we have a new all-singing-all-dancing "tbf + diffserv +
fq_codel" single line rate limiting qdisc under development,
tenatively called "cake". If you want a shot at it, let me know.


Dave Täht
To unsubscribe from this list: send the line "unsubscribe lartc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux