Technology Update /
Traffic shapers ease WAN congestion
|
|
|||
|
|
Finding a solution to network congestion requires a balance of technical, fiscal, personnel and political resources. The first step is to gain an understanding of the length and frequency of network congestion through the use of network probes and analyzers.
If the length of network congestion is short, simple queuing mechanisms and traffic prioritization of a few key network applications can reduce latency and improve application performance to acceptable levels.
If congestion is a bigger problem, more aggressive and perhaps intrusive steps must be taken. Such measures could include traffic shaping and policing, or when the congestion interval grows so large that policies are not effective, circuit upgrades.
Advertisement: |
Traffic shaping is the least aggressive of the three measures. It is a dampening function, as it seeks to delay application traffic entering the network by buffering bursts that exceed predefined rates.
Traffic shaping uses a token-bucket mechanism. A token bucket works via a system counter on the router or switch, and has three components that are related by the equation R = B/T
- R - Mean rate (the rate at which the bucket fills with tokens).
- B - Burst size (the size of the bucket).
- T - Time interval (the measurement time).
Thus, the size of the token bucket is the maximum value of the counter and is equal to the burst size. Tokens are placed in the bucket by the operating system of the router at a constant, or mean, rate, R. When the bucket becomes full (the counter reaches its maximum value), new tokens are "discarded."
When application traffic seeks admittance to the network, the queue regulator for that interface requests a certain number of tokens for each packet depending on the size of the packet. For example, the regulator will request three tokens for a 1,500-byte packet and one token for a 500-byte packet.
If there are available tokens (the counter has a value greater than or equal to the number of tokens requested), the packet is transmitted. If there are not enough tokens, the packet is queued at the interface.
The mean rate specifies that over a given period of time a certain number of bits can be transmitted by the network interface of the router into the WAN.
Because traffic shaping smoothes out application bursts by buffering excess bursts at the network edges, it can reduce network congestion to acceptable levels where simple queuing algorithms such as weighted fair queuing and priority queuing would fail - these queuing algorithms working alone propagate bursts into the network.
As with traffic shaping, traffic policing uses the token-bucket mechanism to limit application traffic to defined rates configured on the router by a network administrator.
However, instead of buffering nonconforming traffic, it works by either dropping traffic when there are not enough available tokens in the token bucket to transmit the packet, or lowering the priority of the packet before transmitting it. While this does not smooth traffic bursts, it also does not add any queue time to application traffic (though dropped packets will have to be retransmitted).
Using traffic shaping and/or policing (they can be used together) to reduce congestion within your network can significantly increase the levels of service your network provides to applications.
This will let you create rigorous, yet flexible, policies to efficiently avoid bottlenecks and improve end-user performance without having to go through unnecessary, expensive circuit upgrades.
Related Links
Davis is a performance consultant for NetQoS. He can be reached at kevin.davis@netqos.com.
