Skip to contentSkip to conversation

CBQ inaccuracy

LARTC Amit Kucheria 3 participants 5 messages Dec 13, 2001

lore
Share & tools
lore
#0 lore raw

I have found CBQ to be very inaccurate (as others on the list)

I have created a structure as follow

Root (10mbit)
|
CBQ class (bandwidth=1mbit, ratembit)
|
CBQ qdisc (bandwidth=1mbit)

Now when i send excess data to the tune of 1.3mbit, cbq lets it thru. If i increase it beyond that, CBQ suddenly wakes up and throttles it down to about 0.8Mbit!

Are there any explanations? If i am sending fixed size packets, should i set the 'avpkt' to that size?

I havent even able to use HTB correctly since a small burst size kills my thruput.

Any ideas about CBQ/HTB or anything which will throttle my bandwidth to 1Mbit accurate *and* allow me to create qdiscs within. (Hence TBF is ruled out). My HTB script is given below i am no clue why it doesnt work.

-----------------------------------------------------------------------
BANDWIDTH="bandwidth 10Mbit"
LIMITBW="1Mbit"

$TC qdisc add $DEVICE root handle 1: htb

# This HTB class rate limits everyting to 1Mbit
$TC class add $DEVICE parent 1: classid 1:1 htb rate $LIMITBW ceil $LIMITBW burst 2k
----------------------------------------------------------------------

Signature · 13 lines
The statement below is true.
The statement above is false.
^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^
                  Amit Kucheria
          EECS Grad. Research Assistant
         University of Kansas @ Lawrence
   (R)+1-(785)-830 8521 ||| (O)+1-(785)-864 7774
____________________________________________________


_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
#1 lore raw
Quoted 9 lines · Amit Kucheria

I have found CBQ to be very inaccurate (as others on the list)

I have created a structure as follow

Root (10mbit)
|
CBQ class (bandwidth=1mbit, ratembit)
|
CBQ qdisc (bandwidth=1mbit)

Um, this doesn't make sense. I keep repeating this to posters here, SHOW YOUR CONFIGURATION! Don't just draw pictures - your CBQ commandlines may not do what you think they do.

In this case, it appears you've attached a qdisc within a qdisc or something, I'm not sure. That could cause huge inaccuracies.

So show your configuration.

Regards,

bert

Signature · 8 lines
http://www.PowerDNS.com          Versatile DNS Software & Services
Trilab                                 The Technology People
Netherlabs BV / Rent-a-Nerd.nl           - Nerd Available -
'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
#2 lore raw
In reply to Amit Kucheria
Quoted 11 lines · bert hubert
Quoted 9 lines · Amit Kucheria

I have found CBQ to be very inaccurate (as others on the list)

I have created a structure as follow

Root (10mbit)
|
CBQ class (bandwidth=1mbit, ratembit)
|
CBQ qdisc (bandwidth=1mbit)

Quoted 3 lines

Um, this doesn't make sense. I keep repeating this to posters here, SHOW YOUR CONFIGURATION! Don't just draw pictures - your CBQ commandlines may not do what you think they do.

My apologies. Here's the script

---------------------------------------------------------------------------
BANDWIDTHºndwidth 10Mbit
LIMITBW=1Mbit

# Root CBQ qdisc 1:
$TC qdisc add $DEVICE root handle 1: cbq $BANDWIDTH $AVPKT

# Root CBQ class 1:1
# This class rate limits everyting to 1Mbit
$TC class add $DEVICE parent 1:0 classid 1:1 cbq $BANDWIDTH rate $LIMITBW \
maxburst 100 $AVPKT allot 1514 weight 100Kbit prio 1 bounded isolated

# Filter packet from the 2 sources
$TC filter add $DEVICE parent 1: protocol ip prio 1 u32 match ip src $SRC1 flowid 1:1
$TC filter add $DEVICE parent 1: protocol ip prio 1 u32 match ip src $SRC2 flowid 1:1

