Chapter 6: Congestion Control and Resource Allocation CS/ECPE 5516: Comm. Network Prof. Abrams Spring 2000 1
Section 6.1: Resource Allocation Issues 2
How to prevent traffic jams Traffic lights on freeway entrance during rush hour n Controls and reduces congestion after it develops n Congestion Control Schedule each car s trip on highway so congestion never develops n Resource allocation Carpool Lane w/ traffic lights n Gives higher priority to carpool vehicles n Congestion could still develop n Combination of Resource allocation & Congestion Control 3
What s wrong with doing ONLY Resource Allocation? Congestion control? 4
Is routing a congestion control mechanism? 5
How do these differ Congestion control vs. Flow control 6
Another term Fairness: n Attempt to allocate resources to customers in way that some property is maintained n Perhaps equal resource use n Perhaps a guaranteed fraction of resource use n Perhaps a guarantee that eventually each customer will be served 7
Objectives of Congestion Control Two main objectives of congestion control n Delay Achieve balance between rejecting traffic (which decreases throughput) and keeping delay low n Fairness Secondary objective of congestion control n Buffer overflow Prevent buffer overflow that can lead to deadlock or extreme throughput degradation n Related to delay and fairness 8
Which One does the Telephone Network Do? Congestion control? Resource allocation? 9
Ways to Impose Congestion Control (1) Call blocking n A session is blocked from entering the network n Traditionally used in circuit-switched networks n Busy signal n Used in ATM n CBR, VBR, or ABR session requests connection with guaranteed bandwidth and/or maximum latency -- quality of service (QoS) n Network will accept or block connection n Network could offer a degraded connection that may be acceptable to application 10
Ways to Impose Congestion Control (2) Packet (cell) discarding n Packets discarded when buffers are (nearly) full n Discarding can be selective n Packets from low priority sessions n Packets from sessions exceeding their allotted bandwidth n Packets likely to be discarded elsewhere 11
Ways to Impose Congestion Control (3) Packet blocking n Individual packets can be prevented from entering network n Buffer for later transmission (high priority) n Discard (low priority) n It s better to prevent packet from entering network than to enter, user resources, and be discarded 12
Ways to Impose Congestion Control (4) Packet scheduling n Network nodes may selectively expedite or delay packet transmission n Selection criteria n Delay low priority traffic in favor of high priority traffic n Use round-robin schedule to ensure fairness n Delay packets that will use congested resources elsewhere in network 13
How easy is it to do congestion control/resource allocation on Connection-oriented Connection-less Flow-based (see next slide ) 14
Flows Vs. Datagrams Datagram->packets can all take different routes Flows->packets follow same route, even without connection setup Routers recognize flow n perhaps via flow-identifier in packet headers (IPv6) n perhaps by flow set-up message n perhaps by seeing same source/dest layer3 addresses Routers maintain soft state n created/deleted by router, not by signaling 15
6.2: Example of Resource Allocation with Flows Fair Queuing (FQ) n One flow per queue n Packets vary in size; service flows with small packets more often Round- Robin Service 16
6.1.2: Taxonomy of Approaches to Resource Alloc. & Congestion Router Centric Rate-Based Feedback-Based Reservation-Based 17 Window-Based Host Centric
Taxonomy of Approaches (2) Router-centric versus host-centric: Where is the main functionality of congestion control? n Hosts -- at the edge of the network n Routers -- inside the network Reservation-based versus feedback-based n Hosts can reserve capacity n Network accepts or rejects (blocks) n Network can provide feedback to hosts n Explicit bit in header indicating congestion n Implicit dropped packet 18
Taxonomy of Approaches (3) Window-based versus rate-based n Window-based: hosts are controlled by limiting their send window size n Messages update the size of the window n Rate-based: hosts transmit at some rate n Example: video stream needs 1.5 Mbps 19
Where is TCP? Router Centric Rate-Based Feedback-Based Reservation-Based 20 Window-Based Host Centric
6.4: Alternatives to TCP Congestion Control n What TCP uses n Slow start creates congestion to detect it! n Why? Tries to solve problem at end hosts only Congestion Avoidance n Routers + end hosts cooperate n Routers signal developing problems n End hosts can throttle back before congestion occurs 21
Congestion Avoidance Example: DECbit Add one bit (congestion bit) to packet header Router measures ave. queue length Router sets bit=1 if queue length >1 Receiver returns congestion bit in ack header Sender: n if <50% of acks in window have bit=1, CWND=CWND*7/8 n else CWND = CWND+1 vs. TCP s 1/2 22
Congestion Avoidance Example: Random Early Detection (RED) Due to Sally Floyd and Van Jacobson No explicit congestion bit like DECbit Instead, router intentionally drops packet to signal end host to slow down! So router drops packets sooner than it would have to Random in name means packets from random flows are dropped, to be fair 23
More on Random Early Detection (RED) Router computes ave q length: n AveLen = (1-λ)AveLen + λ LenSample (Look familiar?) Pr(drop) 1.0 24 Min Max AveLen
Miscellaneous facts on RED Factor λ is based on RTT for typical connections: If router drops packet, takes as much as RTT for end host to slow down. So router shouldn t adapt faster than RTT. With random drops, flows using most bandwidth have most drops a notion of fairness In ATM, packet requires multiple cells. If RED drops one cell, drop all cells. 25
6.5: Quality of Service Certain traffic has performance requirements n Real-time (e.g., max packet latency for voice call) n Multimedia (e.g., frame rate for video) IETF s 2 service classes ( Integrated Services ) n Guaranteed Service n Voice calls cannot tolerate packets late by a certain amount n Controlled Load n Streaming media player can slowly adjust its buffer size to fit performance of channel. 26
Some QoS parameters Data rate Average latency (delay) Variance in delay or jitter n Jitter is the instantaneous difference in two synchronized events or streams Error rate n Bit error rate (BER) n Packet error rate (PER) entire packet is lost 27
QoS Terminology Flowspec: n I want controlled load or jitter<125µs or my ave. sending rate is 1Mbps, with bursts up to 10Kb long Admission control: n We ve got six 1Mbps connections; we cannot admit a seventh Resource reservation: n Allocate resources based on QoS needs Packet scheduling: n Determine when to transmit a packet at hosts & routers 28
Resource Reservation Protocol -- RSVP (1) For unicast or multicast Step 1: senders send PATH message requesting service Step 2: receivers decide what to give senders, and make reservation with RESV message 29 n Receiver decision is opposite of a traditional phone call Routers use soft state n Reservation state is cached in routers n Periodically refreshed when receivers send RESV
Resource Reservation Protocol -- RSVP (2) Src 1 PATH RESV RESV I ll listen to Joe on flowid 97 at 5fps Rcvr A Src 2 PATH Joe is sending video at 10 fps with flowid 97 RESV Rcvr B 30
Differentiated Services You just saw Integrated Services: n Allocate resources to individual flows n RSVP run for every call, and routers must keep track of many flows. Differentiated services: n Just two service classes, period: normal & premium n Packets identify which they belong to with a bit Rationale: Internet has trouble with 1 class today, so just increase number classes to 2! 31