* [LARTC] HTB does not respect the prio parameter
@ 2007-08-29 8:06 Martin Björnsson
2007-08-29 8:58 ` bartekR
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Martin Björnsson @ 2007-08-29 8:06 UTC (permalink / raw)
To: lartc
Hi all,
I'm experimenting with HTB and the prio parameter and it does not give me results I
expect. I've created 4 HTB classes:
1:10 TCP ACKs (prio 0)
1:20 TCP traffic on dst port 10001 (prio 1)
1:30 TCP traffic on dst port 10000 (prio 2)
1:40 Default (prio 3)
ceil and rate parameters are the same for all 4 classes (rate is 1000kbit and ceil is
55000kbit).
Then I start 2 TCP flows on src/dst ports 10000 and 10001. The packets seem to be
correctly classified by the filter (I get hits on classes 10, 20 and 30).
The problem is that I get the same throughput on both TCP flows. Shouldn't I get about
1000kbit through class 30 and much more through class 20 since it has higher priority?
Here's my setup script:
#!/bin/sh
/bin/tc qdisc add dev eth0 root handle 1: htb default 40 && \
/bin/tc class add dev eth0 parent 1:0 classid 1:1 htb rate 55000kbit ceil 55000kbit
quantum 60000 && \
/bin/tc class add dev eth0 parent 1:1 classid 1:10 htb rate 1000kbit ceil 55000kbit prio 0
quantum 60000 && \
/bin/tc class add dev eth0 parent 1:1 classid 1:20 htb rate 1000kbit ceil 55000kbit prio 1
quantum 60000 && \
/bin/tc class add dev eth0 parent 1:1 classid 1:30 htb rate 1000kbit ceil 55000kbit prio 2
quantum 60000 && \
/bin/tc class add dev eth0 parent 1:1 classid 1:40 htb rate 1000kbit ceil 55000kbit prio 3
quantum 60000 && \
/bin/tc filter add dev eth0 parent 1:0 prio 99 handle 2: protocol ip u32 divisor 256 && \
/bin/tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 \
ht 2:0: \
match u8 0x06 0xff at 9 \
match u8 0x10 0xff at nexthdr+13 \
flowid 1:10 && \
/bin/tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 \
ht 2:0: \
match u8 0x06 0xff at 9 \
match u16 0x2711 0xffff at nexthdr+2 \
flowid 1:20 && \
/bin/tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 \
ht 2:0: \
match u8 0x06 0xff at 9 \
match u16 0x2710 0xffff at nexthdr+2 \
flowid 1:30 && \
/bin/tc filter add dev eth0 parent 1:0 protocol ip prio 99 u32 ht 800:: offset at 0 mask
0x0f00 shift 6 plus 0 match u8 0x40 0xf0 at 0 link 2: && \
/bin/tc qdisc add dev eth0 parent 1:10 handle 20: red limit 1000KB min 10KB max 300KB
avpkt 1000 burst 100 probability 0.02 && \
/bin/tc qdisc add dev eth0 parent 1:20 handle 30: red limit 1000KB min 10KB max 300KB
avpkt 1000 burst 100 probability 0.02 && \
/bin/tc qdisc add dev eth0 parent 1:30 handle 40: red limit 1000KB min 10KB max 300KB
avpkt 1000 burst 100 probability 0.02 && \
/bin/tc qdisc add dev eth0 parent 1:40 handle 50: red limit 1000KB min 10KB max 300KB
avpkt 1000 burst 100 probability 0.02 && \
Regards,
Martin
_______________________________________________
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
* Re: [LARTC] HTB does not respect the prio parameter
2007-08-29 8:06 [LARTC] HTB does not respect the prio parameter Martin Björnsson
@ 2007-08-29 8:58 ` bartekR
2007-08-29 10:50 ` Martin Björnsson
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bartekR @ 2007-08-29 8:58 UTC (permalink / raw)
To: lartc
Martin Björnsson pisze:
> Hi all,
>
> I'm experimenting with HTB and the prio parameter and it does not give me results I
> expect. I've created 4 HTB classes:
>
> 1:10 TCP ACKs (prio 0)
> 1:20 TCP traffic on dst port 10001 (prio 1)
> 1:30 TCP traffic on dst port 10000 (prio 2)
> 1:40 Default (prio 3)
>
> ceil and rate parameters are the same for all 4 classes (rate is 1000kbit and ceil is
> 55000kbit).
>
> Then I start 2 TCP flows on src/dst ports 10000 and 10001. The packets seem to be
> correctly classified by the filter (I get hits on classes 10, 20 and 30).
>
> The problem is that I get the same throughput on both TCP flows. Shouldn't I get about
> 1000kbit through class 30 and much more through class 20 since it has higher priority?
>
>
> Here's my setup script:
>
> #!/bin/sh
> /bin/tc qdisc add dev eth0 root handle 1: htb default 40 && \
> /bin/tc class add dev eth0 parent 1:0 classid 1:1 htb rate 55000kbit ceil 55000kbit
> quantum 60000 && \
> /bin/tc class add dev eth0 parent 1:1 classid 1:10 htb rate 1000kbit ceil 55000kbit prio 0
> quantum 60000 && \
> /bin/tc class add dev eth0 parent 1:1 classid 1:20 htb rate 1000kbit ceil 55000kbit prio 1
> quantum 60000 && \
> /bin/tc class add dev eth0 parent 1:1 classid 1:30 htb rate 1000kbit ceil 55000kbit prio 2
> quantum 60000 && \
> /bin/tc class add dev eth0 parent 1:1 classid 1:40 htb rate 1000kbit ceil 55000kbit prio 3
> quantum 60000 && \
> /bin/tc filter add dev eth0 parent 1:0 prio 99 handle 2: protocol ip u32 divisor 256 && \
> /bin/tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 \
> ht 2:0: \
> match u8 0x06 0xff at 9 \
> match u8 0x10 0xff at nexthdr+13 \
> flowid 1:10 && \
> /bin/tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 \
> ht 2:0: \
> match u8 0x06 0xff at 9 \
> match u16 0x2711 0xffff at nexthdr+2 \
> flowid 1:20 && \
> /bin/tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 \
> ht 2:0: \
> match u8 0x06 0xff at 9 \
> match u16 0x2710 0xffff at nexthdr+2 \
> flowid 1:30 && \
> /bin/tc filter add dev eth0 parent 1:0 protocol ip prio 99 u32 ht 800:: offset at 0 mask
> 0x0f00 shift 6 plus 0 match u8 0x40 0xf0 at 0 link 2: && \
> /bin/tc qdisc add dev eth0 parent 1:10 handle 20: red limit 1000KB min 10KB max 300KB
> avpkt 1000 burst 100 probability 0.02 && \
> /bin/tc qdisc add dev eth0 parent 1:20 handle 30: red limit 1000KB min 10KB max 300KB
> avpkt 1000 burst 100 probability 0.02 && \
> /bin/tc qdisc add dev eth0 parent 1:30 handle 40: red limit 1000KB min 10KB max 300KB
> avpkt 1000 burst 100 probability 0.02 && \
> /bin/tc qdisc add dev eth0 parent 1:40 handle 50: red limit 1000KB min 10KB max 300KB
> avpkt 1000 burst 100 probability 0.02 && \
>
> Regards,
> Martin
> _______________________________________________
> LARTC mailing list
> LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
>
>
As far as I know lower prio numbers (as 0) means higher priority and
higher prio numbers (as 7) means lower priority.
http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm
Bartek
----------------------------------------------------------------------
Mobilne wiadomo¶ci w Twojej komórce
>>> http://link.interia.pl/f1b71
_______________________________________________
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
* Re: [LARTC] HTB does not respect the prio parameter
2007-08-29 8:06 [LARTC] HTB does not respect the prio parameter Martin Björnsson
2007-08-29 8:58 ` bartekR
@ 2007-08-29 10:50 ` Martin Björnsson
2007-08-29 10:56 ` Nikolay Kichukov
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Martin Björnsson @ 2007-08-29 10:50 UTC (permalink / raw)
To: lartc
Yes, exactly. So my 1:20 class (prio 1) should get to send more than the 1:30 class. But
it doesn't, they both get about the same throughput.
Nobody else having problems with the prio parameter?
Martin
bartekR wrote:
> Martin Björnsson pisze:
>> Hi all,
>>
>> I'm experimenting with HTB and the prio parameter and it does not give
>> me results I
>> expect. I've created 4 HTB classes:
>>
>> 1:10 TCP ACKs (prio 0)
>> 1:20 TCP traffic on dst port 10001 (prio 1)
>> 1:30 TCP traffic on dst port 10000 (prio 2)
>> 1:40 Default (prio 3)
>>
>> ceil and rate parameters are the same for all 4 classes (rate is
>> 1000kbit and ceil is
>> 55000kbit).
>>
>> Then I start 2 TCP flows on src/dst ports 10000 and 10001. The packets
>> seem to be
>> correctly classified by the filter (I get hits on classes 10, 20 and 30).
>>
>> The problem is that I get the same throughput on both TCP flows.
>> Shouldn't I get about
>> 1000kbit through class 30 and much more through class 20 since it has
>> higher priority?
>>
>>
>> Here's my setup script:
>>
>> #!/bin/sh
>> /bin/tc qdisc add dev eth0 root handle 1: htb default 40 && \
>> /bin/tc class add dev eth0 parent 1:0 classid 1:1 htb rate 55000kbit
>> ceil 55000kbit
>> quantum 60000 && \
>> /bin/tc class add dev eth0 parent 1:1 classid 1:10 htb rate 1000kbit
>> ceil 55000kbit prio 0
>> quantum 60000 && \
>> /bin/tc class add dev eth0 parent 1:1 classid 1:20 htb rate 1000kbit
>> ceil 55000kbit prio 1
>> quantum 60000 && \
>> /bin/tc class add dev eth0 parent 1:1 classid 1:30 htb rate 1000kbit
>> ceil 55000kbit prio 2
>> quantum 60000 && \
>> /bin/tc class add dev eth0 parent 1:1 classid 1:40 htb rate 1000kbit
>> ceil 55000kbit prio 3
>> quantum 60000 && \
>> /bin/tc filter add dev eth0 parent 1:0 prio 99 handle 2: protocol ip
>> u32 divisor 256 && \
>> /bin/tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 \
>> ht 2:0: \
>> match u8 0x06 0xff at 9 \
>> match u8 0x10 0xff at nexthdr+13 \
>> flowid 1:10 && \
>> /bin/tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 \
>> ht 2:0: \
>> match u8 0x06 0xff at 9 \
>> match u16 0x2711 0xffff at nexthdr+2 \
>> flowid 1:20 && \
>> /bin/tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 \
>> ht 2:0: \
>> match u8 0x06 0xff at 9 \
>> match u16 0x2710 0xffff at nexthdr+2 \
>> flowid 1:30 && \
>> /bin/tc filter add dev eth0 parent 1:0 protocol ip prio 99 u32 ht
>> 800:: offset at 0 mask
>> 0x0f00 shift 6 plus 0 match u8 0x40 0xf0 at 0 link 2: && \
>> /bin/tc qdisc add dev eth0 parent 1:10 handle 20: red limit 1000KB min
>> 10KB max 300KB
>> avpkt 1000 burst 100 probability 0.02 && \
>> /bin/tc qdisc add dev eth0 parent 1:20 handle 30: red limit 1000KB min
>> 10KB max 300KB
>> avpkt 1000 burst 100 probability 0.02 && \
>> /bin/tc qdisc add dev eth0 parent 1:30 handle 40: red limit 1000KB min
>> 10KB max 300KB
>> avpkt 1000 burst 100 probability 0.02 && \
>> /bin/tc qdisc add dev eth0 parent 1:40 handle 50: red limit 1000KB min
>> 10KB max 300KB
>> avpkt 1000 burst 100 probability 0.02 && \
>>
>> Regards,
>> Martin
>> _______________________________________________
>> LARTC mailing list
>> LARTC@mailman.ds9a.nl
>> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
>>
>>
> As far as I know lower prio numbers (as 0) means higher priority and
> higher prio numbers (as 7) means lower priority.
>
> http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm
>
>
>
> Bartek
>
>
> ----------------------------------------------------------------------
> Mobilne wiadomo¶ci w Twojej komórce
>
>>>> http://link.interia.pl/f1b71
>
_______________________________________________
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
* Re: [LARTC] HTB does not respect the prio parameter
2007-08-29 8:06 [LARTC] HTB does not respect the prio parameter Martin Björnsson
2007-08-29 8:58 ` bartekR
2007-08-29 10:50 ` Martin Björnsson
@ 2007-08-29 10:56 ` Nikolay Kichukov
2007-09-06 21:26 ` Andy Furniss
2007-09-07 8:43 ` Justin Schoeman
4 siblings, 0 replies; 6+ messages in thread
From: Nikolay Kichukov @ 2007-08-29 10:56 UTC (permalink / raw)
To: lartc
Hello Martin,
I used to have this kind of problem before. Not sure if I resolved it
with the help of folks on this mailing list, but I never tested.
What you can try is to remove the prio parameter from the classes and
leave the prio only for the filters.
Let us know if that helps.
Cheers,
-Nikolay
Martin Björnsson wrote:
> Yes, exactly. So my 1:20 class (prio 1) should get to send more than the 1:30 class. But
> it doesn't, they both get about the same throughput.
>
> Nobody else having problems with the prio parameter?
>
> Martin
>
> bartekR wrote:
>> Martin Björnsson pisze:
>>> Hi all,
>>>
>>> I'm experimenting with HTB and the prio parameter and it does not give
>>> me results I
>>> expect. I've created 4 HTB classes:
>>>
>>> 1:10 TCP ACKs (prio 0)
>>> 1:20 TCP traffic on dst port 10001 (prio 1)
>>> 1:30 TCP traffic on dst port 10000 (prio 2)
>>> 1:40 Default (prio 3)
>>>
>>> ceil and rate parameters are the same for all 4 classes (rate is
>>> 1000kbit and ceil is
>>> 55000kbit).
>>>
>>> Then I start 2 TCP flows on src/dst ports 10000 and 10001. The packets
>>> seem to be
>>> correctly classified by the filter (I get hits on classes 10, 20 and 30).
>>>
>>> The problem is that I get the same throughput on both TCP flows.
>>> Shouldn't I get about
>>> 1000kbit through class 30 and much more through class 20 since it has
>>> higher priority?
>>>
>>>
>>> Here's my setup script:
>>>
>>> #!/bin/sh
>>> /bin/tc qdisc add dev eth0 root handle 1: htb default 40 && \
>>> /bin/tc class add dev eth0 parent 1:0 classid 1:1 htb rate 55000kbit
>>> ceil 55000kbit
>>> quantum 60000 && \
>>> /bin/tc class add dev eth0 parent 1:1 classid 1:10 htb rate 1000kbit
>>> ceil 55000kbit prio 0
>>> quantum 60000 && \
>>> /bin/tc class add dev eth0 parent 1:1 classid 1:20 htb rate 1000kbit
>>> ceil 55000kbit prio 1
>>> quantum 60000 && \
>>> /bin/tc class add dev eth0 parent 1:1 classid 1:30 htb rate 1000kbit
>>> ceil 55000kbit prio 2
>>> quantum 60000 && \
>>> /bin/tc class add dev eth0 parent 1:1 classid 1:40 htb rate 1000kbit
>>> ceil 55000kbit prio 3
>>> quantum 60000 && \
>>> /bin/tc filter add dev eth0 parent 1:0 prio 99 handle 2: protocol ip
>>> u32 divisor 256 && \
>>> /bin/tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 \
>>> ht 2:0: \
>>> match u8 0x06 0xff at 9 \
>>> match u8 0x10 0xff at nexthdr+13 \
>>> flowid 1:10 && \
>>> /bin/tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 \
>>> ht 2:0: \
>>> match u8 0x06 0xff at 9 \
>>> match u16 0x2711 0xffff at nexthdr+2 \
>>> flowid 1:20 && \
>>> /bin/tc filter add dev eth0 parent 1:0 protocol ip prio 10 u32 \
>>> ht 2:0: \
>>> match u8 0x06 0xff at 9 \
>>> match u16 0x2710 0xffff at nexthdr+2 \
>>> flowid 1:30 && \
>>> /bin/tc filter add dev eth0 parent 1:0 protocol ip prio 99 u32 ht
>>> 800:: offset at 0 mask
>>> 0x0f00 shift 6 plus 0 match u8 0x40 0xf0 at 0 link 2: && \
>>> /bin/tc qdisc add dev eth0 parent 1:10 handle 20: red limit 1000KB min
>>> 10KB max 300KB
>>> avpkt 1000 burst 100 probability 0.02 && \
>>> /bin/tc qdisc add dev eth0 parent 1:20 handle 30: red limit 1000KB min
>>> 10KB max 300KB
>>> avpkt 1000 burst 100 probability 0.02 && \
>>> /bin/tc qdisc add dev eth0 parent 1:30 handle 40: red limit 1000KB min
>>> 10KB max 300KB
>>> avpkt 1000 burst 100 probability 0.02 && \
>>> /bin/tc qdisc add dev eth0 parent 1:40 handle 50: red limit 1000KB min
>>> 10KB max 300KB
>>> avpkt 1000 burst 100 probability 0.02 && \
>>>
>>> Regards,
>>> Martin
>>> _______________________________________________
>>> LARTC mailing list
>>> LARTC@mailman.ds9a.nl
>>> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
>>>
>>>
>> As far as I know lower prio numbers (as 0) means higher priority and
>> higher prio numbers (as 7) means lower priority.
>>
>> http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm
>>
>>
>>
>> Bartek
>>
>>
>> ----------------------------------------------------------------------
>> Mobilne wiadomo¶ci w Twojej komórce
>>
>>>>> http://link.interia.pl/f1b71
> _______________________________________________
> LARTC mailing list
> LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
_______________________________________________
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
* Re: [LARTC] HTB does not respect the prio parameter
2007-08-29 8:06 [LARTC] HTB does not respect the prio parameter Martin Björnsson
` (2 preceding siblings ...)
2007-08-29 10:56 ` Nikolay Kichukov
@ 2007-09-06 21:26 ` Andy Furniss
2007-09-07 8:43 ` Justin Schoeman
4 siblings, 0 replies; 6+ messages in thread
From: Andy Furniss @ 2007-09-06 21:26 UTC (permalink / raw)
To: lartc
Martin Björnsson wrote:
> Yes, exactly. So my 1:20 class (prio 1) should get to send more than the 1:30 class. But
> it doesn't, they both get about the same throughput.
>
> Nobody else having problems with the prio parameter?
I would test without the reds.
I don't think red was really meant to be put as a child of a highly
variable rate class. Maybe they are dropping enough that the higher prio
class isn't permanently backlogged.
Andy.
_______________________________________________
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
* Re: [LARTC] HTB does not respect the prio parameter
2007-08-29 8:06 [LARTC] HTB does not respect the prio parameter Martin Björnsson
` (3 preceding siblings ...)
2007-09-06 21:26 ` Andy Furniss
@ 2007-09-07 8:43 ` Justin Schoeman
4 siblings, 0 replies; 6+ messages in thread
From: Justin Schoeman @ 2007-09-07 8:43 UTC (permalink / raw)
To: lartc
Is quantum not perhaps a bit high? Try setting it lower, and see what
happens?
-justin
On 2007-08-29 08:06, Martin Björnsson wrote:
> Hi all,
>
> I'm experimenting with HTB and the prio parameter and it does not give me results I
> expect. I've created 4 HTB classes:
>
> 1:10 TCP ACKs (prio 0)
> 1:20 TCP traffic on dst port 10001 (prio 1)
> 1:30 TCP traffic on dst port 10000 (prio 2)
> 1:40 Default (prio 3)
>
> ceil and rate parameters are the same for all 4 classes (rate is 1000kbit and ceil is
> 55000kbit).
>
> Then I start 2 TCP flows on src/dst ports 10000 and 10001. The packets seem to be
> correctly classified by the filter (I get hits on classes 10, 20 and 30).
>
> The problem is that I get the same throughput on both TCP flows. Shouldn't I get about
> 1000kbit through class 30 and much more through class 20 since it has higher priority?
>
>
> Here's my setup script:
>
> #!/bin/sh
> /bin/tc qdisc add dev eth0 root handle 1: htb default 40
_______________________________________________
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:[~2007-09-07 8:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-29 8:06 [LARTC] HTB does not respect the prio parameter Martin Björnsson
2007-08-29 8:58 ` bartekR
2007-08-29 10:50 ` Martin Björnsson
2007-08-29 10:56 ` Nikolay Kichukov
2007-09-06 21:26 ` Andy Furniss
2007-09-07 8:43 ` Justin Schoeman
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.