Re: Problem with HTB and ceil

Linux Advanced Routing and Traffic Control

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

 



Carl-Daniel Hailfinger <c-d.hailfinger.devel.2005@xxxxxxx>:

> > the problem is that the ceil parameter doesnt seem to work on non leafs.
>
> IIRC that is by design. Some time ago, it was explained on this list
> in a much better way than I could do it now.

Yes, thanks I found something but I am not sure how to interpret what has been
said. It has been said that if the child classes summed up exceed the bitrate
of the parent class then the parent ceil setting will be ignored. Now I am not
sure if that only applies to the sum of the minimum bitrate or also of the
summed ceil bitrates of all child classes. Let me explain what I am trying to
achieve:

I have a link with 384kbps upstream, I want voip traffic to have the highest
prio, they should always leave the upstream first with a ceil limit of 96kbps
which is more than enogh, min 16kbit (should matter cause its priorized
anyway). Next priority should be ACK packets, they should have a ceil limit of
(380-16) 364kbit, default bitrate of 140. This should ensure that downloads are
not affected by any outgoing traffic except the voip traffic. SSH traffic is
next, I reserved a minimum bitrate of 16kbit with a ceiling of 364, then I got
http traffic again with min bitrate 16kbit, ceil limit of 364 and at last bulk
traffic, with a min bitrate 16kbit and ceil limit of 364:

                  o root 1:0
                  |
  ________________+ 1:002
 /                |
 |                | 1:101
 |      __________+__________
 |      |      |      |      |
 |      |      |      |      |
 |      |      |      |      |
voip   ACK    SSH    http   bulk
pr 0   pr 1   pr 2   pr 3   pr 4
1:100  1:200  1:300  1:300  1:400


What I have achieved so far is that voip is really priorized agains all other
classes. But priorizing the right half does not work, means ACK class has not
higher prio than the others.

My config so far:

--------
## Root
/sbin/tc qdisc add dev $EXTIF root handle 1:0 htb default 400
/sbin/tc class add dev $EXTIF parent 1:0 classid 1:002 htb rate 380kbit ceil
380kbit

## voip
/sbin/tc class add dev $EXTIF parent 1:002 classid 1:100 htb rate 16kbit ceil
96kbit prio 0
## non voip
/sbin/tc class add dev $EXTIF parent 1:002 classid 1:101 htb rate 364kbit ceil
364 prio 1

## ACK
/sbin/tc class add dev $EXTIF parent 1:101 classid 1:200 htb rate 140kbit ceil
364kbit prio 1
## SSH
/sbin/tc class add dev $EXTIF parent 1:101 classid 1:300 htb rate 140kbit ceil
364kbit prio 2
## http/https traffic
/sbin/tc class add dev $EXTIF parent 1:101 classid 1:400 htb rate 140kbit ceil
364kbit prio 3
## bulk
/sbin/tc class add dev $EXTIF parent 1:101 classid 1:500 htb rate 140kbit ceil
364kbit prio 4
--------

Stats show:
--------
class htb 1:200 parent 1:101 leaf 200: prio 1 quantum 1750 rate 140000bit ceil
364000bit burst 1774b/8 mpu 0b overhead 0b cburst 2066b/8 mpu 0b overhead 0b
level 0
 Sent 280764 bytes 4995 pkts (dropped 0, overlimits 0)
 lended: 4995 borrowed: 0 giants: 0
 tokens: 79347 ctokens: 34819

class htb 1:500 parent 1:101 leaf 500: prio 6 quantum 1000 rate 16000bit ceil
364000bit burst 1619b/8 mpu 0b overhead 0b cburst 2066b/8 mpu 0b overhead 0b
level 0
 Sent 3351886 bytes 3165 pkts (dropped 0, overlimits 0)
 rate 256bit
 lended: 150 borrowed: 3015 giants: 0
 tokens: 237570 ctokens: 17997
--------

As you can see the :200 class (ACK packets) have much lower bitrate than the
:500 (bulk packets), which slows down my downloads.

Any hints?

nik

_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

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