From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Furniss Date: Mon, 15 Sep 2014 17:27:59 +0000 Subject: Re: Can't get tc to limit network traffic Message-Id: <5417219F.8070305@gmail.com> List-Id: References: <541642D6.4040104@gmail.com> In-Reply-To: <541642D6.4040104@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org 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" > > 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