[LARTC] IMQ, HTB and large bandwidth ...

Linux Advanced Routing and Traffic Control

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

 



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 perfect
but with incoming traffic it's not the same ...


Results are quite good up to 3MBytes of total shaped incoming traffic but above that
limit i can't understand what appends ..


an example : here are 2 classes i created, children of htb qdisc 1: default dd

class htb 1:1 root leaf 80c1: prio 3 rate 15625Kbit ceil 15625Kbit burst 21598b cburst 21598b class htb 1:2 root leaf 80c2: prio 3 rate 62500Kbit 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Ãcified 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 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 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 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 1:1
tc filter add dev imq0 parent 1: protocol ip pref 3 handle 0x2 fw flowid 1:2
/sbin/iptables -t mangle -A PREROUTING -j IMQ
/sbin/iptables -t mangle -A PREROUTING -i eth0 -p tcp -m state --state ESTABLISHED --dport 5008 -j MARK --set-mark 0x1
/sbin/iptables -t mangle -A PREROUTING -i eth0 -p tcp -m state --state ESTABLISHED --dport 5009 -j MARK --set-mark 0x2


Tested with Linux 2.4.21 + IMQ + HTB3

--
Julien Gateaud
Security Keepers S.A.


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