+ All Categories
Home > Documents > Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

Date post: 27-Mar-2015
Category:
Upload: zachary-underwood
View: 224 times
Download: 0 times
Share this document with a friend
Popular Tags:
29
Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008
Transcript
Page 1: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

Congestion Control and Fairness Models

Nick FeamsterCS 4251 Computer Networking II

Spring 2008

Page 2: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

2

Internet Pipes?

• How should you control the faucet?– Too fast – sink overflows– Too slow – what happens?

• Goals– Fill the bucket as quickly as possible– Avoid overflowing the sink

• Solution – watch the sink

Page 3: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

3

Congestion

• Different sources compete for resources inside network

• Why is it a problem?– Sources are unaware of current state of resource– Sources are unaware of each other

• Manifestations:– Lost packets (buffer overflow at routers)– Long delays (queuing in router buffers)– Can result in throughput less than bottleneck link (1.5Mbps

for the above topology) a.k.a. congestion collapse

10 Mbps

100 Mbps

1.5 Mbps

Page 4: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

4

Causes & Costs of Congestion

• Four senders – multihop paths• Timeout/retransmit

Q: What happens as rate increases?

Page 5: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

5

Causes & Costs of Congestion

• When packet dropped, any “upstream transmission capacity used for that packet was wasted!

Page 6: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

6

Congestion Collapse• Definition: Increase in network load results in

decrease of useful work done• Many possible causes

– Spurious retransmissions of packets still in flight• Classical congestion collapse• How can this happen with packet conservation?

RTT increases!• Solution: better timers and TCP congestion control

– Undelivered packets• Packets consume resources and are dropped

elsewhere in network• Solution: congestion control for ALL traffic

Page 7: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

7

Congestion Control and Avoidance

• A mechanism that:– Uses network resources efficiently– Preserves fair network resource allocation– Prevents or avoids collapse

• Congestion collapse is not just a theory– Has been frequently observed in many networks

Page 8: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

8

Congestion Control Approaches

• End-end congestion control:– No explicit feedback from

network– Congestion inferred from

end-system observed loss, delay

– Approach taken by TCP

• Network-assisted congestion control:

• Routers provide feedback to end systems

• Single bit indicating congestion (SNA, DECbit, TCP/IP ECN, ATM)

• Explicit rate sender should send at

• Problem: makes routers complicated

• Two broad approaches

Page 9: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

9

Example: TCP Congestion Control

• Very simple mechanisms in network– FIFO scheduling with shared buffer pool– Feedback through packet drops

• TCP interprets packet drops as signs of congestion and slows down

– This is an assumption: packet drops are not a sign of congestion in all networks

• E.g. wireless networks

• Periodically probes the network to check whether more bandwidth has become available.

Page 10: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

10

• Simple router behavior • Distributed operation

• Efficiency: X = Σxi(t)– Solution leads to high network utilization

• Fairness: (Σxi)2/n(Σxi2)

– What are the important properties of this function?

• Convergence: control system must be stable

Objectives

Page 11: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

End-to-End Congestion Control

• Increase algorithm– Sender must “test” the network to determine whether

or not the network can sustain a higher rate

• Decrease algorithm– Senders react to congestion to achieve optimal loss

rates, delays, sending rates

Page 12: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

Two Approaches

• Window-based– Sender uses ACKs from receiver to “clock”

transmission of new data

• Rate-based– Sender monitors loss rate and uses timer to modulate

the transmission rate– Actually need a burst rate and a burst size

Page 13: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

13

• What are desirable properties?

• What if flows are not equal?

Efficiency Line

Fairness Line

User 1’s Allocation x1

User 2’s Allocation

x2Optimal point

Overload

Underutilization

Phase Plots

Page 14: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

14

• Reduce speed when congestion is perceived– How is congestion signaled?

• Either mark or drop packets– How much to reduce?

• Increase speed otherwise– Probe for available bandwidth – how?

Basic Control Model

Page 15: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

15

• Many different possibilities for reaction to congestion and probing– Examine simple linear controls

