Skip to contentSkip to conversation

CBQ_bandwidth

LARTC Raghuveer 2 participants 10 messages Aug 20, 2003 – Aug 22, 2003

lore
Share & tools
lore

Raghuveer

author
#0 lore raw

Hi Stef,

Reffering to page < http://www.docum.org/stef.coene/qos/faq/cache/7.html

Quoted 1 line

I found a para as follows,

" CBQ is not always as accurate as it should be. See docum.org on the test page for some tests with bounded classes. The algorithm used by cbq is very "link sensitive". It calculates the link idle time and for that it needs the real link bandwidth, average packet size and some other parameters. But there calculations are not always accurate. So it's possible that you will get inaccurate results if you use CBQ to limit the traffic in a class. "

Here Iam slightly confused with real link bandwidth, Can I understand that while creating CBQ we need interface bandwidth (ethtool, mii-diag) and and while assigning the classes real link bandwidth is required. An example will definately help me. Can you pls suggest a way to find real link bandwidth....? As ethtool and mii-diag will only get the interface bandwidth.

Regards
-Raghu

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

#1 lore raw
Quoted 14 lines · Raghuveer

Hi Stef,

Reffering to page < http://www.docum.org/stef.coene/qos/faq/cache/7.html

Quoted 1 line

I found a para as follows,

" CBQ is not always as accurate as it should be. See docum.org on the test page for some tests with bounded classes. The algorithm used by cbq is very "link sensitive". It calculates the link idle time and for that it needs the real link bandwidth, average packet size and some other parameters. But there calculations are not always accurate. So it's possible that you will get inaccurate results if you use CBQ to limit the traffic in a class. "

Quoted 6 lines

Here Iam slightly confused with real link bandwidth, Can I understand that while creating CBQ we need interface bandwidth (ethtool, mii-diag) and and while assigning the classes real link bandwidth is required. An example will definately help me. Can you pls suggest a way to find real link bandwidth....? As ethtool and mii-diag will only get the interface bandwidth.

The bandwidth parameter is the real link bandwidth like ethtook or mii-diag will show you.
If you want to limit all traffic to the link bandwidth, you have to create a class that's bounded and with rate = link bandwidth. You can create non-bounded sub classes but the bandwidth will be limit by the bounded class to the link bandwidth.

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/
author
#2 lore raw
In reply to Raghuveer
Quoted 25 lines · Stef Coene
Quoted 14 lines · Raghuveer

Hi Stef,

Reffering to page < http://www.docum.org/stef.coene/qos/faq/cache/7.html

Quoted 1 line

I found a para as follows,

" CBQ is not always as accurate as it should be. See docum.org on the test page for some tests with bounded classes. The algorithm used by cbq is very "link sensitive". It calculates the link idle time and for that it needs the real link bandwidth, average packet size and some other parameters. But there calculations are not always accurate. So it's possible that you will get inaccurate results if you use CBQ to limit the traffic in a class. "

Quoted 8 lines

Here Iam slightly confused with real link bandwidth, Can I understand that while creating CBQ we need interface bandwidth (ethtool, mii-diag) and and while assigning the classes real link bandwidth is required. An example will definately help me. Can you pls suggest a way to find real link bandwidth....? As ethtool and mii-diag will only get the interface bandwidth.

Quoted 8 lines

The bandwidth parameter is the real link bandwidth like ethtook or mii-diag will show you.
If you want to limit all traffic to the link bandwidth, you have to create a class that's bounded and with rate = link bandwidth. You can create non-bounded sub classes but the bandwidth will be limit by the bounded class to the link bandwidth.

What is confusing me is, there is a bandwidth provided by ISP (512Kbits) and one ethernet capacity(100Mbits), so which one can we call as real link bandwidth. What is NIC bandwidth....is it ethernet bandwidth or ISP bandwidth....?

    Lan------->eth1-----------eth0---------->Internet

Now at eth0 I have ethernet device bandwidth as 100Mbits and my ISP provides 512Kbits bandwidth. so if I want to do egress traffic control at both eth0 and eth1, what bandwidth I should consider...? My eth1 ethernet device bandwidth is 100Mbits.

Regards
-Raghu

Quoted 4 lines

Stef

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

#3 lore raw
In reply to Raghuveer
Quoted 9 lines · Raghuveer

What is confusing me is, there is a bandwidth provided by ISP (512Kbits) and one ethernet capacity(100Mbits), so which one can we call as real link bandwidth. What is NIC bandwidth....is it ethernet bandwidth or ISP bandwidth....?

    Lan------->eth1-----------eth0---------->Internet

Now at eth0 I have ethernet device bandwidth as 100Mbits and my ISP provides 512Kbits bandwidth. so if I want to do egress traffic control at both eth0 and eth1, what bandwidth I should consider...? My eth1 ethernet device bandwidth is 100Mbits.

What bout this :

for all cbq commands : bandwidth 100mbit
eth0
cbq qdisc
cbq class rate = 512kbit, bounded
cbq class 1, rate < 512kbit
cbq class ..., rate < 512kbit
cbq class x, rate < 512kbit
So all traffic from class 1 ... x togehter is bounded to 512kbit.

eth1
cbq qdisc
cbq class rate = 100mbit, bounded
cbq class 1, rate 512kbit bounded
cbq class 10, rate < 512kbit
cbq class ..., rate < 512kbit
cbq class x, rate < 512kbit
cbq class 2, rate 99,5Mbit
cbq class 20, rate < 99,5Mbit
cbq class ..., rate < 99,5Mbit
cbq class x, rate < 99,5Mbit

Class 1 is for all traffic from internet -> LAN
Class 2 is for all traffic from shaper -> LAN

