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

CBQ scheduling



I'm observing behavior for CBQ scheduling that I cannot explain.
The scenario looks as follows:

           D
          /
A -  B - C
          \
           E

A is running Linux 2.2.14 with the diffserv patches applied, all
links are 10MBit/s, and A is configured to do CBQ scheduling with
a bandwidth distribution of 9:1 (The configuration file is appended.)

I'm running a bulk-data UDP flow from A to D and a second one from
A to E.

Bandwidth distribution works as expected unless I configure the two
child classes to be non-bounded. In that case, both flows get about
the same bandwidth. Is there a logical explanation for this behavior?

In the case of bounded classes, when I run only the low-bandwidth
flow, this flow gets very low bandwidth (<< 1 MBit/s). Again, can
anyone explain this observation?

- Urs


#! /bin/sh
TC=/home/uhengart/iproute2/tc/tc
DEVICE=eth1
LINERATE=10Mbit
SHARE1ST=1Mbit
SHARE2ND=9Mbit
AVGPKT=1000

$TC qdisc del dev $DEVICE root

$TC qdisc add dev $DEVICE root handle 1: cbq \
                 bandwidth $LINERATE cell 8 avpkt $AVGPKT mpu 64

$TC class add dev $DEVICE parent 1:0 classid 1:1 cbq\
                 bandwidth $LINERATE \
                 rate $LINERATE avpkt $AVGPKT prio 8 \
                 allot 1514 weight 1 maxburst 20 cell 8
$TC class add dev $DEVICE parent 1:1 classid 1:2 cbq \
                 bandwidth $LINERATE \
                 rate $SHARE1ST avpkt $AVGPKT prio 5 \
                 allot 1514 weight 1 maxburst 20 cell 8 #bounded
$TC class add dev $DEVICE parent 1:1 classid 1:3 cbq \
                 bandwidth $LINERATE \
                 rate $SHARE2ND avpkt $AVGPKT prio 5 \
                 allot 1514 weight 1 maxburst 20 cell 8 #bounded

$TC filter add dev $DEVICE parent 1:0 prio 5 protocol ip u32 \
                 match ip dst 192.168.4.2 flowid 1:2
$TC filter add dev $DEVICE parent 1:0 prio 5 protocol ip u32 \
                 match ip dst 192.168.7.2 flowid 1:3