• Window(t + 1) = a + b Window(t)• Different ai/bi for increase and ad/bd for decrease

• Supports various reaction to signals– Increase/decrease additively– Increased/decrease multiplicatively– Which of the four combinations is optimal?

Linear Control

Page 16: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

16

• Simple way to visualize behavior of competing connections over time

User 1’s Allocation x1

User 2’s Allocation

x2

Phase Plots

Page 17: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

17

T0

T1

Efficiency Line

Fairness Line

User 1’s Allocation x1

User 2’s Allocation

x2

• Both X1 and X2 increase/ decrease by the same amount over time– Additive increase

improves fairness and additive decrease reduces fairness

Additive Increase/Decrease

Page 18: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

18

• Both X1 and X2 increase by the same factor over time– Extension from

origin – constant fairness

T0

T1

Efficiency Line

Fairness Line

User 1’s Allocation x1

User 2’s Allocation

x2

Multiplicative Increase/Decrease

Page 19: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

19

xH

Efficiency Line

Fairness Line

User 1’s Allocation x1

User 2’s Allocation

x2

Convergence to Efficiency

Page 20: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

20

xH

Efficiency Line

Fairness Line

User 1’s Allocation x1

User 2’s Allocation x2

a=0b=1

a>0 & b<1

a<0 & b>1

a<0 & b<1

a>0 & b>1

Distributed Convergence to Efficiency

Page 21: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

21

xH

Efficiency Line

Fairness Line

User 1’s Allocation x1

User 2’s Allocation

x2

xH’

Convergence to Fairness

Page 22: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

22

• Intersection of valid regions• For decrease: a=0 & b < 1

xH

Efficiency Line

Fairness Line

User 1’s Allocation x1

User 2’s Allocation

x2

xH’

Convergence to Efficiency and Fairness

Page 23: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

23

• Constraints limit us to AIMD– Can have

multiplicative term in increase(MAIMD)

– AIMD moves towards optimal point

x0

x1

x2

Efficiency Line

Fairness Line

User 1’s Allocation x1

User 2’s Allocation

x2

Approach

Page 24: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

Results

• Assuming syncrhonized feedback (i.e., congestion is signalled to all connections sharing a bottleneck)– Additive increase improves fairness and efficiency– Multiplicative decrease moves the system towards

efficiency without altering fairness

• In contrast– Additive decrease reduces fairness– MIMD does not ever improve fairness

Page 25: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

• Distributed, fair and efficient• Packet loss is seen as sign of congestion and results in a

multiplicative rate decrease – Factor of 2

• TCP periodically probes for available bandwidth by increasing its rate

Time

Rate

AIMD

Page 26: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

32

• Operating system timers are very coarse – how to pace packets out smoothly?

• Implemented using a congestion window that limits how much data can be in the network.– TCP also keeps track of how much data is in transit

• Data can only be sent when the amount of outstanding data is less than the congestion window.– The amount of outstanding data is increased on a “send” and

decreased on “ack”– (last sent – last acked) < congestion window

• Window limited by both congestion and buffering– Sender’s maximum window = Min (advertised window, cwnd)

Implementation

Page 27: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

• If loss occurs when cwnd = W– Network can handle 0.5W ~ W segments– Set cwnd to 0.5W (multiplicative decrease)

• Upon receiving ACK– Increase cwnd by (1 packet)/cwnd

• What is 1 packet? 1 MSS worth of bytes• After cwnd packets have passed by

approximately increase of 1 MSS

• Implements AIMD

Congestion Avoidance

Page 28: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

Sequence No

Packets

Acks

Example: Sequence Number Plot

Page 29: Congestion Control and Fairness Models Nick Feamster CS 4251 Computer Networking II Spring 2008.

Throughput vs. Loss Rate

• To the first order, throughput is proportional to 1/sqrt(loss rate)– “TCP friendliness”

• Consider following diagram to derive throughput:

How many packets between periods of packet loss?(arithmetic series)

Compute loss rate from this…

Throughput: avg rate / RTT


Recommended