[LARTC] the CBQ example again

Linux Advanced Routing and Traffic Control

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

 



Hi!
 Again mentioning the cbq example in the howto.
It says the two flows are shaped at 5 and 3 Mbit respectively and most
interesting for me "the sum of bandwith of the 2 classes will never be
more than 6mbit".
I slightly modified the example, just for results to be more visible,
and can't limit the total sum of bandwidth - each flow is limited to the
specified bandwidth, but total is just the sum of these bandwidths.
Here are needed info:

THE SCRIPT:
tc qdisc add dev eth1 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000
cell 8

tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate
60kbit weight 6kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000
bounded

tc class add dev eth1 parent 1:1 classid 1:3 cbq bandwidth 100Mbit rate
50kbit weight 5kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000

tc class add dev eth1 parent 1:1 classid 1:4 cbq bandwidth 100Mbit rate
40kbit weight 4kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000

tc qdisc add dev eth1 parent 1:3 handle 30: sfq
tc qdisc add dev eth1 parent 1:4 handle 40: sfq

tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip src
204.152.189.113/32 match ip dst 195.230.0.5 flowid 1:3

tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip src
134.108.34.10/32 match ip dst 195.230.0.5 flowid 1:4


LIST:
qdisc sfq 40: limit 128p quantum 1514b
qdisc sfq 30: limit 128p quantum 1514b
qdisc cbq 1: rate 100Mbit (bounded,isolated) prio no-transmit
class cbq 1: root rate 100Mbit (bounded,isolated) prio no-transmit
class cbq 1:1 parent 1: rate 60Kbit (bounded) prio no-transmit
class cbq 1:3 parent 1:1 leaf 30: rate 50Kbit prio 5
class cbq 1:4 parent 1:1 leaf 40: rate 40Kbit prio 5
filter parent 1: protocol ip pref 1 u32
filter parent 1: protocol ip pref 1 u32 fh 800: ht divisor 1
filter parent 1: protocol ip pref 1 u32 fh 800::800 order 2048 key ht
800 bkt 0 flowid 1:3
  match cc98bd71/ffffffff at 12
  match c3e60005/ffffffff at 16
filter parent 1: protocol ip pref 1 u32 fh 800::801 order 2049 key ht
800 bkt 0 flowid 1:4
  match 866c220a/ffffffff at 12
  match c3e60005/ffffffff at 16


STATS:
class cbq 1: root rate 100Mbit (bounded,isolated) prio no-transmit
 Sent 2017641 bytes 2512 pkts (dropped 0, overlimits 0)
  borrowed 0 overactions 0 avgidle 57 undertime 0
class cbq 1:1 parent 1: rate 60Kbit (bounded) prio no-transmit
 Sent 1595482 bytes 1101 pkts (dropped 0, overlimits 0)
  borrowed 0 overactions 0 avgidle -1.59273e+06 undertime 1.61401e+06
class cbq 1:3 parent 1:1 leaf 30: rate 50Kbit prio 5
 Sent 759497 bytes 534 pkts (dropped 0, overlimits 4636)
 backlog 29p
  borrowed 0 overactions 533 avgidle -1.21953e+06 undertime 21290
class cbq 1:4 parent 1:1 leaf 40: rate 40Kbit prio 5
 Sent 835985 bytes 567 pkts (dropped 0, overlimits 6001)
 backlog 29p
  borrowed 0 overactions 566 avgidle -249682 undertime 151689



IFSTAT:
       eth0
 KB/s in  KB/s out
   11.91      0.52
   10.25      0.45
   10.35      0.45
   11.83      0.52
   10.24      0.45
   11.59      0.52
   11.59      0.52
   10.01      0.45
   11.42      0.65
   11.72      0.78
   13.93      3.29
   12.47      1.89
   12.82      0.58
   10.10      0.45

What is wrong?



[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux