Science Fair Projects Ideas - Leaky bucket

All Science Fair Projects

      

Science Fair Project Encyclopedia for Schools!

  Search    Browse    Forum  Coach    Links    Editor    Help    Tell-a-Friend    Encyclopedia    Dictionary     

Science Fair Project Encyclopedia

For information on any area of science that interests you,
enter a keyword (eg. scientific method, molecule, cloud, carbohydrate etc.).
Or else, you can start by choosing any of the categories below.

Leaky bucket

Although the leaky bucket algorithm has several uses, it is best understood in the context of network traffic shaping or rate limiting. Typically, the algorithm is used to control the rate at which data is injected into a network, smoothing out "burstiness" in the data rate.

Contents

Traffic shaping algorithms

Two predominant methods for shaping traffic exist: a leaky bucket implementation and a token bucket implementation. Sometimes the leaky bucket and token bucket algorithms are mistakenly lumped together under the same name. Both these schemes have distinctly different properties and are used for distinctly different purposes [1]. They differ principally in that the leaky bucket imposes a hard limit on the data transmission rate, whereas the token bucket allows a certain amount of burstiness while imposing a limit on the average data transmission rate.

What is the Leaky-Bucket algorithm used for?

The leaky-bucket implementation is used to control the rate at which traffic is sent to the network (see Figure 1). A leaky bucket provides a mechanism by which bursty traffic can be shaped to present a steady stream of traffic to the network, as opposed to traffic with erratic bursts of low-volume and high-volume flows.

Automobile traffic analogy

An appropriate analogy for the leaky bucket is a scenario in which four lanes of automobile traffic converge into a single lane. A regulated admission interval into the single lane of traffic flow helps the traffic move. The benefit of this approach is that traffic flow into the major arteries (the network) is predictable and controlled. The major liability is that when the volume of traffic is vastly greater than the bucket size, in conjunction with the drainage-time interval, traffic backs up in the bucket beyond bucket capacity and is discarded [1].

The Leaky-bucket algorithm

The algorithm can be conceptually understood as follows:

  • Arriving packets (network layer PDUs) are placed in a bucket with a hole in the bottom.
  • The bucket can queue at most b bytes. If a packet arrives when the bucket is full, the packet is discarded.
  • Packets drain through the hole in the bucket, into the network, at a constant rate of r bytes per second, thus smoothing traffic bursts.

The size b of the bucket is limited by the available memory of the system.

Sometimes the leaky bucket and token bucket algorithms are lumped together under the same name.

The Generic Cell Rate Algorithm used in traffic shaping of ATM networks is equivalent to the leaky bucket algorithm.

Inefficiency of the Leaky-bucket implementation

The leaky-bucket implementation does not efficiently use available network resources. Because its leak rate is a fixed parameter, there will be many instances when the traffic volume is very low and large portions of network resources (bandwidth in particular) are not being used. Therefore no mechanism exists in the leaky-bucket implementation to allow individual flows to burst up to port speed, effectively consuming network resources at times when there would not be resource contention in the network. The token bucket implementation does however accommodate traffic flows with bursty characteristics [1]. The leaky-bucket and token bucket implementations can be combined to provide maximum efficiency and control of the traffic flows into a network.

See also

References

[1] Ferguson P., Huston G., Quality of Service: Delivering QoS on the Internet and in Corporate Networks, John Wiley & Sons, Inc., 1998.

External links

12-03-2008 10:22:39
The contents of this article is licensed from www.wikipedia.org under the GNU Free Documentation License. Click here to see the transparent copy and copyright details
Science kits, science lessons, science toys, maths toys, hobby kits, science games and books - these are some of many products that can help give your kid an edge in their science fair projects, and develop a tremendous interest in the study of science. When shopping for a science kit or other supplies, make sure that you carefully review the features and quality of the products. Compare prices by going to several online stores. Read product reviews online or refer to magazines.

Start by looking for your science kit review or science toy review. Compare prices but remember, Price $ is not everything. Quality does matter.
Science Fair Coach
What do science fair judges look out for?
ScienceHound
Science Fair Projects for students of all ages
All Science Fair Projects.com Site
All Science Fair Projects Homepage
Search | Browse | Links | From-our-Editor | Books | Help | Contact | Privacy | Disclaimer | Copyright Notice