# CBQ qdisc 2:0
$TC qdisc add $DEVICE parent 1:1 handle 2:0 cbq bandwidth $LIMITBW $AVPKT allot 1514
-------------------------------------------------------

Signature · 13 lines
The statement below is true.
The statement above is false.
^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^
                  Amit Kucheria
          EECS Grad. Research Assistant
         University of Kansas @ Lawrence
   (R)+1-(785)-830 8521 ||| (O)+1-(785)-864 7774
____________________________________________________


_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
#3 lore raw
In reply to Amit Kucheria
Quoted 37 lines · you
Quoted 7 lines · bert hubert
Quoted 6 lines · Amit Kucheria

I have found CBQ to be very inaccurate (as others on the list)

I have created a structure as follow

Root (10mbit)

Quoted 7 lines
Quoted 3 lines

CBQ class (bandwidth=1mbit, rate=10mbit)

CBQ qdisc (bandwidth=1mbit)

Um, this doesn't make sense. I keep repeating this to posters here, SHOW YOUR CONFIGURATION! Don't just draw pictures - your CBQ commandlines may not do what you think they do.

My apologies. Here's the script

---------------------------------------------------------------------------
BANDWIDTH=bandwidth 10Mbit
LIMITBW=1Mbit

# Root CBQ qdisc 1:
$TC qdisc add $DEVICE root handle 1: cbq $BANDWIDTH $AVPKT

# Root CBQ class 1:1
# This class rate limits everyting to 1Mbit
$TC class add $DEVICE parent 1:0 classid 1:1 cbq $BANDWIDTH rate $LIMITBW \
maxburst 100 $AVPKT allot 1514 weight 100Kbit prio 1 bounded isolated

# Filter packet from the 2 sources
$TC filter add $DEVICE parent 1: protocol ip prio 1 u32 match ip src $SRC1 flowid 1:1
$TC filter add $DEVICE parent 1: protocol ip prio 1 u32 match ip src $SRC2 flowid 1:1

Quoted 4 lines

# CBQ qdisc 2:0
$TC qdisc add $DEVICE parent 1:1 handle 2:0 cbq bandwidth $LIMITBW $AVPKT allot 1514
-------------------------------------------------------

I'm not seeing any big errors. I tried also the bounded parameter of CBQ, you can find the results on docum.org. I was able to throttle the bandwidth at each speed I want. I din't attach the second CBQ, but only used the bounded class, maybe you can try again without the second CBQ. And don't use the isolated parameter. It's not working and sometimes it can disturb the configuration.

Stef

Signature · 8 lines
[email protected]
 More QOS info : http://docum.org/
 Title : "Using Linux as bandwidth manager"
     

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
#4 lore raw
In reply to Amit Kucheria
Quoted 5 lines · Stef Coene
Quoted 5 lines
Quoted 3 lines

Um, this doesn't make sense. I keep repeating this to posters here, SHOW YOUR CONFIGURATION! Don't just draw pictures - your CBQ commandlines may not do what you think they do.

My apologies. Here's the script

Amit, no apologies are needed, it's just that it helps to get good answers :-)

Quoted 3 lines
Quoted 3 lines

# CBQ qdisc 2:0
$TC qdisc add $DEVICE parent 1:1 handle 2:0 cbq bandwidth $LIMITBW $AVPKT allot 1514

Just don't do this. Having a CBQ within a CBQ is useless and can indeed cause weird behaviour. You will get two qdiscs 'stacked' so to speak, both trying to shape traffic. At times, the inner qdisc will not want to give up data, which doesn't make life easier on the outer one.

CBQ can do shaping out of its own accord - it doesn't need a second shaper to do that for it. For the same reasone, people should not embed TBFs in CBQ!

Regards,

bert

Signature · 8 lines
http://www.PowerDNS.com          Versatile DNS Software & Services
Trilab                                 The Technology People
Netherlabs BV / Rent-a-Nerd.nl           - Nerd Available -
'SYN! .. SYN|ACK! .. ACK!' - the mating call of the internet

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/