+ All Categories
Home > Documents > CS551 TCP Congestion Control - University of Southern...

CS551 TCP Congestion Control - University of Southern...

Date post: 27-Apr-2018
Category:
Upload: nguyenduong
View: 215 times
Download: 1 times
Share this document with a friend
22
CS551 TCP Congestion Control Bill Cheng http://merlot.usc.edu/cs551-f12 1 Computer Communications - CSCI 551 Copyright © William C. Cheng
Transcript
Page 1: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

CS551TCP Congestion Control

Bill Cheng

http://merlot.usc.edu/cs551-f12

1

Computer Communications - CSCI 551

Copyright © William C. Cheng

Page 2: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

routers have finite buffer (packets get dropped)

Retransmissions costs: (routers have finite buffer, so

packet get dropped)

even if routers have infinite buffer space

Queueing delays in router as packet arrival rate nears

link capacity

2

Causes and Costs of Congestion

Computer Communications - CSCI 551

Copyright © William C. Cheng

costs: wasting bandwidth to forward unneeded copies

retransmitted data eat up bandwidth

when a packet is dropped along a path, the transmission

capacity that was used at each of the upstream routers

to forward that packet was wasted

efficiency

The theory behind congestion control

stability

Page 3: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

Retransmissions of large packets after loss of a single

fragment

If both sources send at full speed, the router is overwhelmed

3

Congestion

Computer Communications - CSCI 551

Copyright © William C. Cheng

Other forms of congestion collapse:

Non-feedback controlled sources

10 Mbps

10 Mbps

1.5 Mbps

congestion collapse: senders lose data from congestion

and they resend, causing more congestion (can be

self-reinforcing)

Page 4: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

Uses network resources efficiently

A mechanism which:

Preserves fair network resource allocation

Prevents or avoids collapse

Congestion collapse is not just a theory

Has been frequently observed in many networks

delay

load

throughput

load

4

Computer Communications - CSCI 551

Copyright © William C. Cheng

Congestion Control and Avoidance

knee cliff

knee cliff

Page 5: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

avoids overrunning the receiver

What does flow control do?

avoids overrunning router buffers and saturating the

network

What does congestion control do?

both use windows: wnd for flow control and cwnd for

congestion control, actual window used is min(wnd,cwnd)

What mechanism do they use?

5

Computer Communications - CSCI 551

Copyright © William C. Cheng

Congestion Control vs. Flow Control

Page 6: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

6

Computer Communications - CSCI 551

Copyright © William C. Cheng

Congestion Control Goals

Efficiency (maximize throughput or power [Ramakrishnan90a])

Fairness [Ramakrishnan90a]

Stability [Jacobson88a]

Page 7: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

7

Computer Communications - CSCI 551

Copyright © William C. Cheng

Fairness

But, defining fairness is hard... what is a user?

Should treat all users equally

In the absence of knowing requirements, assume a fair

allocation means equal allocation

Measuring fair allocations [Ramakrishnan90a]

Jain and Chiu’s fairness index: (∑

xi)2 /n (

∑x2

i)(

∑xi)

2 /n (∑

x2

i)

xi = throughput of flow i

Ex: fairness index = 1 if all xi are equal

Ex: fairness index = k/n if k out of n flows are equal

and other flows (n-k) receives 0 throughput

host, flow, person?

n flows through a link, each flow should get 1/n bandwidth

what if their needs are different?

Other schemes, e.g., fair queueing [Demers89a]

Page 8: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

power = throughput α

delay

delay

load

throughput

load

power

load

knee cliff

8

Efficiency

Computer Communications - CSCI 551

Copyright © William C. Cheng

Want most throughput with

low delay

Power [Ramakrishnan90a]

0<α<1, α=1 results in power

being maximized at the

knee of the curve

System is most efficient

at knee of curve

(others may say that the

knee of the delay curve is at L2)

L1 L2

Page 9: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

Avoidance keeps system at knee of curve

Avoidance or control?

9

Congestion Control Design

Computer Communications - CSCI 551

Copyright © William C. Cheng

But, to do that, need routers to send accurate signals

(some feedback)

TCP uses its window to do congestion control

Sending host must adjust amount of data it puts in the

network based on detected congestion

But what’s the right strategy to increase/decrease window

(slow start, congestion avoidance, exponential backoff)

Control responds to loss after the fact

but also avoidance, sort of

this is what ECN tries to accomplish

another possibility is to use rate (in the future)

Page 10: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

When to increase/decrease cwnd?

10

How To Adjust Window in TCP?

Computer Communications - CSCI 551

Copyright © William C. Cheng

Efficiency

Constraints:

Fairness

