All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] HTB Rate and Prio
@ 2005-07-08 14:05 Gael Mauleon
  2005-07-08 14:58 ` Jody Shumaker
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Gael Mauleon @ 2005-07-08 14:05 UTC (permalink / raw)
  To: lartc


[-- Attachment #1.1: Type: text/plain, Size: 3638 bytes --]

 

Hi,

 

I wanted to implement some QOS on my Linux Box with HTB, but after some time
spend 

on the configuration and tests, I still don't manage to have some correct
results. Here are the details :

 

 

 

-ROOT 2000 kbits

            -HIGHPRIO SUBCLASS 50 kbits prio 0

            -SUBCLASS1 750 kbits prio 1

                        -SERVICE1 250 kbits prio 1

                        -SERVICE2 250 kbits prio 1

                        -SERVICE3 250 kbits prio 1

            -SUBCLASS2 750 kbits prio 1

                        -SERVICE1 250 kbits prio 1

                        -SERVICE2 250 kbits prio 1

                        -SERVICE3 250 kbits prio 1

            -SUBCLASS3   400 kbits prio 1

                        -SERVICE1 200 kbits prio 1

                        -SERVICE2 200 kbits prio 1

            -LOWPRIO SUBCLASS 50 kbits prio 5

 

Here is the details of the implementation, I only wrote 1 on the subclass

Cause they are all on the same template.

 

 

tc qdisc add dev $QOSIN root handle 1:0 htb default 1000

tc class add dev $QOSIN parent 1:0 classid 1:1 htb rate 2000kbit

 

### SUBCLASS1

tc class add dev $QOSIN parent 1:1 classid 1:10 htb rate 750kbit ceil
2000kbit prio 1

tc class add dev $QOSIN parent 1:10 classid 1:101 htb rate 250kbit ceil
2000kbit prio 1

tc qdisc add dev $QOSIN parent 1:101 handle 101: pfifo limit 10

tc class add dev $QOSIN parent 1:10 classid 1:102 htb rate 250kbit ceil
2000kbit prio 1

tc qdisc add dev $QOSIN parent 1:102 handle 102: pfifo limit 10

tc class add dev $QOSIN parent 1:10 classid 1:103 htb rate 250kbit ceil
2000kbit prio 1

tc qdisc add dev $QOSIN parent 1:103 handle 103: pfifo limit 10

 

tc filter add dev $QOSIN parent 1:0 protocol ip handle $OUTPROD$MAIL fw
flowid 1:101

tc filter add dev $QOSIN parent 1:0 protocol ip handle $OUTPROD$HTTP fw
flowid 1:102

tc filter add dev $QOSIN parent 1:0 protocol ip handle $OUTPROD$FTP fw
flowid 1:103

 

etc.

 

 

### HIGH PRIO ###

tc class add dev $QOSIN parent 1:1 classid 1:50 htb rate 50kbit ceil
2000kbit prio 0 quantum 1500

tc qdisc add dev $QOSIN parent 1:50 handle 50: pfifo limit 10

tc filter add dev $QOSIN parent 1:0 protocol ip handle $OUTPROD$HIGHPRIO fw
flowid 1:50

tc filter add dev $QOSIN parent 1:0 protocol ip handle $OUTPOSTPROD$HIGHPRIO
fw flowid 1:50

tc filter add dev $QOSIN parent 1:0 protocol ip handle $OUTDMZ$HIGHPRIO fw
flowid 1:50

 

### LOW PRIO ###

tc class add dev $QOSIN parent 1:1 classid 1:60 htb rate 50kbit ceil
2000kbit prio 5 quantum 1500

tc qdisc add dev $QOSIN parent 1:60 handle 60: pfifo limit 10

tc filter add dev $QOSIN parent 1:0 protocol ip handle $OUTPROD$LOWPRIO fw
flowid 1:60

tc filter add dev $QOSIN parent 1:0 protocol ip handle $OUTPOSTPROD$LOWPRIO
fw flowid 1:60

tc filter add dev $QOSIN parent 1:0 protocol ip handle $OUTDMZ$LOWPRIO fw
flowid 1:60

 

 

Every traffic seems to go in the class it must go, the stats are good and if
I change any of the ceil rate

the associated traffic is caped to the right ceil I enter. 

 

Now with this configuration I expected that when one of the SUBCLASS class
or SERVICE want more bandwith than its 

rate, she can borrow it from root and she had it before LOW PRIO and after
HIGH PRIO.

 

But it don't work at all, for exemple I tried only with 2 flow, I have 500
Kbits of LOW PRIO traffic that is currently

going on, then I fire some SERVICE1 traffic from SUBCLASS1 that can
theorically take 2000 kbits, and instead

of taking it from LOW PRIO, it just take what is left.

 

I surely miss something.

 

Thanks for your help and don't hesitate to ask more infos J

 

Gael.

 

 


[-- Attachment #1.2: Type: text/html, Size: 15870 bytes --]

[-- Attachment #2: Type: text/plain, Size: 143 bytes --]

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-07-08 22:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-08 14:05 [LARTC] HTB Rate and Prio Gael Mauleon
2005-07-08 14:58 ` Jody Shumaker
2005-07-08 16:05 ` Gael Mauleon
2005-07-08 19:11 ` Edgar
2005-07-08 19:23 ` Kirk Reiser
2005-07-08 22:58 ` Francisco Pereira

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.