488 BigIron RX Series Configuration Guide53-1002253-01Determining packet drop priority using WRED18How WRED OperatesThe graph in Figure 88 describes the interaction of the previously described variables in theoperation of WRED. When a packet arrives at a switch, the average queue size (q-size) is calculated(note that this is not the statistical average queue size - (refer to “Calculating avg-q-size” onpage 488). If q-size as calculated is below the configured Min. Average Queue Size, then the packetis accepted. If the average queue size is above the configured Max. Average Queue Size threshold,the packet is dropped. If the Average Queue size falls between the Min. Average Queue Size andthe Max. Average Queue Size, packets are dropped according to the calculated probabilitydescribed in “Calculating packets that are dropped” on page 488.FIGURE 88 WRED operation graphCalculating avg-q-sizeThe 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 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, reducingWRED's sensitivity to the current state of the queue and thus reduce WRED's effectiveness. On theother 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 tooverreact in cases of bursts. Thus, the value of Wq should be carefully chosen according to theapplication at hand.Calculating packets that are droppedThe Pdrop value, as calculated in the following equation, is the probability that a packet will bedropped in a congested switch.PmaxMin. AverageQueue SizeMax. AverageQueue Size