Stability or convergence (too much oscillation is bad)

Out-of-date information

RTT is fundamental limit to how quickly you can react

Observe network

A control theory problem

Reduce window when congestion is perceived

Increase window otherwise

Page 11: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

to change additively: ai(t)

Formulation allows for the feedback signal:

11

Linear Control

Computer Communications - CSCI 551

Copyright © William C. Cheng

to change multiplicatively: bi(t)

What does TCP do?

Xi(t+1) = ai(t) + bi(t)Xi(t)user 1

user 2

user n

Σ Σ xi > Xgoal ?

network

can consider feedback

AIMD: additive increase, multiplicative decrease

maximize stability: slow increase, fast decrease

Page 12: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

12

Linear Control Example [Chiu89a]

Computer Communications - CSCI 551

Copyright © William C. Cheng

user 1’s allocation x1

user

2’s

allo

cati

on

x2

fairnessline

efficiency line(full utilization)

overload

underload

optimal(efficient and fair)

Page 13: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

13

Linear Control Example [Chiu89a]

Computer Communications - CSCI 551

Copyright © William C. Cheng

user 1’s allocation x1

user

2’s

allo

cati

on

x2

fairnessline

efficiency line(full utilization)(x10,x20)

Page 14: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

14

Linear Control Example [Chiu89a]

Computer Communications - CSCI 551

Copyright © William C. Cheng

user 1’s allocation x1

user

2’s

allo

cati

on

x2

fairnessline

additiveincrease

(x10,x20)efficiency line(full utilization)

Page 15: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

multiplicativeincrease

15

Linear Control Example [Chiu89a]

Computer Communications - CSCI 551

Copyright © William C. Cheng

user 1’s allocation x1

user

2’s

allo

cati

on

x2

fairnessline

additiveincrease

(x10,x20)efficiency line(full utilization)

Page 16: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

multiplicativedecrease

16

Linear Control Example [Chiu89a]

Computer Communications - CSCI 551

Copyright © William C. Cheng

user 1’s allocation x1

user

2’s

allo

cati

on

x2

fairnessline

additiveincrease

(x10,x20)efficiency line(full utilization)

Page 17: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

17

Computer Communications - CSCI 551

Copyright © William C. Cheng

Linear Control Result [Chiu89a]

Decrease must be mutiplicative

smoothness implies that multiplicative increase factor

must be exactly 1

Efficiency, fairness and distributedness imply that

Increase must be additive and may have a multiplicative

factor

Page 18: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

18

TCP Equally Shares Bandwidth On ACongested Link

Computer Communications - CSCI 551

Copyright © William C. Cheng

TCP stream 1 throughput

TC

P s

tream

2 t

hro

ug

hp

ut

R

Requal

bandwidthshare

full bandwidthutilization line

A

Page 19: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

no slow start

19

TCP Equally Shares Bandwidth On ACongested Link (Cont...)

Computer Communications - CSCI 551

Copyright © William C. Cheng

TCP stream 1 throughput

TC

P s

tream

2 t

hro

ug

hp

ut

R

Requal

bandwidthshare

full bandwidthutilization line

A

B

A → B:

congestion

avoidance for

both streams

paralle to the

45-degree line

Page 20: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

packet loss, so

ssthresh =

cwnd/2

20

TCP Equally Shares Bandwidth On ACongested Link (Cont...)

Computer Communications - CSCI 551

Copyright © William C. Cheng

TCP stream 1 throughput

TC

P s

tream

2 t

hro

ug

hp

ut

R

Requal

bandwidthshare

full bandwidthutilization line

A

B

C

B → C:

C is half way

between B and

origin

Page 21: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

21

TCP Equally Shares Bandwidth On ACongested Link (Cont...)

Computer Communications - CSCI 551

Copyright © William C. Cheng

TCP stream 1 throughput

TC

P s

tream

2 t

hro

ug

hp

ut

R

Requal

bandwidthshare

full bandwidthutilization line

A

B

C

Dcongestion

avoidance

C → D:

Page 22: CS551 TCP Congestion Control - University of Southern ...merlot.usc.edu/cs551-m05/lectures/tentative/11a_tcpcongestion.pdf · 22 TCP Equally Shares Bandwidth On A Congested Link (Cont...)

22

TCP Equally Shares Bandwidth On ACongested Link (Cont...)

Computer Communications - CSCI 551

Copyright © William C. Cheng

TCP stream 1 throughput

TC

P s

tream

2 t

hro

ug

hp

ut

R

Requal

bandwidthshare

full bandwidthutilization line

A

B

C

DWhat if B → C

does not go

towards the

origin?

unfare?


Recommended