CS 557 RED Random Early Detection Gateways for Congestion Avoidance S. Floyd and V. Jacobson, 1993 Spring 2013
The Story So Far … . Some Essential Apps: DNS (naming) and NTP (time). Transport layer: End to End communication, Multiplexing, Reliability, Network layer: Addressing, Congestion control, Fragmentation, Dynamic Flow control, Routing, Best Effort Forwarding Data Layer: richly connected network (many paths) with many types of unreliable links
Congestion Control Options • Control Congestion at Source – Typically adjust congestion windows – But can ’ t assume everyone will do this • Faulty implementation of the control algorithm • Intentional ignorance of the control algorithm • Dynamic Routing – Route packets around congestion – Has problems with jitter, convergence, etc. • Managing the Queues at the Routers – Topic of this paper
RED Main Points • Objective: – Technique to notify senders of congestion and achieve high throughput and average queue sizes • Approach: – Gateways mark or drop packets – Monitor average queue size – Randomly mark/drop some packets above a given min threshold, – Mark/drop all packets above a max threshold • Contributions: – Well known technique and implemented in production routers
Congestion at Gateways • End system can only infer congestion – Lack a global understanding of traffic – Lack a sufficiently long time period • Gateway best suited to signal congestion – But should also tolerate bursty traffic • How to do this?
The Basic Idea • Gateway signals congestions by – Marking some packets – Dropping some packets • Maintain an average queue value – Want to tolerate bursts – Don ’ t overreact to transient congestion • Drop/Mark some packets when average queue exceeds a min threshold (minthresh) • Drop/Mark all packets when average queue exceeds a max threshold
RED Algorithm • For each packet arrival calculate average queue size = avg if minth < avg < maxth calculate probability pa with probability pa, mark packet else if avg > maxth mark packet
Calculating the Average • Weight average function – avg = (1-wq)avg + wq*q • How to Select wq? – If wq is too large, will not filter out transient congestion – To allow burst of L packets, Want avg < minth L + 1 ((1-wq)^(L+1) - 1)/wq < minth ex: minth = 5, L = 50, => wq < 0.0042 – If wq is too small, avg doesn ’ t reflect actual queue size
Calculating the Drop Probability • Marking probability – pb = maxp ( avg - minth) / (maxth - minth) • Method 1: – Each packet marked with probability = pb – Result Prob[X=n] = pb * (1-pb)^(n-1) • Method 2: – Keep count of packets since last mark – Each packet marked with probability = pb/(1- count*pb)
Why is Randomness Important • Need to avoid global synchronization – Don ’ t want every connection to slow down at the same time. • Fraction of marked packets should be roughly proportional to connections share of the bandwidth
The Impact of RED on Queuing • Note the average queue value (avg) in the above – The queue size is bursty – The average tolerates transient bursts of packets – The average also tracks the general trend in queue size
Comparing Red and Drop-Tail
RED Summary • Effective In Helping Manage Queue Sizes – Does not assume a particular transport protocol, – But well suited to TCP style backoff • Tolerates Transient Bursts – Uses a weighted average of queue size rather than the current queue state • Avoids Global Synchronization – Probability of drops increase with congestion • High Degree of Operational Flexibility – Can select appropriate wq, maxp, minth, maxth, etc. – Some guidelines for selecting values • Though optimal values not known
Recommend
More recommend