The Leaky Bucket model

The Leaky Bucket is a traffic meter. It is used to measure the amount of information transmitted by a certain data flow. When coupled with an algorithmic dropper it becomes a policer, and it is a means of bandwidth enforcement.

The leaky bucket has two parameters:

  • token leaking rate            
  • burst tolerance                         

The token leaking rate is often called Committed Information Rate (CIR).

The bucket stores equivalents of data units, not actual data. The leaky bucket is a meter, not a queue. Although the leaky bucket can be used to assist the release of packets from a shaped queue, it is essentially just a counter, not a storage. Our reference for the definition is the ATM forum traffic management specification version 4.1 (see figure 4.1).

 

Leaky Bucket

The Leaky Bucket Operation

By convention the leaky bucket starts initially empty.

Upon packet arrival ‘fluid’ (i.e. ‘tokens’) is poured into the bucket, by an amount equivalent to the size of the packet. If upon arrival the packet is able to pour fluid equivalent to its complete size into the bucket then the packet is conforming, otherwise non-conforming. The filling of the bucket is governed by traffic arrival, and there is no delay involved in it. If the bucket is empty traffic equivalent to the bucket size can pass at infinite speed.

Fluid is leaking from the bucket at constant pace.

 

The Leaky Bucket defines a similar traffic envelope as a Token Bucket.

The Leaky Bucket is equivalent to a token bucket in the sense that both of them would find the same packets in and out of profile of the same traffic stream, if the following conditions are met:

  • The leaky bucket and the token bucket have the same bucket size
  • The token accumulation rate of the token bucket is equal to the fluid leaking rate of the leaky bucket
  • At time zero the leaky bucket starts empty and the token bucket starts full
  • When the leaky bucket assist and algorithmic dropper, it is equivalent to a Token Bucket policer.

    The leaky bucket (just like the token bucket) can be used also in conjunction with a shaper, see CBR shaping and VBR shaping. In that context it assist the release of packets from the shaped queue. A leaky bucket with a burst tolerance larger than one MTU-sized frame (or one cell) is used to implement a variable bit-rate shaper, otherwise it is a constant bit rate shaper.

     

    [QoS Guide] [Policing] [Token Bucket Policer] [Leaky Bucket] [Dual Token Bucket] [Single Rate Three Color Marker] [Two Rate Three Color Marker] [MEF Policer] [ATM  GCRA and F-GCRA] [A TCP-friendly policer] [Shaping] [Scheduling] [BAC] [Nomenclature] [About] [Sitemap]