Skip to contentSkip to conversation

CBQ Rate

LARTC Emmanuel SIMON 3 participants 4 messages Sep 4, 2003 – Sep 5, 2003

lore
Share & tools
lore
#0 lore raw

Hi everyone,

This is on a linux box, ingress (eth1) at 100Mb/s and egress (eth0) at 10Mb/s. The purpose is to test CBQ
Here is my script

-------------------------------------------------------------------
# Root qdisc
tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 9Mbit \
avpkt 1000 cell 8

# Classes
tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 9Mbit \
rate 5Mbit weight 0.3 allot 1514 avpkt 1000 bounded prio 1
tc class add dev eth0 parent 1:0 classid 1:2 cbq bandwidth 9Mbit \
rate 5Mbit weight 0.3 allot 1514 avpkt 1000 bounded prio 2
tc class add dev eth0 parent 1:0 classid 1:3 cbq bandwidth 9Mbit \
rate 5Mbit weight 0.3 allot 1514 avpkt 1000 bounded prio 3

# Leaf qdiscs
tc qdisc add dev eth0 parent 1:1 handle 10:0 sfq perturb 10 tc qdisc add dev eth0 parent 1:2 handle 20:0 sfq perturb 10 tc qdisc add dev eth0 parent 1:3 handle 30:0 sfq perturb 10

# Filters
tc filter add dev eth0 parent 1:0 proto ip prio 0 u32 \
match ip tos 0x10 0xff flowid 1:1
tc filter add dev eth0 parent 1:0 proto ip prio 1 u32 \
match ip tos 0x04 0xff flowid 1:2
tc filter add dev eth0 parent 1:0 proto ip prio 2 u32 \
match ip tos 0x08 0xff flowid 1:3
-------------------------------------------------------------------

I send some traffic at different rate : 3Mb/s, 3.5Mb/s, 4Mb/s, 4.5Mb/s, 5Mb/s, 6Mb/s

1st in only one class at a time
=> the result is always 2.35Mb/s

then in the 3 classes at the same time with the same rates.
=> the result rate is close from wanted rate

Can someone explain to me why we I send data in only one class the rate is so low ?

Thank you
Emmanuel

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

#1 lore raw

It is me again.
is there nos a trouble in my script :
" ... rate 5Mbit weight 0.3 ..." --> is it compatible ??

Thanks again

Quoted 56 lines

-----Message d'origine-----
De : [email protected]
[mailto:[email protected]]De
la part de Emmanuel SIMON
Envoyé : jeudi 4 septembre 2003 17:40
À : 'LARTC'
Objet : [LARTC] CBQ Rate

Hi everyone,

This is on a linux box, ingress (eth1) at 100Mb/s and egress (eth0) at 10Mb/s. The purpose is to test CBQ
Here is my script

-------------------------------------------------------------------
# Root qdisc
tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 9Mbit \
avpkt 1000 cell 8

# Classes
tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 9Mbit \
rate 5Mbit weight 0.3 allot 1514 avpkt 1000 bounded prio 1
tc class add dev eth0 parent 1:0 classid 1:2 cbq bandwidth 9Mbit \
rate 5Mbit weight 0.3 allot 1514 avpkt 1000 bounded prio 2
tc class add dev eth0 parent 1:0 classid 1:3 cbq bandwidth 9Mbit \
rate 5Mbit weight 0.3 allot 1514 avpkt 1000 bounded prio 3

# Leaf qdiscs
tc qdisc add dev eth0 parent 1:1 handle 10:0 sfq perturb 10 tc qdisc add dev eth0 parent 1:2 handle 20:0 sfq perturb 10 tc qdisc add dev eth0 parent 1:3 handle 30:0 sfq perturb 10

# Filters
tc filter add dev eth0 parent 1:0 proto ip prio 0 u32 \
match ip tos 0x10 0xff flowid 1:1
tc filter add dev eth0 parent 1:0 proto ip prio 1 u32 \
match ip tos 0x04 0xff flowid 1:2
tc filter add dev eth0 parent 1:0 proto ip prio 2 u32 \
match ip tos 0x08 0xff flowid 1:3
-------------------------------------------------------------------

I send some traffic at different rate : 3Mb/s, 3.5Mb/s, 4Mb/s, 4.5Mb/s,
5Mb/s, 6Mb/s

1st in only one class at a time
=> the result is always 2.35Mb/s

then in the 3 classes at the same time with the same rates.
=> the result rate is close from wanted rate

Can someone explain to me why we I send data in only one class the rate is
so low ?

Quoted 7 lines

Thank you
Emmanuel

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

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

#2 lore raw
In reply to Emmanuel SIMON
Quoted 3 lines · Emmanuel SIMON

It is me again.
is there nos a trouble in my script :
" ... rate 5Mbit weight 0.3 ..." --> is it compatible ??

Yes. But take weight = rate / 10 as a general rule.
And your bandwidth parameter should be the real NIC bandwidth. So 10mbit. And it's also better to create a "parent" class attached to the root qdisc. And different prio's in the filter statement will not change much. It only determines the order the filters are checked.

Quoted 60 lines

Thanks again

Quoted 58 lines

-----Message d'origine-----
De : [email protected]
[mailto:[email protected]]De
la part de Emmanuel SIMON
Envoyé : jeudi 4 septembre 2003 17:40
À : 'LARTC'
Objet : [LARTC] CBQ Rate

Hi everyone,

This is on a linux box, ingress (eth1) at 100Mb/s and egress (eth0) at 10Mb/s. The purpose is to test CBQ
Here is my script

-------------------------------------------------------------------
# Root qdisc
tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 9Mbit \
avpkt 1000 cell 8

# Classes
tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 9Mbit \
rate 5Mbit weight 0.3 allot 1514 avpkt 1000 bounded prio 1
tc class add dev eth0 parent 1:0 classid 1:2 cbq bandwidth 9Mbit \
rate 5Mbit weight 0.3 allot 1514 avpkt 1000 bounded prio 2
tc class add dev eth0 parent 1:0 classid 1:3 cbq bandwidth 9Mbit \
rate 5Mbit weight 0.3 allot 1514 avpkt 1000 bounded prio 3

# Leaf qdiscs
tc qdisc add dev eth0 parent 1:1 handle 10:0 sfq perturb 10 tc qdisc add dev eth0 parent 1:2 handle 20:0 sfq perturb 10 tc qdisc add dev eth0 parent 1:3 handle 30:0 sfq perturb 10

# Filters
tc filter add dev eth0 parent 1:0 proto ip prio 0 u32 \
match ip tos 0x10 0xff flowid 1:1
tc filter add dev eth0 parent 1:0 proto ip prio 1 u32 \
match ip tos 0x04 0xff flowid 1:2
tc filter add dev eth0 parent 1:0 proto ip prio 2 u32 \
match ip tos 0x08 0xff flowid 1:3
-------------------------------------------------------------------

I send some traffic at different rate : 3Mb/s, 3.5Mb/s, 4Mb/s, 4.5Mb/s,
5Mb/s, 6Mb/s

1st in only one class at a time
=> the result is always 2.35Mb/s

then in the 3 classes at the same time with the same rates.
=> the result rate is close from wanted rate

Can someone explain to me why we I send data in only one class the rate is
so low ?

Thank you
Emmanuel

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#3 lore raw
In reply to Emmanuel SIMON
Quoted 2 lines

And different prio's in the filter statement will not change much. It only determines the order the filters are checked.

But wasn't there a bug in 'tc' that would delete all your filters that had the same prio, when you only wanted to delete one of them?

Signature · 5 lines
Damjan Georgievski
jabberID: [email protected]
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/