As part of 7705 SAR queue management, policies for WRED and/or RED queue management (also known as congestion management or buffer management) to manage the queue depths can be enabled at both access and network ports and associated with both ingress and egress queues. WRED policies can also be enabled on bridged domain (ring) ports.
Without WRED and RED, once a queue reaches its maximum fill size, the queue discards any new packets arriving at the queue (tail drop).
WRED and RED policies prevent a queue from reaching its maximum size by starting random discards once the queue reaches a user-configured threshold value. This avoids the impact of discarding all the new incoming packets. By starting random discards at this threshold, customer devices at an end-system may be adjusted to the available bandwidth.
As an example, TCP has built-in mechanisms to adjust for packet drops. TCP-based flows lower the transmission rate when some of the packets fail to reach the far end. This mode of operation provides a much better way of dealing with congestion than dropping all the packets after the whole queue space is depleted.
The WRED and RED curve algorithms are based on two user-configurable thresholds (minThreshold and maxThreshold) and a discard probability factor (maxDProbability) (see Figure: WRED for High-Priority and Low-Priority Traffic on the Same Queue). The minThreshold (minT) indicates the level when where discards start and the discard probability is zero. The maxThreshold (maxT) is indicates the level where the discard probability reaches its maximum value. Beyond this the maxT level, all newly arriving packets are discarded. The steepness of the slope between minT and maxT is derived from the maxDProbability (maxDP). Thus, the maxDP indicates the random discard probability at the maxT level.
The main difference between WRED and RED is that with WRED, there can be more than one curve managing the fill rate of the same queue.
WRED slope curves can run against high-priority and low-priority traffic separately for ingress and egress queues. This allows the flexibility to treat low-priority and high-priority traffic differently. WRED slope policies are used to configure the minT, maxT and maxDP values, instead of configuring these thresholds against every queue. It is the slope policies that are then applied to individual queues. Thus, WRED slope policies affect how and when the high-priority and low-priority traffic is discarded within the same queue.
Referring to Figure: WRED for High-Priority and Low-Priority Traffic on the Same Queue, one WRED slope curve can manage discards on high-priority traffic and another WRED slope curve can manage discards on low-priority traffic. The minT, maxT and maxDP values configured for high-priority and low-priority traffic can be different and can start discarding traffic at different thresholds. Use the start-avr, max-avr, and max-prob commands to set the minThreshold, maxThreshold, and maxDProbabilty values, respectively.
The figure shows a step function at maxT. The maxDP value is the target value entered for the configuration and it partly determines the slope of the weighting curve. At maxT, if the arrival of a new packet will overflow the buffer, the discard probability jumps to 1, which is not the maxDP value. Therefore, a step function exists in this graph.
The formula to calculate the average queue size is:
average queue size = (previous average ✕ (1 – 1/2^TAF)) + (current queue size ✕ 1/2^TAF)
The Time Average Factor (TAF) is the exponential weight factor used in calculating the average queue size. The time_average_factor parameter is not user-configurable and is set to a system-wide default value of 3. By locking TAF to a static value of 3, the average queue size closely tracks the current queue size so that WRED can respond quickly to long queues.