Subject: [Diffserv] Token bucket burst size

From: Shahram Davari <[email-masked]>
Date: Tue, 13 Jun 2000 10:33:56 -0700

Hi,

Recently I have been working on TB, and I have found the following problem:

If we assume a TB (B, R), in which the TB counts can not go negative, then
the Maximum burst size which can pass through this TB can be computed as
following:

B: TB size
R: TB rate
S: input line rate
T: Time required to exhaust the TB ( includes the Tokens already inside TB
and the tokens that are accumulated in this period)
MBS: Maximum Burst Size

MBS = T * S = T * R + B 
T = B / (S-R)
MBS = B * S / (S-R)  ---> B = MBS * (S-R) / S

As you can see contrary to the general belief the MBS is not equal to the TB
size "B". Unless S >>R.
Example1:  if S = 2R --> MBS = 2B
Example2: S = R --> MBS = infinite

However, in RFC-2697 and RFC-2698 the TB parameters are set as following:

Tc (size) = CBS
Te (size) = EBS
Tp (size) = PBS

While it should be set as following:

Tc (size) = CBS * (S-R) /S
Te (size) = EBS * (S-R) /S
Tp (size) = PBS * (S-R) /S

Do you think this should be corrected?

Shahram Davari
Systems Engineer
Product Research
PMC-Sierra, Inc. (Ottawa) 
555 Legget drive,
Suit 834, Tower B,
Ottawa, ON K2K 2X3, Canada
Phone: +1 (613) 271-4018
Fax  : +1 (613) 271-7007

_______________________________________________
diffserv mailing list
[email-masked]
http://www1.ietf.org/mailman/listinfo/diffserv
Archive: http://www-nrg.ee.lbl.gov/diff-serv-arch/

---

From: "Brijesh Kumar" <[email-masked]>
Date: Tue, 13 Jun 2000 14:39:21 -0400

Shahram,

Interesting computation, but I think it has a flaw.

MBS = T * S = T * R + B

This line doesn't make sense to me as the T*R+B is limited by bucket
size B. You can't generate tokens when B is full. The real
relationship should be:

MBS = T *S = min (T*R + CurrentToken,B)
if current tokens are B (I.e., the initial point), MBS = T*S = B.
Period.

Cheers,

--brijesh
Ennovate Networks Inc.

> -----Original Message-----
> From: [email-masked]
> [mailto:[email-masked]]On Behalf
> Of Shahram Davari

---

From: Roch Guerin <[email-masked]>
Date: Tue, 13 Jun 2000 15:20:59 -0400

Shahram,

Not sure why you say 

> size "B".

The relation between bucket size and actual
burst size has been documented in several settings,
including ATM and the GS RFC (indirectly there through
the buffer requirements computation).
The ATM Traf. Mgt. doc actually spends quite
a bit of time detailing the relation as a
function of various parameters, to the point
that (in my opinion) it becomes highly confusing.

The one parameter that is easy to specify is
the bucket depth, and it does determine, at
least partly, the ensuing burst size, so that
I guess people have become accustomed to the
abuse of notation.  It may be worthwhile pointing
this out again, but i am not sure it calls for a
change in nomenclature.  

As side comment, you don't really need to allow
the TB count to go negative to get the expression, 
only to have arbitrarily small packets.  If you 
allow TB to go negative, you actually need to add
L (an MTU size packet) to the burst size you get.
Also, when S=R, then you don't really have "bursts",
at least not in the way I usually understand bursts.
So the fact that the "burst" size can go to infinity
is not really an issue.  But it is true that the
burst size can get relatively large if S and R are close.

Roch

---

From: Mark Stewart <[email-masked]>
Date: Tue, 13 Jun 2000 15:32:27 -0400

Hi Brijesh

I believe that Shahram's formula is correct, as from the moment the
head of your burst arrives the bucket is no longer full and you may
start
generating tokens.

Ciao

Mark Stewart

---

From: Mark Stewart <[email-masked]>
Date: Tue, 13 Jun 2000 16:05:06 -0400

Hi Shahram

Do you have any reason for beleiving that [CEP]BS should have the same
interpretation as the MBS? It appears to me that they are merely tolerances
used by the token buckets.

c u

Mark Stewart