All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] HTB burst, cburst parameters
@ 2001-12-10  0:27 Amit Kucheria
  2001-12-10  7:03 ` Stef Coene
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Amit Kucheria @ 2001-12-10  0:27 UTC (permalink / raw)
  To: lartc

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


-- 
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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [LARTC] HTB burst, cburst parameters
  2001-12-10  0:27 [LARTC] HTB burst, cburst parameters Amit Kucheria
@ 2001-12-10  7:03 ` Stef Coene
  2001-12-10  7:08 ` Amit Kucheria
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Stef Coene @ 2001-12-10  7:03 UTC (permalink / raw)
  To: lartc

On Monday 10 December 2001 01:27, you wrote:
> 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 ?
I think so.
Is not working ? ?

Stef


-- 

stef.coene@docum.org
 More QOS info : http://docum.org/
 Title : "Using Linux as bandwidth manager"
     

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [LARTC] HTB burst, cburst parameters
  2001-12-10  0:27 [LARTC] HTB burst, cburst parameters Amit Kucheria
  2001-12-10  7:03 ` Stef Coene
@ 2001-12-10  7:08 ` Amit Kucheria
  2001-12-10  7:56 ` Stef Coene
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Amit Kucheria @ 2001-12-10  7:08 UTC (permalink / raw)
  To: lartc

> > 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 ?
> 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 ?


-- 
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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [LARTC] HTB burst, cburst parameters
  2001-12-10  0:27 [LARTC] HTB burst, cburst parameters Amit Kucheria
  2001-12-10  7:03 ` Stef Coene
  2001-12-10  7:08 ` Amit Kucheria
@ 2001-12-10  7:56 ` Stef Coene
  2001-12-10  7:58 ` Stef Coene
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Stef Coene @ 2001-12-10  7:56 UTC (permalink / raw)
  To: lartc

> 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

 
-- 

stef.coene@docum.org
 More QOS info : http://docum.org/
 Title : "Using Linux as bandwidth manager"
     

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [LARTC] HTB burst, cburst parameters
  2001-12-10  0:27 [LARTC] HTB burst, cburst parameters Amit Kucheria
                   ` (2 preceding siblings ...)
  2001-12-10  7:56 ` Stef Coene
@ 2001-12-10  7:58 ` Stef Coene
  2001-12-10  9:53 ` Martin Devera
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Stef Coene @ 2001-12-10  7:58 UTC (permalink / raw)
  To: lartc

> 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

 
-- 

stef.coene@docum.org
 More QOS info : http://docum.org/
 Title : "Using Linux as bandwidth manager"
     

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [LARTC] HTB burst, cburst parameters
  2001-12-10  0:27 [LARTC] HTB burst, cburst parameters Amit Kucheria
                   ` (3 preceding siblings ...)
  2001-12-10  7:58 ` Stef Coene
@ 2001-12-10  9:53 ` Martin Devera
  2001-12-10 20:31 ` Amit Kucheria
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Martin Devera @ 2001-12-10  9:53 UTC (permalink / raw)
  To: lartc



On Mon, 10 Dec 2001, Stef Coene wrote:

> > 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 ?

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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [LARTC] HTB burst, cburst parameters
  2001-12-10  0:27 [LARTC] HTB burst, cburst parameters Amit Kucheria
                   ` (4 preceding siblings ...)
  2001-12-10  9:53 ` Martin Devera
@ 2001-12-10 20:31 ` Amit Kucheria
  2001-12-11 10:01 ` devik
  2001-12-11 18:39 ` Amit Kucheria
  7 siblings, 0 replies; 9+ messages in thread
From: Amit Kucheria @ 2001-12-10 20:31 UTC (permalink / raw)
  To: lartc

On Mon, 10 Dec 2001, Martin Devera wrote:

> > 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?

-- 
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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [LARTC] HTB burst, cburst parameters
  2001-12-10  0:27 [LARTC] HTB burst, cburst parameters Amit Kucheria
                   ` (5 preceding siblings ...)
  2001-12-10 20:31 ` Amit Kucheria
@ 2001-12-11 10:01 ` devik
  2001-12-11 18:39 ` Amit Kucheria
  7 siblings, 0 replies; 9+ messages in thread
From: devik @ 2001-12-11 10:01 UTC (permalink / raw)
  To: lartc

> Hmm...so if i understand this correctly, 'burst' controls 'rate' and
> 'cburst' controls 'ceil'?

exactly.

> 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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [LARTC] HTB burst, cburst parameters
  2001-12-10  0:27 [LARTC] HTB burst, cburst parameters Amit Kucheria
                   ` (6 preceding siblings ...)
  2001-12-11 10:01 ` devik
@ 2001-12-11 18:39 ` Amit Kucheria
  7 siblings, 0 replies; 9+ messages in thread
From: Amit Kucheria @ 2001-12-11 18:39 UTC (permalink / raw)
  To: lartc

On Tue, 11 Dec 2001, devik wrote:

> > Hmm...so if i understand this correctly, 'burst' controls 'rate' and
> > 'cburst' controls 'ceil'?
> 
> exactly.
> 
> > 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

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
SRC\x192.168.157.2
DEST\x192.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
-- 
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 / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/lartc/

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-12-11 18:39 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-12-10  0:27 [LARTC] HTB burst, cburst parameters Amit Kucheria
2001-12-10  7:03 ` Stef Coene
2001-12-10  7:08 ` Amit Kucheria
2001-12-10  7:56 ` Stef Coene
2001-12-10  7:58 ` Stef Coene
2001-12-10  9:53 ` Martin Devera
2001-12-10 20:31 ` Amit Kucheria
2001-12-11 10:01 ` devik
2001-12-11 18:39 ` Amit Kucheria

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.