And if you really want to be sure it's working, you should take 500kbit. So YOU are the bottleneck and in control of the link and not the modem.

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/
author
#4 lore raw
In reply to Raghuveer
Quoted 37 lines · Stef Coene
Quoted 11 lines · Raghuveer

What is confusing me is, there is a bandwidth provided by ISP (512Kbits) and one ethernet capacity(100Mbits), so which one can we call as real link bandwidth. What is NIC bandwidth....is it ethernet bandwidth or ISP bandwidth....?
Lan------->eth1-----------eth0---------->Internet
Now at eth0 I have ethernet device bandwidth as 100Mbits and my ISP provides 512Kbits bandwidth. so if I want to do egress traffic control at both eth0 and eth1, what bandwidth I should consider...? My eth1 ethernet device bandwidth is 100Mbits.

What bout this :

for all cbq commands : bandwidth 100mbit
eth0
cbq qdisc
cbq class rate = 512kbit, bounded
cbq class 1, rate < 512kbit
cbq class ..., rate < 512kbit
cbq class x, rate < 512kbit
So all traffic from class 1 ... x togehter is bounded to 512kbit.

eth1
cbq qdisc
cbq class rate = 100mbit, bounded
cbq class 1, rate 512kbit bounded
cbq class 10, rate < 512kbit
cbq class ..., rate < 512kbit
cbq class x, rate < 512kbit
cbq class 2, rate 99,5Mbit
cbq class 20, rate < 99,5Mbit
cbq class ..., rate < 99,5Mbit
cbq class x, rate < 99,5Mbit

Quoted 7 lines

Class 1 is for all traffic from internet -> LAN
Class 2 is for all traffic from shaper -> LAN

And if you really want to be sure it's working, you should take 500kbit. So YOU are the bottleneck and in control of the link and not the modem.

Thanks alot Stef, Its very clear to me now.
If I have ADSL with different incoming and outgoing rates. For egress shaping at WAN(eth0) interface, Whether should I use outgoing rates or combined rates (incomming + outgoing). Will it make any big difference if I use combined rates in an asymmetric link like cabel modem, ADSL etc.

Regards
-Raghu

Quoted 4 lines

Stef

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

#5 lore raw
In reply to Raghuveer
Quoted 5 lines · Raghuveer

Thanks alot Stef, Its very clear to me now.
If I have ADSL with different incoming and outgoing rates. For egress shaping at WAN(eth0) interface, Whether should I use outgoing rates or combined rates (incomming + outgoing). Will it make any big difference if I use combined rates in an asymmetric link like cabel modem, ADSL etc.

At eth0, you should take outgoing rates. And this can be assymetric from incoming rates. Why not ?
I didn't knew your incoming and outgoing rates so I just took 512kbit for incoming and outgoing.

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/
author
#6 lore raw
In reply to Raghuveer
Quoted 10 lines · Stef Coene
Quoted 7 lines · Raghuveer

Thanks alot Stef, Its very clear to me now.
If I have ADSL with different incoming and outgoing rates. For egress shaping at WAN(eth0) interface, Whether should I use outgoing rates or combined rates (incomming + outgoing). Will it make any big difference if I use combined rates in an asymmetric link like cabel modem, ADSL etc.

Quoted 6 lines

At eth0, you should take outgoing rates. And this can be assymetric from incoming rates. Why not ?
I didn't knew your incoming and outgoing rates so I just took 512kbit for incoming and outgoing.

How can I get the incomming and outgoing rates seperately ...?

Regards
-Raghu

Quoted 4 lines

Stef

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

#7 lore raw
In reply to Raghuveer
Quoted 8 lines · Raghuveer
Quoted 7 lines · Stef Coene
Quoted 5 lines · Raghuveer

Thanks alot Stef, Its very clear to me now.
If I have ADSL with different incoming and outgoing rates. For egress shaping at WAN(eth0) interface, Whether should I use outgoing rates or combined rates (incomming + outgoing). Will it make any big difference if I use combined rates in an asymmetric link like cabel modem, ADSL etc.

Quoted 6 lines
Quoted 4 lines

At eth0, you should take outgoing rates. And this can be assymetric from incoming rates. Why not ?
I didn't knew your incoming and outgoing rates so I just took 512kbit for incoming and outgoing.

How can I get the incomming and outgoing rates seperately ...?

What do you mean? How to configure htb or how to get these numbers from you ISP?

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/
author
#8 lore raw
In reply to Raghuveer
Quoted 22 lines · Stef Coene
Quoted 19 lines · Raghuveer
Quoted 16 lines · Stef Coene
Quoted 7 lines · Raghuveer

Thanks alot Stef, Its very clear to me now.
If I have ADSL with different incoming and outgoing rates. For egress shaping at WAN(eth0) interface, Whether should I use outgoing rates or combined rates (incomming + outgoing). Will it make any big difference if I use combined rates in an asymmetric link like cabel modem, ADSL etc.

At eth0, you should take outgoing rates. And this can be assymetric from incoming rates. Why not ?
I didn't knew your incoming and outgoing rates so I just took 512kbit for incoming and outgoing.

Quoted 6 lines
Quoted 3 lines

How can I get the incomming and outgoing rates seperately ...?

What do you mean? How to configure htb or how to get these numbers from you ISP?

Actually I wanted to know whether is there any way to get the incoming and outgoing rates using some tool.

Regards
-Raghu

Quoted 5 lines

Stef

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

#9 lore raw
In reply to Raghuveer
Quoted 2 lines · Raghuveer

Actually I wanted to know whether is there any way to get the incoming and outgoing rates using some tool.

The rate is (most of the time) limited in the modem. And there is no way you can find this. You can try to upload / download a file to / from a fast ftp server and monitor the bandwidth you get, but that's not very accurate. Even if you don't know the bandwidth, you can shape the traffic.

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/