Skip to contentSkip to conversation

Changing Linux traffic control parameters on the fly

LARTC Simone Leggio 2 participants 3 messages Mar 28, 2003 – Mar 29, 2003

lore
Share & tools
lore
#0 lore raw

Hi all,

I'm executing some experiments in a test network and I have a doubt. It is possible to change linux traffic control parameters (say, for example, the bandwidth allocated to a flow, its ceiling rate in a HTB scheduler, its weight parameter in a CBQ scheduler and so on) while the flow is actually traversing a router?

An example: let's assume that a certain class has allocated a bandwidth of 500 kbit/sec. Can I change, say after 10 seconds, while the flow is still active, the bandwidth allocated to that class to 1 Mbit/sec?

I know there is the command tc qdisc change with which I can change the parameters for a qdisc, but how to use it? Launching after 10 seconds another tc script?
Any ideas?
Thank you,

Simone.

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

#1 lore raw
Quoted 11 lines · Simone Leggio

Hi all,

I'm executing some experiments in a test network and I have a doubt. It is possible to change linux traffic control parameters (say, for example, the bandwidth allocated to a flow, its ceiling rate in a HTB scheduler, its weight parameter in a CBQ scheduler and so on) while the flow is actually traversing a router?

An example: let's assume that a certain class has allocated a bandwidth of 500 kbit/sec. Can I change, say after 10 seconds, while the flow is still active, the bandwidth allocated to that class to 1 Mbit/sec?

Yes.

Quoted 3 lines

I know there is the command tc qdisc change with which I can change the parameters for a qdisc, but how to use it? Launching after 10 seconds another tc script?

I do that all the time. I remove and add the cbq/htb qdisc again while I leave the traffic running.
For allmost all results you can find on www.docum.org, I wrote some scripts. Most of the time, I have a script that creates the desired htb setup, an other script that monitors the bandwidth. If the bandwidth is not changing in 10 seconds, I log the bandwidth to a file and reexecute the htb script with other parameters.
For some test, it takes days before you have enough results.

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/
#2 lore raw
In reply to Simone Leggio
Quoted 11 lines · Simone Leggio

Hi all,

I'm executing some experiments in a test network and I have a doubt. It is possible to change linux traffic control parameters (say, for example, the bandwidth allocated to a flow, its ceiling rate in a HTB scheduler, its weight parameter in a CBQ scheduler and so on) while the flow is actually traversing a router?

An example: let's assume that a certain class has allocated a bandwidth of 500 kbit/sec. Can I change, say after 10 seconds, while the flow is still active, the bandwidth allocated to that class to 1 Mbit/sec?

Yes.

Quoted 3 lines

I know there is the command tc qdisc change with which I can change the parameters for a qdisc, but how to use it? Launching after 10 seconds another tc script?

I do that all the time. I remove and add the cbq/htb qdisc again while I leave the traffic running.
For allmost all results you can find on www.docum.org, I wrote some scripts. Most of the time, I have a script that creates the desired htb setup, an other script that monitors the bandwidth. If the bandwidth is not changing in 10 seconds, I log the bandwidth to a file and reexecute the htb script with other parameters.
For some test, it takes days before you have enough results.

Stef

Signature · 9 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/