5 Replies Latest reply: Dec 15, 2017 5:04 AM by Gus RSS

    Congestion Avoidance

    Juan

      While Queuing algorithms manage the front of a queue and define the order the packets leaving a queue, Congestion Avoidance mechanisms manage the tail of a queue.

       

      Congestion avoidance is achieved through packet dropping when queues are filling trying to anticipate and avoid congestion in the queue. This technique works best with TCP-based applications because TCP has built-in flow-control mechanisms that operate by increasing the transmission rates of traffic flows until packet loss occurs.

       

      Tail Drop and Weighted Random Early Detection (WRED) are two common avoidance mechanisms.

       

       

       

      Tail Drop

       

      Tail Drop is the simplest technique to limit queue size and it is the default drop behaviour. How Tail Drop works?

       

      • Queues fill during periods of congestion. When the output queue is full and Tail Drop is in effect, packets are discarded as they arrive until there is space in the queue again.
      • Tail Drop treats all traffic equally, dropping all packets without differentiating between classes of service.

       

      This behaviour can cause TCP global synchronization problems because packets from multiple flows are dropped all at once and it manifests when multiple TCP sources reduce their transmission rates in response to packet dropping and then increase their transmission rates once again when congestion is reduced.

       

      Global synchronization occurs as congestion waves where the peak are followed by trough during which the transmission link is not used in its entirety; leading to a very inefficient bandwidth utilization.

       

      The next figure illustrates how the Tail Drop leads to the TCP global synchronization problem when it is used as the congestion avoidance mechanism.

       

       

       

       

      The TCP global synchronization problem can be solved if rather than letting all the TCP flows go down and then start over and over again, a random dropping of packets occurs. This will have an effective smoothing out the TCP flows allowing for more flows to be at the maximum bandwidth utilization rates achieving higher throughput and overall more efficiency over the network.

       

       

       

      Weighted Random Early Detection

       

      WRED is the main congestion avoidance mechanism that attempts to anticipate and avoid congestion rather than control the congestion once it occurs.

       

      WRED acts by dropping packets randomly before the queue is full and seeks to maintain a consistent queue depth by increasing the dropping rate as the average queue size increases.

       

      With this behaviour, WRED distributes losses in time and maintains a normally low queue depth while absorbing spikes, avoiding the Global Synchronization of TCP flows that occurs when Tail Drop is used.

       

      This avoidance congestion mechanism is usually used in the core routers rather than at the edge of the network. Edge routers assign IPP or DSCP markings to packets as they enter the network.

       

      WRED uses this traffic weights either by IPP of DSCP for selectively discard lower priority traffic when the interface begins to get congested and provide a preferential traffic handling of higher priority packets:

       

      • Default WRED drops packets selectively based on IP precedence, in way that packets with lower IPP values (lower priority) are dropped more aggressively than higher values (higher priority).
      • DSCP-based WRED uses the AF Drop Preference marking to skew the drop decision, so higher AF Drop Preference packets are dropped more aggressively. This is the most common avoidance mechanism used.

       

       

      DSCP-based WRED

       

      WRED provides separate thresholds and weights for different traffic types in a same queue, allowing to provide different QoS in regard to packet dropping for each traffic type. Thus, standard traffic may be dropped more frequently than higher prioritized traffic during periods of congestion.

       

      DSCP-based WRED allows for different drop profiles based on DSCP values (64 profiles). Each profile has three modes of operation depending on the average queue size value:


      • No drop .- 0 < Queue Size < Minimum Threshold
      • Random drop: Minimum Threshold < Queue Size < Maximum Threshold
      • Full drop (Tail Drop): Maximum Threshold < Queue Size


      The following figure illustrates the DSCP-based WRED behaviour:

       

       

       

      Summary

       

      The next table summarizes the drop decision in the most common WRED mechanisms

       


      Congestion avoidance mechanism

      Drops based on

      More aggressive on

      Default WRED

      IPP

      Lower IPP values

      DSCP-based WRED

      AFxy

      Higher y values


       

      It is recommend to use DSCP-based WRED whenever possible as a congestion avoidance mechanism for TCP traffic but is important to evaluate what its effect may be in other kind of traffic:

       

      • WRED statistically drops more packets from sources that generate the most traffic. These sources are more likely to be slowed down than others generating less traffic.
      • WRED is only useful when the bulk of data is TCP/IP traffic. With TCP, dropping packets indicates congestion, so the packet source will reduce its transmission rate. With other protocols, packet sources may not respond and dropping packets does not decrease congestion.
      • WRED treats non-IP traffic as a precedence 0, therefore this traffic is more likely to be dropped than IP traffic.

       

      I hope you find it useful.