From: Julien Gateaud Date: Wed, 02 Jul 2003 16:37:36 +0000 Subject: [LARTC] IMQ, HTB and large bandwidth ... Message-Id: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org Hi, Maybe someone could help me with this ... I'm doing some rate limiting tests with large bandwidth (>3MBytes). HTB qdisc + IMQ just work fine on outgoing traffic, results are almost=20 perfect but with incoming traffic it's not the same ... Results are quite good up to 3MBytes of total shaped incoming traffic but=20 above that limit i can't understand what appends .. an example : here are 2 classes i created, children of htb qdisc 1: default= =20 dd class htb 1:1 root leaf 80c1: prio 3 rate 15625Kbit ceil 15625Kbit burst=20 21598b cburst 21598b class htb 1:2 root leaf 80c2: prio 3 rate 62500Kbit=20 ceil 62500Kbit burst 81584b cburst 81584b 62500Kbit -> 8Mo 15625Kbit -> 2Mo leaves are prio qdiscs but results are the same with sfq or no leaves. traffic with port dest 5008 goes to class 1:1 (with fw mark) traffic with port dest 5009 goes to class 1:2 (with fw mark) I generate traffic with iperf for port 5008 and 5009, here is the result : [ ID] Interval Transfer Bandwidth [ 6] 0.0-20.0 sec 23672 KBytes 1183 KBytes/sec <-port 5008 [ ID] Interval Transfer Bandwidth [ 6] 0.0-20.0 sec 98680 KBytes 4927 KBytes/sec <-port 5009 Results are very far from sp=C3=A9cified rates ... And its even worst when I also generate traffic for a non shaped port. I also noticed that if a class like those is created, total bandwidth of=20 interface goes down to 64MBit instead of ~93Mbit with no QoS. Could someone explain that to me ?? here is complete configuration file : tc qdisc add dev imq0 root handle 1: htb default dd tc class add dev imq0 classid 1:1 parent 1: htb rate 2000000bps prio 3 ceil= =20 2000000bps tc qdisc add dev imq0 parent 1:1 prio tc class add dev imq0 classid 1:2 parent 1: htb rate 8000000bps prio 3 ceil= =20 8000000bps tc qdisc add dev imq0 parent 1:2 prio tc filter add dev imq0 parent 1: protocol ip pref 3 handle 0x1 fw flowid=20 1:1 tc filter add dev imq0 parent 1: protocol ip pref 3 handle 0x2 fw flowid=20 1:2 /sbin/iptables -t mangle -A PREROUTING -j IMQ /sbin/iptables -t mangle -A PREROUTING -i eth0 -p tcp -m state --state=20 ESTABLISHED --dport 5008 -j MARK --set-mark 0x1 /sbin/iptables -t mangle -A PREROUTING -i eth0 -p tcp -m state --state=20 ESTABLISHED --dport 5009 -j MARK --set-mark 0x2 Tested with Linux 2.4.21 + IMQ + HTB3 --=20 Julien Gateaud Security Keepers S.A. _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/