How the wred algorithm operates – Brocade Multi-Service IronWare QoS and Traffic Management Configuration Guide (Supporting R05.6.00) User Manual

Page 133

Advertising
background image

Multi-Service IronWare QoS and Traffic Management Configuration Guide

119

53-1003037-02

Weighted Random Early Discard (WRED)

4

Pkt-Size-Max – The packet size to which the current packet's size is compared as shown in the
algorithm below. This variable is user configured.

How the WRED algorithm operates

The graph in

Figure 4

describes the interaction of the previously described variables in the

operation of WRED. When a packet arrives at a device, the average queue size (q-size) is calculated
(note that this is not the statistical average queue size - refer to

“Calculating avg-q-size”

on

page 119). If q-size as calculated is below the configured Min. Average Queue Size, then the packet
is accepted. If the average queue size is above the Max. configured Average Queue Size threshold,
the packet is dropped. If the instantaneous queue size exceeds the value configured for the
Max-Instantaneous-Q-Size, the packet is dropped. If the Average Queue size falls between the Min.
Average Queue Size and the Max. Average Queue Size, packets are dropped according to the
calculated probability described in

“Calculating packets that are dropped”

on page 119.

FIGURE 4

WRED operation graph

Calculating avg-q-size
The algorithm first calculates the avg-q-size through the following equation.

avg-q-size = ( (1 - Wq) * Statistical Average-Q-Size) + (Wq * Current-Q-Size)

The user-configured Wq value is instrumental to the calculation and can be:

equal to the statistical average queue size (Wq == 0), or

equal to the current queue size (Wq == 1) or

be between 0 and 1 (0 < Wq < 1).

Lower Wq values cause the avg-q-size to lean towards the statistical average queue size, reducing
WRED's sensitivity to the current state of the queue and thus reducing WRED's effectiveness. On
the other hand, higher Wq values cause the avg-q-size to lean towards the instantaneous queue
size, which exposes WRED to any change in the instantaneous queue size and thus may cause
WRED to overreact in cases of bursts. Thus, the value of Wq should be carefully chosen according
to the application at hand.

Calculating packets that are dropped
The Pdrop value, as calculated in the following equation, is the probability that a packet will be
dropped in a congested device.

Pmax

Min. Average
Queue Size

Max. Average
Queue Size

Advertising