HTB burst, cburst parameters
Hi,
I am trying to understand the burst and cburst parameters in HTB. Can somebody explain it. The docs arent very clear.
I am trying to throttle a 10Mbit link to a T1 link using HTB. I am using the following:
------------------------------------------
DEVICE="dev eth1"
BANDWIDTH="bandwidth 10Mbit"
LIMITBW="1.536Mbit"
AVPKT="avpkt 1470"
# Root HTB qdisc 1:
$TC qdisc add $DEVICE root handle 1: htb
# This HTB class rate limits everyting to 1Mbit
$TC class add $DEVICE parent 1: classid 1:1 htb rate 1.536Mbps ceil 1.536Mbps burst 1k cburst 0.5k
------------------------------------------
Is this right ?
Also, can HTB take other qdiscs and classes ?
Regards,
Amit
Signature · 13 lines
The statement below is true.
The statement above is false.
^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^
Amit Kucheria
EECS Grad. Research Assistant
University of Kansas @ Lawrence
(R)+1-(785)-830 8521 ||| (O)+1-(785)-864 7774
____________________________________________________
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/Quoted 14 lines · you
Hi,
I am trying to understand the burst and cburst parameters in HTB. Can somebody explain it. The docs arent very clear.
I am trying to throttle a 10Mbit link to a T1 link using HTB. I am using the following:
------------------------------------------
DEVICE="dev eth1"
BANDWIDTH="bandwidth 10Mbit"
LIMITBW="1.536Mbit"
AVPKT="avpkt 1470"
Quoted 8 lines
# Root HTB qdisc 1:
$TC qdisc add $DEVICE root handle 1: htb# This HTB class rate limits everyting to 1Mbit
$TC class add $DEVICE parent 1: classid 1:1 htb rate 1.536Mbps ceil 1.536Mbps burst 1k cburst 0.5k
------------------------------------------
Is this right ?
I think so.
Is not working ? ?
Stef
Signature · 8 lines
[email protected] More QOS info : http://docum.org/ Title : "Using Linux as bandwidth manager" _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
Quoted 15 lines
Quoted 15 lines
I am trying to understand the burst and cburst parameters in HTB. Can somebody explain it. The docs arent very clear.
I am trying to throttle a 10Mbit link to a T1 link using HTB. I am using the following:
------------------------------------------
DEVICE="dev eth1"
BANDWIDTH="bandwidth 10Mbit"
LIMITBW="1.536Mbit"
AVPKT="avpkt 1470"# Root HTB qdisc 1:
$TC qdisc add $DEVICE root handle 1: htb
Quoted 7 lines
Quoted 5 lines
# This HTB class rate limits everyting to 1Mbit
$TC class add $DEVICE parent 1: classid 1:1 htb rate 1.536Mbps ceil 1.536Mbps burst 1k cburst 0.5k
------------------------------------------
Is this right ?I think so.
Is not working ? ?
Not really.
It kills all the traffic...giving me very low thruput....i read on the HTB homepage that on x86 machines burst has to be a minimum of 12K or something like that.
Whats cburst ?
Signature · 13 lines
The statement below is true.
The statement above is false.
^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^
Amit Kucheria
EECS Grad. Research Assistant
University of Kansas @ Lawrence
(R)+1-(785)-830 8521 ||| (O)+1-(785)-864 7774
____________________________________________________
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/Quoted 7 lines
Not really.
It kills all the traffic...giving me very low thruput....i read on the HTB homepage that on x86 machines burst has to be a minimum of 12K or something like that.
Whats cburst ?
If you set cbust equal to packet size, the rate will be checked each time you send cbust bytes and thus each time you send a packet. This would be ideal and you will never get a bust that exceed the ceil. Default cburst = 2Kb/8.
But how do you get a burst? That's why you have the burst parameter. Each time you can poll the hardware, you can change to a new class. Devik calculated the burst for a i386 on a 10mbit and it's 12kb. So, you can send 12kb, choose an other class, send an other one, choose an other class. That's the fastest way you can work. The 12kb is sended as fast as possible and creates a burst. But with the cburst parameter you can control that burst. If you specify a bigger burst parameter, you can create bigger burst, but unload the CPU/hardware.
I hope I'm explained it right. Devik ?
Stef
Signature · 8 lines
[email protected] More QOS info : http://docum.org/ Title : "Using Linux as bandwidth manager" _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
Quoted 7 lines
Not really.
It kills all the traffic...giving me very low thruput....i read on the HTB homepage that on x86 machines burst has to be a minimum of 12K or something like that.
Whats cburst ?
If you set cbust equal to packet size, the rate will be checked each time you send cbust bytes and thus each time you send a packet. This would be ideal and you will never get a bust that exceed the ceil. Default cburst = 2Kb/8.
But how do you get a burst? That's why you have the burst parameter. Each time you can poll the hardware, you can change to a new class. Devik calculated the burst for a i386 on a 10mbit and it's 12kb. So, you can send 12kb, choose an other class, send an other one, choose an other class. That's the fastest way you can work. The 12kb is sended as fast as possible and creates a burst. But with the cburst parameter you can control that burst. If you specify a bigger burst parameter, you can create bigger burst, but unload the CPU/hardware.
I hope I'm explained it right. Devik ?
Stef
Signature · 8 lines
[email protected] More QOS info : http://docum.org/ Title : "Using Linux as bandwidth manager" _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
Quoted 20 lines · Stef Coene
Quoted 7 lines
Not really.
It kills all the traffic...giving me very low thruput....i read on the HTB homepage that on x86 machines burst has to be a minimum of 12K or something like that.
Whats cburst ?
If you set cbust equal to packet size, the rate will be checked each time you send cbust bytes and thus each time you send a packet. This would be ideal and you will never get a bust that exceed the ceil. Default cburst = 2Kb/8.
But how do you get a burst? That's why you have the burst parameter. Each time you can poll the hardware, you can change to a new class. Devik calculated the burst for a i386 on a 10mbit and it's 12kb. So, you can send 12kb, choose an other class, send an other one, choose an other class. That's the fastest way you can work. The 12kb is sended as fast as possible and creates a burst. But with the cburst parameter you can control that burst. If you specify a bigger burst parameter, you can create bigger burst, but unload the CPU/hardware.
Quoted 1 line
I hope I'm explained it right. Devik ?
Almost :) The part "send 12k and select other class" is not exact. Other class is selected also when current one is empty or DRR allotment is exceeded.
Also cburst is not meant for burst reshaping (like peakrate in tbf) but can be used for it.
tbf estimators always needs two parameters, rate and burst. There are two estimators (rate and ceil) thus we have four (2*2) parameters:
rate/burst
ceil/cburst
I'm working on new patch to tc where you have not need to set bursts. There are automaticaly computed from rate and ceil to their smallest possible values (but you can still override them).
devik
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
Quoted 11 lines · Martin Devera
Quoted 1 line
I hope I'm explained it right. Devik ?
Almost :) The part "send 12k and select other class" is not exact. Other class is selected also when current one is empty or DRR allotment is exceeded.
Also cburst is not meant for burst reshaping (like peakrate in tbf) but can be used for it.
tbf estimators always needs two parameters, rate and burst. There are two estimators (rate and ceil) thus we have four (2*2) parameters:
rate/burst
ceil/cburst
Hmm...so if i understand this correctly, 'burst' controls 'rate' and 'cburst' controls 'ceil'?
Lets say that i am generating bursty fixed length UDP traffic i.e.1470 bytes every 5000us.
Now for a pkt size of 1470 bytes and 'rate' and 'ceil' being 1.536Mbit what would be the ideal values of burst and cburst?
Signature · 13 lines
The statement below is true.
The statement above is false.
^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^
Amit Kucheria
EECS Grad. Research Assistant
University of Kansas @ Lawrence
(R)+1-(785)-830 8521 ||| (O)+1-(785)-864 7774
____________________________________________________
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/Quoted 2 lines
Hmm...so if i understand this correctly, 'burst' controls 'rate' and 'cburst' controls 'ceil'?
exactly.
Quoted 4 lines
Lets say that i am generating bursty fixed length UDP traffic i.e.1470 bytes every 5000us.
Now for a pkt size of 1470 bytes and 'rate' and 'ceil' being 1.536Mbit what would be the ideal values of burst and cburst?
So one 1.5k packet then 5ms pause, other 1.5 packet ... ok ? It leads to rate cca 1500/5ms = 300kBps = 2.4mbit.
Because is exceeds your 1.5mbit rate so that the burst value is not so important. Just use minimal value:
burstmin = 1.5mbit/8*10ms = 2k
devik
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/
Quoted 13 lines · devik
Quoted 2 lines
Hmm...so if i understand this correctly, 'burst' controls 'rate' and 'cburst' controls 'ceil'?
exactly.
Quoted 4 lines
Lets say that i am generating bursty fixed length UDP traffic i.e.1470 bytes every 5000us.
Now for a pkt size of 1470 bytes and 'rate' and 'ceil' being 1.536Mbit what would be the ideal values of burst and cburst?So one 1.5k packet then 5ms pause, other 1.5 packet ... ok ? It leads to rate cca 1500/5ms = 300kBps = 2.4mbit.
Quoted 6 lines
Because is exceeds your 1.5mbit rate so that the burst value is not so important. Just use minimal value:
burstmin = 1.5mbit/8*10ms = 2k
devik
Using those parameters puts the cap on my bandwidth real hard, not at all accuate. Infact, my connections go haywire. Here are the results.
-----------------------------------------------------------------
testbed16 [30] % sudo ./T1-using-htb
TC=/usr/bin/tc
DEVICEÞv eth1
BANDWIDTHºndwidth 10Mbit
LIMITBW=1Mbit
AVPKT=avpkt 1470
SRC2.168.157.2
DEST2.168.158.2
tc qdisc add dev eth1 root handle 1: htb
tc class add dev eth1 parent 1: classid 1:1 htb rate 1Mbit ceil 1Mbit burst 2k
-----------------------------------------------------------------
testbed16 [32] % showinfo eth1
----------------------------------
QDISC logs
----------------------------------
qdisc htb 1: dev eth1 r2q 10 default 1 dcache 0
deq_util 1/1000000 deq_rate 0 trials_per_deq 0 dcache_hits 0 Sent 2946644 bytes 2105 pkts (dropped 1209, overlimits 9640)
----------------------------------
CLASS logs
----------------------------------
class htb 1:1 root prio 0 rate 1Mbit ceil 1Mbit burst 2Kb cburst 2Kb
Sent 2946644 bytes 2105 pkts (dropped 1209, overlimits 8506) rate 283bps
lended: 2105 borrowed: 0 giants: 0 injects: 0
tokens: 15491 ctokens: 15491
-----------------------------------------------------------------
When i increase the burst size to say 100k i get better thruput but still not equivalent to the ceil.
Regards,
Amit
Signature · 13 lines
The statement below is true.
The statement above is false.
^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^
Amit Kucheria
EECS Grad. Research Assistant
University of Kansas @ Lawrence
(R)+1-(785)-830 8521 ||| (O)+1-(785)-864 7774
____________________________________________________
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/