From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Furniss Date: Wed, 27 Jul 2005 13:25:13 +0000 Subject: Re: [LARTC] HTB and PRIO qdiscs introducing extra latency when output Message-Id: <42E78B39.1030201@dsl.pipex.com> List-Id: References: <1122460110.8454.11.camel@pgala.it.nuigalway.ie> In-Reply-To: <1122460110.8454.11.camel@pgala.it.nuigalway.ie> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org Jonathan Lynch wrote: > Could anyone tell me why the delay is so high (30ms) for VoIP packets > which are treated with the EF phb when the outgoing interface of core > router to network c is saturated ? > I have never used dsmark so am not sure about the classification parts of your rules. You need to check where the packets are going with with tc -s qdisc ls dev ... The other parts have some issues see below. > ----------------------------------------------------------------------------------------------- > The config I used for each setup is included below. These are slight > modifications that are supplied with iproute2 source code. > > Config 1 using htb > ------------------- > tc qdisc add dev $1 handle 1:0 root dsmark indices 64 set_tc_index > tc filter add dev $1 parent 1:0 protocol ip prio 1 tcindex mask 0xfc > shift 2 flowid/classid here maybe, to get packets to 2:0, though it may work - check. > > Main htb qdisc & class > tc qdisc add dev $1 parent 1:0 handle 2:0 htb > tc class add dev $1 parent 2:0 classid 2:1 htb rate 100Mbit ceil 100Mbit 100mbit will be too high if it's 100mbit nic. > > EF Class (2:10) > tc class add dev $1 parent 2:1 classid 2:10 htb rate 1500Kbit ceil > 100Mbit > tc qdisc add dev $1 parent 2:10 pfifo limit 5 > tc filter add dev $1 parent 2:0 protocol ip prio 1 handle 0x2e tcindex > classid 2:10 pass_on Don't know what pass_on will mean here. > > BE Class (2:20) > tc class add dev $1 parent 2:1 classid 2:20 htb rate 5Mbit ceil 100Mbit > tc qdisc add dev $1 parent 2:20 red limit 60KB min 15KB max 45KB burst > 20 avpkt 1000 bandwidth 100Mbit probability 0.4 > tc filter add dev $1 parent 2:0 protocol ip prio 2 handle 0 tcindex mask > 0 classid 2:20 pass_on > > Config 2 using PRIO > ------------------- > Main dsmark & classifier > tc qdisc add dev $1 handle 1:0 root dsmark indices 64 set_tc_index > tc filter add dev $1 parent 1:0 protocol ip prio 1 tcindex mask 0xfc > shift 2 > > Main prio queue > tc qdisc add dev $1 parent 1:0 handle 2:0 prio > tc qdisc add dev $1 parent 2:1 tbf rate 1.5Mbit burst 1.5kB limit 1.6kB Won't hurt if the packets are small voip but TBF has a nasty habit of taking 1 from the burst/mtu you specify so your burst setting may result in packets >1499B getting dropped - tc -s -d qdisc ls dev ... should show what it's using. > tc filter add dev $1 parent 2:0 protocol ip prio 1 handle 0x2e tcindex > classid 2:1 pass_on > > BE class(2:2) > tc qdisc add dev $1 parent 2:2 red limit 60KB min 15KB max 45KB burst 20 > avpkt 1000 bandwidth 100Mbit probability 0.4 > tc filter add dev $1 parent 2:0 protocol ip prio 2 handle 0 tcindex mask > 0 classid 2:2 pass_on Without wrapping it with something like htb red won't shape traffic. Andy. _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc