Arne Van Theemsche
2002-Jun-17 12:23 UTC
2 subclasses use more bandwidth then the rootclass has been allocated
Hi I have the rootdevice allocated 512k bandwidth (with the htb qdisc), then I have 2 subclasses each 384k (1 ceiled to 384k, 1 burstable to 512k). both work fine, but the problem is, that when they both start a download, they both get 384k, together more then 512k (the rate of the root-class) this is my setup ./tc qdisc add dev eth1 root handle 1: htb default 30 ./tc class add dev eth1 parent 1: classid 1:1 htb rate 512kbit ceil 512kbit burst 15k ./tc class add dev eth1 parent 1:1 classid 1:10 htb rate 384kbit ceil 512kbit burst 15k ./tc class add dev eth1 parent 1:1 classid 1:20 htb rate 384kbit ceil 384kbit burst 15k ./tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 ./tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 ./tc filter add dev eth1 parent 1: protocol ip prio 1 handle 1 fw classid 1:10 ./tc filter add dev eth1 parent 1: protocol ip prio 1 handle 2 fw classid 1:20 I mark my packets with iptables (which works just fine, limitting both classes to the amount given) I tried a similar setup with cbq, resulting in the same effect I use 2.4.18 (self-compiled), with the htb (v2) module attached to it, on a redhat 7.2, the tc-binarie is htb-aware, but i don''t think this is the problem, since when i use the cbq-class, i use the original tc binarie included in redhat 7.2 does anybody has a clue? thx Arne
Stef Coene
2002-Jun-17 14:38 UTC
Re: 2 subclasses use more bandwidth then the rootclass has been allocated
On Monday 17 June 2002 14:23, Arne Van Theemsche wrote:> Hi > > I have the rootdevice allocated 512k bandwidth (with the htb qdisc), then > I have 2 subclasses each 384k (1 ceiled to 384k, 1 burstable to 512k). > > both work fine, but the problem is, that when they both start a download, > they both get 384k, together more then 512k (the rate of the root-class)Normally the rate is a minimum bandwidth that''s always reached. But the classes should also respect the ceiled bandwidth of the parent. Are you sure the packets ends up in the right class? And what if you generate only traffic in 1 class? Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net