WRED Algorithm
The basic RED algorithm uses a calculated average queue size to determine
when to drop packets and with what probability.This average is based on the previous
average and the current queue size. It therefore can be considered a moving
average with the following formula:
average = (old_average * (1-2 -n)) + (current_queue_size * 2 -n)
In this equation, n is the exponential weighting constant that affects how
rapidly the average changes with respect to the current queue size. By changing
this constant,WRED can be configured to be more or less adaptive to bursts in
traffic. Cisco recommends using the default value of 9, but you can change this
by using the random-detect exponential-weighting-constant command.
Valid ranges are between 1 and 16. Higher values will make the moving average
slower, which smoothes out the peaks and lows in queue length at the expense of
not reacting to congestion fast enough. Lower values will make WRED more
adaptive but the possibly exists that WRED may overreact to temporary traffic
bursts and drop traffic unnecessarily.