[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1394202127.20149.14.camel@edumazet-glaptop2.roam.corp.google.com>
Date: Fri, 07 Mar 2014 06:22:07 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Laight <David.Laight@...LAB.COM>
Cc: 'Neal Cardwell' <ncardwell@...gle.com>,
Rick Jones <rick.jones2@...com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: Can I limit the number of active tx per TCP socket?
On Fri, 2014-03-07 at 12:29 +0000, David Laight wrote:
> I'll probably look at delaying the sends within our own code.
That would be bad.
Just use fq/pacing, this is way better. Its designed for this usage.
trick is to reduce 'quantum' as you mtu is 273+14 bytes.
QUANTUM=$((273+14))
tc qdisc replace dev eth0 root fq quantum $QUANTUM initial_quantum $QUANTUM
This will _perfectly_ pace packets every 34 ms.
If you share your ethernet device with this 64k destination, and other
uses, then you need a more complex setup with HTB plus two classes, and
fq running at the htb leaf
DEV=eth0
MTU=273
QUANTUM=$(($MTU+14))
DESTINATION=10.246.11.52/32 # change this to meet the network/host
tc qdisc del dev $DEV root &> /dev/null
tc qdisc add dev $DEV handle 1: root htb default 1
tc class add dev $DEV parent 1: classid 1:1 htb rate 1Gbit
tc class add dev $DEV parent 1: classid 1:2 htb rate 64kbit
tc filter add dev $DEV protocol ip parent 1:0 prio 1 u32 match ip dst $DESTINATION flowid 1:2
tc qdisc add dev $DEV parent 1:1 est 1sec 4sec fq
tc qdisc add dev $DEV parent 1:2 est 1sec 4sec fq quantum $QUANTUM initial_quantum $QUANTUM
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists