You are on page 1of 2

Standard Token Bucket Terminology

P.F. Chimento May 18, 2000

1

The Token Bucket Model

This document tries to explain standard token bucket terminology and to give an example of how the token bucket works as a shaper (generator) of a stream with particular characteristics and as a policer of a stream with particular characteristics. First, a picture (See Figure 1): The operation of the bucket is as follows: Data flows into the mecha-

γ

τ

X
Simple Token Bucket Configuration
Figure 1: A simple Token Bucket nism from the left in quanta called packets. Token flow into the bucket (green) from the top at rate γ. When the bucket is full of tokens, new tokens are thrown away. Each token is worth a defined number of bytes. It is easier if we think of each token as being worth one byte. When a packet arrives from the left, if there are a number of tokens in the bucket at least equal to the number of bytes in the packet, the packet may exit the system immediately. If there are not enough tokens in the bucket, then one of a number of things may happen, depending on how the token bucket is being used: 1. The packet may be thrown away. 2. The packet may be marked in a particular way. 3. The packet may be buffered (by inserting a buffer between the inflow and the decision point) and not released until a sufficient number of tokens arrive in the bucket. There are a number of things to note about this picture: 1. The rate γ is the long-term rate at which the data flows out of the bucket. 2. The bucket depth τ is the maximum amount of information that can flow out of the bucket backto-back (i.e. with arbitrary spacing).

1

I suggest that the token bucket model. Addison Wesley Publishing. It should be clear from the above description that bucket depth τ is the same as what is intended in [1] by the term “MTU”. unpublished working document. Thoudh it is not clearly stated in [1]. RFC 2211. γ as defined above. These RFCs have good descriptions of the parameters necessary to describe traffic streams in terms of token buckets. This rate can be controlled to be a particular rate β by inserting another buffer/decision point after the token bucket. Gigabit Networking. the maximum flow from the bucket into the network is δ × γ + B bits. Note that as δ → ∞. 1994 [3] J. the maximum flow into the network from the token bucket approaches δ × γ.e. R. the outflow rate is usually termed the peak rate which can in fact be much faster than the rate denoted by γ. This assumes that β. the exit rate (also known as the peak rate. QPS Traffic Conditioning. as described in [2] for example. we would have to add a shaping buffer to Figure 1 in front of the decision point. Specificatino of Guaranteed Quality of Service. Because of this assumption. Shenker. 3 Proposal In order to keep to more or less accepted terminology and concepts. Specifically. C. Because of the memory (i. RFC 2212. 2 Relationship to “QPS Traffic Conditioning” The token bucket model provides standard terminology for describing the behaviour of a traffic source. TMT U as defined in [1] is unnecessary because the token bucket bounds the amount of data that can be transmitted in any given interval. β is assumed to be the physical line rate of the output link. When the bucket is being used as a shaper. Wroclawski. and an initial bucket content of B bits. I assume that we are talking about the use of the token bucket as a shaper for an aggregate. References [1] R¨ diger Geib. e September 1997 2 . Because the token bucket is defined in terms of bytes. If no special notations or adjustments are made. we can work out some detailed definitions and format descriptions. Given an interval of length δ seconds. Specification of Controlled-Load Network Element Service. be adopted as the traffic descriptor for QPS and for the Bandwidth Broker design. May 2000 u [2] Craig Partridge. The parameter “BurstSize” as defined in [1] is actually harmful because it may limit the number of packets transmitted if they are smaller than “PacketSize”.3. there is no need for the auxillary definitions in [1]. If this proposal is accepted. this appropriation of the term “MTU” is confusing because it conflicts with the generally accepted definition of “MTU” and I recommend that its use be abandoned. The definition of “peakRate” in [1] is captured by the token bucket rate. However. September 1997 [4] S. the bucket) in the model. You can think of γ as the sustained rate at which the data can exit the token bucket system and you can think of τ as the size of the burst which can flow out of the system at the peak rate β. Note that the device has a memory by reason of the bucket. Further. Gu´rin. it is independent of packet size and so the parameter “PacketSize” is not needed. not equivalent to “peakRate” as defined in [1]) is (much) faster than γ. Partridge. I think that a good model for us is the TSPEC as described in [4] and [3].