FACTOID # 33: Kenyan women work 35% longer than their menfolk.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Token bucket

It is a common algorithm used to control the amount of data that is injected into a network, allowing for bursts of data to be sent. Although it has several uses, it is best understood in the context of network traffic shaping or rate limiting. Flowcharts are often used to graphically represent algorithms. ... A computer network is an interconnection of a group of computers. ... Traffic shaping (also known as packet shaping) is an attempt to control computer network traffic in order to optimize or guarantee performance, low latency, and/or bandwidth by delaying packets[1]. Traffic shaping deals with concepts of classification, queue disciplines, enforcing policies, congestion management, quality of service (QoS), and fairness. ... In computer networks, rate limiting is the function of controlling the maximum rate of traffic sent or received on a network interface. ...

Contents

Traffic shaping algorithms (leaky bucket versus token bucket)

Two predominant methods for shaping traffic exist: a leaky bucket implementation and a token bucket implementation. Sometimes they are mistakenly lumped together under the same name. Both these schemes have distinct properties and are used for distinct 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. Although the leaky bucket algorithm has several uses, it is best understood in the context of network traffic shaping or rate limiting. ...


High level view

The token bucket is a control mechanism that dictates when traffic can be transmitted, based on the presence of tokens in the bucket--an abstract container that holds aggregate network traffic to be transmitted. The bucket contains tokens, each of which can represent a unit of bytes or a single packet of predetermined size. Tokens in the bucket are effectively "cashed in" (removed) for the ability to send a packet. The network administrator specifies how many tokens are needed to transmit how many bytes. When tokens are present, a flow is allowed to transmit traffic. If there are no tokens in the bucket, a flow cannot transmit its packets. Therefore, a flow can transmit traffic up to its peak burst rate if there are adequate tokens in the bucket and if the burst threshold is configured appropriately. In computing, the term bucket can have several meanings. ...


The token bucket algorithm

The algorithm can be conceptually understood as follows:

  • A token is added to the bucket every 1 / r seconds.
  • The bucket can hold at the most b tokens. If a token arrives when the bucket is full, it is discarded.
  • When a packet (network layer PDU) of n bytes arrives, n tokens are removed from the bucket, and the packet is sent to the network.
  • If fewer than n tokens are available, no tokens are removed from the bucket, and the packet is considered to be non-conformant.

The algorithm allows bursts of up to b bytes, but over the long run the output of conformant packets is limited to the constant rate, r. Non-conformant packets can be treated in various ways:

  • They may be dropped.
  • They may be enqueued for subsequent transmission when sufficient tokens have accumulated in the bucket.
  • They may be transmitted, but marked as being non-conformant, possibly to be dropped subsequently if the network is overloaded.

Implementers of this algorithm on platforms lacking the clock resolution necessary to add a single token to the bucket every 1 / r seconds may want to consider an alternative formulation. Given the ability to update the token bucket every S milliseconds, the number of tokens to add every S milliseconds = (r * S) / 1000.


Hierarchical Token Bucket

This is a faster replacement for the Class Based Queueing qdisc (queuing discipline) in Linux. A network router queueing method that allows traffic to share bandwidth equally, after being grouped by classes. ... This article is about operating systems that use the Linux kernel. ...


Description

HTBs help in controlling the use of the outbound bandwidth on a given link. HTB allows using one single physical link to simulate multiple slower links and to send different kinds of traffic on different simulated links. In both cases, one has to specify how to divide the physical link into simulated links and how to decide which simulated link a given packet is to be sent across. Bandwidth is the difference between the upper and lower cutoff frequencies of, for example, a filter, a communication channel, or a signal spectrum, and is typically measured in hertz. ... This article is about a telecommunication term. ... This article is about a telecommunication term. ... Example graph of web traffic at Wikipedia in December 2004 Internet traffic is the flow of data around the Internet. ...


In other words, HTB is very useful to limit a client's download/upload rate. Thus, the limited client cannot saturate the total bandwidth. This article is about the computer terms. ... This article is about the computer terms. ...


References

  • "Deploying IP and MPLS QoS for Multiservice Networks: Theory and Practice" by John Evans, Clarence Filsfils (Morgan Kaufmann, 2007, ISBN 0-12-370549-5)
  • Ferguson P., Huston G., Quality of Service: Delivering QoS on the Internet and in Corporate Networks, John Wiley & Sons, Inc., 1998. ISBN 0-471-24358-2.
  • Andrew S. Tanenbaum, Computer Networks, 3rd Edition, Prentice-Hall, 1996.
  • Linux HTB Home Page http://luxik.cdi.cz/~devik/qos/htb/ ...

See also

Although the leaky bucket algorithm has several uses, it is best understood in the context of network traffic shaping or rate limiting. ... Traffic shaping (also known as packet shaping) is an attempt to control computer network traffic in order to optimize or guarantee performance, low latency, and/or bandwidth by delaying packets[1]. Traffic shaping deals with concepts of classification, queue disciplines, enforcing policies, congestion management, quality of service (QoS), and fairness. ... In computer networks, rate limiting is the function of controlling the maximum rate of traffic sent or received on a network interface. ... Future telecommunication networks should have the following characteristics: broadband, multi-media, multi-point, multi-rate and economical implementation for a diversity of services (multi-services) [1][2]. The Broadband Integrated Services Digital Network (B-ISDN) provides these characteristics to a network. ...

  Results from FactBites:
 
Cisco IOS Quality of Service Solutions ConfigurationĀ Guide, ReleaseĀ 12.2 - Policing and Shaping Overview - Cisco ... (6341 words)
A token bucket is used to manage a device that regulates the data in a flow.
If not enough tokens are in the bucket to send a packet, the packet either waits until the bucket has enough tokens (in the case of GTS) or the packet is discarded or marked down (in the case of CAR).
The token bucket algorithm is affected by all traffic entering or leaving (depending on where the traffic policy with Traffic Policing configured) and is useful in managing network bandwidth in cases where several large packets are sent in the same traffic stream.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.