Designing High-Performance Networking Applications: Essential Insights for Developers of IXP2XXX Network Processor-based Systems

Metering and Marking

Metering typically uses either a token bucket or a leaky bucket. Leaky buckets work well with fixed-size cells, while token buckets are appropriate for variable-sized packets. In either case, the bucket is associated with a rate r, which is the rate at which tokens are added or leaked from the bucket and a depth b, which is the maximum number of tokens the bucket can hold.

Figure 13.2 shows the usage of a token bucket meter for policing packets. The bucket receives tokens at a constant rate r. Each incoming packet consumes as many tokens as the size of the packet in bytes. A packet is in profile if the number of tokens in the bucket is greater than or equal to the packet size and is out of profile otherwise. As seen from the description, token buckets are credit-based and allow for a maximum burst of b bytes. If a bucket is full, it cannot receive more tokens.


Figure 13.2: Token Bucket Meter with Rate r and Burst Size b

Figure 13.3 illustrates the use of a leaky bucket meter for policing cell-based traffic. The bucket leaks tokens at a constant rate r. Each cell adds a token to the bucket. A cell is out of profile when the bucket overflows. As seen from this description, leaky buckets are deficit-based and cannot only monitor the arrival rate of cells but also track how smooth the traffic flow is.

UNLIMITED FREE
ACCESS
TO THE WORLD'S BEST IDEAS

SUBMIT
Already a GlobalSpec user? Log in.

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.

Customize Your GlobalSpec Experience

Category: Motor Control Center (MCC) Buckets
Finish!
Privacy Policy

This is embarrasing...

An error occurred while processing the form. Please try again in a few minutes.