All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Token Bucket: how does it really work?
@ 2003-01-23 16:34 kpeter
  2003-01-23 18:43 ` Stef Coene
  0 siblings, 1 reply; 2+ messages in thread
From: kpeter @ 2003-01-23 16:34 UTC (permalink / raw)
  To: lartc


Hello!

I would like to know, how  the Token Bucket filter really works.

An example:
 r = 10 Kbyte/sec
 b = 10 Kbyte
I send 0.5 sec with 5 Kbyte/sec (A-> 2,5 Kbyte) and
0.5 sec with 15 Kbyte/sec (B-> 7,5 Kbyte), and
0.5 sec with 10 Kbyte/sec (C-> 5 Kbyte)
after each other: ABCABCABC... and it goes through the tbf.

What will happen?
 1. All A phase will be sent from the tbf with 5 Kbyte/sec,
     all B phase with 15 Kbyte/sec, and all C phase with 10 Kbyte/sec
     without delay. => The sending rate really change and exceed the
    average rate (10Kbyte/sec) by the B phases.
 2.  0.0 : sending begins
      0.5 : first A phase sent
      1.0 : first 5Kbyte sent from B
      1.25: remained 2,5 Kbyte sent from B
      1.75: first C phase sent
      2.0: second A phase sent
       and so on => B and C was delayed, but sent continuously
 3.  0.0 : sending begins
      0.5 : first A phase sent
      1.0 : first 5 Kbyte sent from B
      1.5:  first C phase sent
      1.75:second A phase sent
       2.0: remained 2,5 Kbyte sent from B
       and so on  -> here I mean that the traffic,
       which couldn't be sent in time, will be sent
       only then, when there is enough bandwidth
       for it => B was delayed and cutted in two
       parts, but A and C was sent in time.
Which is the valid case? If none of them, than how
would it happen?
If the first case is valid, what does happen in the case
of more tbf  and all of them wants to exceed the average
rate, but the sum of the rates would be more than the
availablebandwidth?
Or it can't happen, because at an admission control
for the tbf would be reserved a peak rate (like everybody
want to send in the same time with peak rate), and if
there is no more place for a next tbf, it would be
rejected?
(How is tbf implemented? Where can I find it?)

I hope I was clear, if not please ask back!

Greetings,

Peter

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

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

* Re: [LARTC] Token Bucket: how does it really work?
  2003-01-23 16:34 [LARTC] Token Bucket: how does it really work? kpeter
@ 2003-01-23 18:43 ` Stef Coene
  0 siblings, 0 replies; 2+ messages in thread
From: Stef Coene @ 2003-01-23 18:43 UTC (permalink / raw)
  To: lartc

On Thursday 23 January 2003 17:34, kpeter wrote:
> Hello!
>
> I would like to know, how  the Token Bucket filter really works.
>
> An example:
>  r = 10 Kbyte/sec
>  b = 10 Kbyte
Do you mean burst ?

> I send 0.5 sec with 5 Kbyte/sec (A-> 2,5 Kbyte) and
> 0.5 sec with 15 Kbyte/sec (B-> 7,5 Kbyte), and
> 0.5 sec with 10 Kbyte/sec (C-> 5 Kbyte)
> after each other: ABCABCABC... and it goes through the tbf.
>
> What will happen?
>  1. All A phase will be sent from the tbf with 5 Kbyte/sec,
>      all B phase with 15 Kbyte/sec, and all C phase with 10 Kbyte/sec
>      without delay. => The sending rate really change and exceed the
>     average rate (10Kbyte/sec) by the B phases.
>  2.  0.0 : sending begins
>       0.5 : first A phase sent
>       1.0 : first 5Kbyte sent from B
>       1.25: remained 2,5 Kbyte sent from B
>       1.75: first C phase sent
>       2.0: second A phase sent
>        and so on => B and C was delayed, but sent continuously
>  3.  0.0 : sending begins
>       0.5 : first A phase sent
>       1.0 : first 5 Kbyte sent from B
>       1.5:  first C phase sent
>       1.75:second A phase sent
>        2.0: remained 2,5 Kbyte sent from B
>        and so on  -> here I mean that the traffic,
>        which couldn't be sent in time, will be sent
>        only then, when there is enough bandwidth
>        for it => B was delayed and cutted in two
>        parts, but A and C was sent in time.
> Which is the valid case? If none of them, than how
> would it happen?
> If the first case is valid, what does happen in the case
> of more tbf  and all of them wants to exceed the average
> rate, but the sum of the rates would be more than the
> availablebandwidth?
> Or it can't happen, because at an admission control
> for the tbf would be reserved a peak rate (like everybody
> want to send in the same time with peak rate), and if
> there is no more place for a next tbf, it would be
> rejected?
> (How is tbf implemented? Where can I find it?)
>
> I hope I was clear, if not please ask back!
I did some tests with htb.  It's based on tbf.  
But I'm not sure about your question.  Do you want to know how tbf delay 
packets or are you interested in the burst you can have?

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

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

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

end of thread, other threads:[~2003-01-23 18:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-23 16:34 [LARTC] Token Bucket: how does it really work? kpeter
2003-01-23 18:43 ` Stef Coene

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.