Weighted Tail Drop

Analysis
Jul 16, 20096 mins

Congestion Avoidance

Weighted tail drop is a congestion avoidance mechanism used on Cisco’s 2960/2970/3560/3750 switch family. Congestion avoidance is an active queue management (AQM) mechanism utilized to avoid full queue congestion. Full queue congestion is detrimental because all packets going through the queuing system during periods of congestion would be dropped regardless of the priority level of the packet. This situation is analogous to an airline not allowing a passenger to take their first class flight because the line only holds 100 people and the line if full of passengers flying coach. Congestion avoidance is a way of intelligently managing available resources and preserving high priority packet by punishing lower priority traffic. Let’s do a quick review of the challenge congestion avoidance mechanisms are used to overcome and the different types of congestion avoidance algorithms. Full queue congestion results in the dropping of all packets at the tail end of the queue (tail drop). Tail drop indiscriminately drops packets which could detrimentally affect high priority traffic and can lead to the synchronization of TCP flows. The objective of congestion avoidance is to avoid tail drop and de-synchronize TCP flows by only punishing lower priority, aggressive flows. Random early detection (RED) is an IETF standard that randomly drops a percentage of the packets in the queue when thresholds (number of packets) are exceeded. RED drops packets regardless of the QoS marking of the packet. Cisco routers support an enhanced version of RED called weighted random early detection (WRED) which allows the device to drop lower priority traffic before higher priority traffic. WRED reduces the chance that a higher priority packet will be inadvertently dropped when the minimum threshold is exceeded. Modular router platforms like the 12000, 10000, 7500, and 6500 or 7600 support a variety of WRED termed distributed weighted random early detection (dWRED) which requires distributed class-based weighted fair queueing (dCBWFQ). Cisco QoS mechanisms that start with the word distributed require a variant of cisco express forwarding (CEF) switching called distributed CEF (dCEF). dCEF pushed the forwarding information base (FIB) built from the routing information base (RIB) down to the line card level so packets can be locally routed by the CPU and memory of the line card as opposed to the main route processor. dCEF optimizes performance by removing unnecessary traffic from the backplane of the router or switch. dCEF and dQoS mechanisms are only possible on platforms in which line cards have processor and memory resources. The 6500/7600 line cards require the distributed forwarding card (DFC) to support dCEF technologies. Many 6500/7600 line cards do not have DFC resources. The 7200 router does not support dCEF technologies. The 3550, 4500, and 6500 switches support WRED, while the 2950 does not. The 4500 series switch supports a variant of WRED termed dynamic buffer limiting (DBL). DBL has the ability to operate at the flow level, allowing DBL to be an effective mechanism of dropping traffic that does not respond to dropped packets. WRED is responsible for throttling back TCP based traffic because the TCP window size will be reduced every time a packet is dropped or marked congestion experienced (CE). UDP based traffic flows normally do not respond to lost packets or CE bits in the explicit congestion notification (ECN) field of the type of service (ToS) header. Flow-based WRED is supported at the interface level of a Cisco router, but this mechanism is not class-based which reduces its usefulness now that the modular QoS CLI is used to create QoS policies. WRED has configurable minimum and maximum threshold parameters which determines when packets will be randomly dropped and when the profile (QoS marking) will go into full tail drop. Each QoS marking can be configured with a different minimum threshold, maximum threshold, and mark probability denominator. The thresholds are configured as the number of packets in the queue, while the mark probability denominator (MPD) sets the drop probability of a packet. The mark probability denominator sets the maximum amount of traffic that will be dropped before the queue reaches the maximum threshold. The number of packets to be dropped is determined by a mathematical formula in the router that is based on the number of packets in queue and the configured thresholds. There is a linear relationship with the queue size of the class and the percentage of traffic that is dropped by WRED. A mark probability denominator of 10 indicates that 1/10 of the traffic should be dropped before the maximum threshold is reached. The 2960/2970/3560/3750 switches support weighted tail drop (WTD) which is a simpler congestion avoidance mechanism than WRED. WTD tracks the size of the queue and allocates the maximum number of packets that can be in a queue before traffic of that QoS marking is tail dropped. The QoS SRND recommends aggressively dropping CoS 1 (scavenger class) using the WTD configuration parameters. The 2960/2970/3560/3750 switches support a 1p3q3t queuing model which provides 3 thresholds in which to drop traffic. The first two thresholds are configurable, while the last threshold is always 100% of the queue. It is advisable to map scavenger class traffic (DSCP 8 or cs1) to queue 4 and configure the threshold to 40% of the queue. This will allow the WTD system to drop scavenger class traffic more aggressively. The following commands map DSCP 8 to queue 4, threshold 1. Queue 4, threshold one is then configure to tail drop packets when 40% of the queue is utilized. mls qos srr-queue output dscp-map queue 4 threshold 1 8 mls qos queue-set output 1 threshold 4 40 100 100 100 Weighted Tail Drop is a simplified congestion avoidance mechanism that Cisco uses in newer switch platforms. Feel free to ask questions or add any content. Thanks for reading. REFERENCES Cisco Live: Quality of Service Presentation http://www.cisco.com/en/US/prod/collateral/iosswrel/ps6537/ps6558/prod_presentation0900aecd80312b59.pdf Slide 18 through 21 cover congestion avoidance Congestion Avoidance http://www.cisco.com/en/US/docs/ios/qos/configuration/guide/congestion_avoidance.html Recommendations on Queue Management and Congestion Avoidance http://www.faqs.org/rfcs/rfc2309.html Flow Based WRED http://www.cisco.com/en/US/docs/ios/12_0t/12_0t3/feature/guide/flowwred.pdf Distributed Class-Based Weighted Fair Queueing and Distributed Weighted Random Early Detection http://www.cisco.com/en/US/docs/ios/12_1t/12_1t5/feature/guide/dtcbwred.html Medianet Campus QoS Design 4.0 http://www.cisco.com/en/US/docs/solutions/Enterprise/WAN_and_MAN/QoS_SRND_40/QoSCampus_40.html Dynamic Buffer Limiting (DBL) http://www.cisco.com/web/about/ac123/ac114/ac173/Q1-06/p_19.html High Point Solutions – Cisco UC Integrator www.highpoint.com Global Knowledge QoS Class http://www.globalknowledge.com/training/course.asp?pageid=9&courseid=7578&catid=206&country=United+States