Subject: RE: [Diffserv] Token bucket burst size

From: Shahram Davari <[email-masked]>
Date: Tue, 13 Jun 2000 12:01:47 -0700

Hi Bkumar,

Why is the T*R + B limited by B? I know that we can't generate token while
the bucket is full, but if you consider the worst case:

A packet of size B arrives when the bucket is full, this causes the Token
counts to get to zero. Now assume at the end of the T period another packet
of size T*R arrives, that packet will also get through (because there are
now T*R tokens accumulated in the TB). So the worst case maximum burst
passed during the T period is:

Worst MBS = B + T * S

Cheers,
-Shahram

>-----Original Message-----
>From: Brijesh Kumar [mailto:[email-masked]]
>Sent: Tuesday, June 13, 2000 2:39 PM
>To: 'Shahram Davari'; [email-masked]
>Cc: [email-masked]
>Subject: RE: [Diffserv] Token bucket burst size
>
>
>
>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
>> 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?
>>
>
>
>_______________________________________________
>diffserv mailing list
>[email-masked]
>http://www1.ietf.org/mailman/listinfo/diffserv
>Archive: http://www-nrg.ee.lbl.gov/diff-serv-arch/
>

_______________________________________________
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 15:38:09 -0400

Hi Shahram,

> Worst MBS =B + T * S

You are right, but only partially. It is because you are shifting the
time reference point. Even with your example, you need to wait for
time T to send a packet of size T*R (remember, you can only start
generating tokens AFTER the last event has completed and there is a
space in the bucket to accumulate new tokens.). If that packet had
come at (T-1) instant that would have not been allowed to go. No
matter how you model, over a time period T, you are not allowed to
send more than T*R where T*R <=B.

Cheers,

--brijesh
Ennovate Networks Inc.

---

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

The way to approximate the T*R+B bytes in a time interval T, is to send
small packets not large ones. If p is the size of the smallest packet you
may send then
sending 1 packet of size p, every p/S units of time; will result in
p*rounddown((T*R+B)/p) bytes being passed.

Mark Stewart