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

CBQ, maxburst, Ingress/Outgress



Hello


I have some problem. 

When I add the EF Class script (see below) to the
EGRESS interface for my realvideo flow it look like  the packets go to the
right class, the EF class which all packets marked with 0x2e should go. 

But it will not go to the right class on the INGRESS interface..
Look at the statestic for the two interfaces below.

Is this right?
Should I only set up the script on the EGRESS interface in that direction 
that the real time flow goes?
What is the Ingress queuing diciplin used for?


The two interfaces is the building blocks in my Linux ruter running RedHat
7.0 and kernel 2.4.0-test11

INGRESS interface for the realvideo stream...  Parent 2:0

class cbq 2: root rate 10Mbit (bounded,isolated) prio no-transmit
      Sent 34491821 bytes 86953 pkts (dropped 0, overlimits 0)
      borrowed 10 overactions 0 avgidle 605 undertime 0
 #THE EFCLASS at INGRESS
 class cbq 2:1 parent 2: leaf 8013: rate 1200Kbit (bounded,isolated) prio 2
      Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
      borrowed 0 overactions 0 avgidle 56299 undertime 0
 class cbq 2:2 parent 2: leaf 8014: rate 3Mbit prio 5
      Sent 33789329 bytes 70227 pkts (dropped 1, overlimits 0)
      borrowed 10 overactions 0 avgidle 42639 undertime 0

EGRESS interface for the realvideo stream... Parent 2:0

 class cbq 2: root rate 10Mbit (bounded,isolated) prio no-transmit
      Sent 925558 bytes 8597 pkts (dropped 0, overlimits 0)
      borrowed 0 overactions 0 avgidle 624 undertime 0
 #THE EF CLASS at EGRESS
 class cbq 2:1 parent 2: leaf 8015: rate 1200Kbit (bounded,isolated) prio 1
      Sent 6713325 bytes 5062 pkts (dropped 0, overlimits 5)
      borrowed 0 overactions 3 avgidle 45070 undertime 0
 class cbq 2:2 parent 2: leaf 8016: rate 3Mbit prio 5
      Sent 925474 bytes 8595 pkts (dropped 0, overlimits 0)
      borrowed 0 overactions 0 avgidle 44231 undertime 0


 It is exactly the same script attached to the two interfaces.. This is
 odd??? Class 2:1 is the EF class and class 2:2 is the Best Effort class.

At the same time I was wondering what the maxburst parameter for CBQ is 
doing..
10 bytes burst?? Is that just to put an value to the parameter because it
needs it, or does it have some meaning?
If it has some meaning what is the range of this parameter and what is a
burst in e.g a real time flow of 1Mbit.. Is it when the 1Mbit stream,
which is continuous, get an extra burst of 10Bytes?? This is strange..
Packets sent are of about 1500bytes.
If this parameter in use and what should it be?
Is the burst thougt of being packets transmitted beyond the bandwidth it is
assigned in the class. E.g the class is getting 1200Kbit. If the class try to 
push more than this over a short period is this then the burst?? In this 
manner how long is this period? 
One other thing... What about the word bounded.. If
this is specified the class is not allowed to borrow. What then about
burst??? Many questions there...


I also wondered about the isolated parameter.. It doesn't seem to work on
the CBQ queueing diciplin.
To get classes to behave as you think it should, is it then better to use
the TBF queueing diciplin as the buffer management instead of pFIFO and RED?
E.g in line 13 of the script. Could we use TBF here in stead of pFIFO and
in line 18-20 also use TBF insted of RED.. It is in my case the Best Effort
class that is eating up my bandwith in the EF class even though the EF
class is ISOLATED...



The EF-CBQ script...
 1. #!/bin/sh
 2. TC=/sbin/tc
 3. DEV=eth0

 4. $TC qdisc add dev $DEV handle 1:0 root dsmark indices 64 set_tc_index

 5. $TC filter add dev $DEV parent 1:0 protocol ip prio 1 tcindex mask
 6. 0xfc shift 2

 7. $TC qdisc add dev $DEV parent 1:0 handle 2:0 cbq\
 8.          bandwidth 10Mbit allot 1514 cell 8 avpkt 1000 mpu 64

 9. $TC class add dev $DEV parent 2:0 classid 2:1 cbq\
 10.             bandwidth 10Mbit\
 11.             rate 1200Kbit avpkt 1000 prio 2 bounded isolated\
 12.             allot 1514 weight 1 maxburst 10 defmap 1

 13 .$TC qdisc add dev $DEV parent 2:1 pfifo limit 5

 14. $TC filter add dev $DEV parent 2:0 protocol ip prio 2\
             handle 0x2e tcindex classid 2:1 pass_on

 15. $TC class add dev $DEV parent 2:0 classid 2:2 cbq\
 16.             bandwidth 10Mbit rate 3Mbit avpkt 1000 prio 5\
 17.            allot 1514 weight 1 maxburst 21 borrow

 18. $TC qdisc add dev $DEV parent 2:2 red limit 60KB min 15KB\
 19.            max 45KB burst 20 avpkt 1000 bandwidth 10Mbit\
 20.            probability 0.4

 21. $TC filter add dev $DEV parent 2:0 protocol ip prio 5\
 22.            handle 0 tcindex mask 0 classid 2:2 pass_on


Best regards
-- 

================,,,=========================
===============(o o)========================
===========oOO==(_)==OOo====================

Petter Larsen
Institutt for informatikk,
Universitetet i Oslo

sveinpe@ifi.uio.no
http://www.stud.ifi.uio.no/~sveinpe

Linux is best..:-)

===========ooooO==Ooooo=====================
===========(   )==(   )=====================
============\ (====) /======================
=============\_)==(_/=======================