27
4-transport.fm 1/27 May 26, 2004 Martin Karsten - CS 856, Spring 2004 CS 856 Internet Transport Performance Congestion Control: TCP, ECN, and Variants Martin Karsten School of Computer Science, University of Waterloo [email protected]

CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

ance

ansport.fm 1/27 May 26, 2004

CS 856Internet Transport Perform

Congestion Control:TCP, ECN, and Variants

Martin KarstenSchool of Computer Science, University of [email protected]

Page 2: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

ansport.fm 2/27 May 26, 2004

Contents

TCP Variants

Explicit Congestion Notification (ECN)

Distributed Admission Control and Rate Allocation

Page 3: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

eiver

er only

-outtion

w

ansport.fm 3/27 May 26, 2004

TCP Congestion Control - Background

Pre-Congestion Control TCP• reliable transport protocol• window-based flow control between sender and rec

• Go-back-N sliding window algorithm

Problems• window size negotiated between sender and receiv• round trip time (RTT) estimation insufficient

⇒ No Consideration of Changing Network State• no large initial bursts after connection setup• Internet congestion collapse

TCP Congestion Control• slow start after connection establishment and time• exponential timer back-off upon congestion indica• improved RTT estimation• dynamic window sizing

• minimum of receiver window and congestion windo

Page 4: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

ter slow-start

ng congestion window slow-start

sses

ansport.fm 4/27 May 26, 2004

TCP - Deployed Variants

Tahoe• basic version with slow-start• three duplicate ACKs or time-out → congestion• congestion → reset congestion window to 1 and en

Reno• fast retransmit and recovery• three duplicate ACKs → fast retransmit/recovery

• retransmit packets clocked by ACKs without checki• time-out → reset congestion window to 1 and enter

NewReno• improvement of fast recovery for multiple packet lo

Sack• selective acknowledgements

Page 5: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

ation?

d-triprce

ansport.fm 5/27 May 26, 2004

TCP Vegas

TCP Observations• requires packet loss as congestion signal

• packet loss caused by buffer overflow• relatively drastic congestion control action

• oscillation between under-utilization and over-utiliz

TCP Vegas• observe RTT and infer buffer occupation• reduce sending rate when RTT grows large• increase sending rate when RTT is small

Problems• estimation of base RTT, i.e. propagation delay roun• congestion on reverse path from destination to sou• fairness compared to traditional TCP

Page 6: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

et

ld droppedtions better average delay

ansport.fm 6/27 May 26, 2004

Random Early Detection (RED)

Early Detection of Incipient Congestion• measure average queue length

• if greater than threshold maxth → mark packet• if between minth and maxth → randomly mark pack

• packet marking: explicit (ECN) or drop packet

Goals• avoid synchronization between flows

• buffer overflow → packets from all connections wou• probabilistic dropping of packets from some connec

• control/reduce queue length by packet dropping →

Problems• parameter setting• infinite variants

Page 7: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

on setup

er dropcipient congestion

ansport.fm 7/27 May 26, 2004

Explicit Congestion Notification (ECN)

Early Packet Dropping Problems• drop without necessity• other reasons for packet drop, e.g. corruption• other transport protocols than TCP?

Idea: Packet Marking instead of Dropping• packets carry congestion signal to end systems

IETF Version: TCP/ECN• end systems: negotiate ECN capability at connecti

• sender: mark packets a ECN-capable• receiver: reflect congestion indications back to send• sender: react to congestion indications similar as to

• router: use RED or comparable algorithm to infer in• mark ECN-capable packet or drop otherwise

• using bits 6 and 7 in old IP TOS field• 00 → not ECN capable• 01 & 10 → ECN capable (two codepoints)• 11 → congestion indication

Page 8: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

drop and mark

al

l algorithms

e.g. MPLS)

iple TCP flows, etc.

packetsed

ansport.fm 8/27 May 26, 2004

TCP/ECN Challenges

Incremental Deployment• packet dropping still possible → TCP must react to• non-compliant end systems• non-compliant routers• restrictive firewalls

Future-Proof Mechanisms• isolated congestion signal vs. persistent load sign

• different time-scales• fairness between different marking and flow contro• suitability of marking algorithm?• interaction with tunnels and non-IP subnet layers (

Security• malicious end systems pretending to use ECN

• not a new threat: TCP w/o congestion control, mult• malicious routers subverting ECN

• not a new threat: routers can drop, insert or change• interaction with IPsec → isolation of tunnels requir

Page 9: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

eb server

nder

pointsve no congestionformation

ansport.fm 9/27 May 26, 2004

TCP/ECN - ECN Nonces

Scenario• sender wants to use ECN congestion control, e.g. w• receiver wants to trick sender into fast downloads

• receiver never reflects a congestion indication to se

Solution: ECN Nonces• sender produces random stream of 01 and 10 code• receiver needs to reproduce stream in ACKs to pro• router congestion indication destroys codepoint in

• congestion indication changes ECN bits to 11

Page 10: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

trol algorithm

l buffer is full

pared to limit

plicit load signaln path

ansport.fm 10/27 May 26, 2004

Other Marking and Control Algorithms

Active Queue Management (AQM)• send the "right" signal and use the "best" flow con

Virtual Queue (VQ)• run virtual queue at lower speed, mark when virtua• stop marking when virtual buffer empties

Adaptive Virtual Queue (AVQ)• load > target rate → reduce virtual rate• load < target rate → increase virtual rate• start/stop marking depending on virtual buffer com

Load-based Marking (LBM)• marking probability derived from relative load → ex• problem with multiple resources along transmissio

Numerous Other Suggestions

Page 11: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

narios

sers

trol"

arks) for transmission raterices

ansport.fm 11/27 May 26, 2004

Packet Marking - Other Application Sce

Consider Packet Mark as Charge Indication• enforce congestion control cooperation from end u• not only to prevent/handle congestion• differentiate network/transport service → "rate con

System Mechanics• end systems control amount of traffic• network controls load signal (probabilistic packet m• higher network load → more marks → higher price• end systems back off from sending at increasing p

Theory• distributed resource auction• strictly concave utility curves• mark/price represents end-to-end load situation

• i.e. additive price for multiple resources• dominance of long-lived flows

⇒ Stable Rate Allocation, i.e. QoS

Page 12: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

rmance

ansport.fm 12/27 May 26, 2004

Perceived QoS

Utility Curve• user’s value of one-dimensional transmission perfo• fairness: user’s willingness to pay• assumption: certain typical shapes

Simple Application Classification• elastic• inelastic

Utility in Reality• multi-dimensional utility curves• variation of utility curve during transaction

Page 13: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

re’s an upper limit

throughput

ansport.fm 13/27 May 26, 2004

Elastic Applications

Examples• file transfer• web

Often modelled as strictly concave, but in reality the

utility

Page 14: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

well

throughputlower delay

ansport.fm 14/27 May 26, 2004

Inelastic Applications

... if the respective other QoS constraints are met, as

Examples• multimedia transmission• interactive games

utility

Page 15: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

transfer time

ansport.fm 15/27 May 26, 2004

Utility Curves - Example: ftp

Average Throughput → Concave Utility Curve

Utility and Transfer Time

Still Not Complete Picture ⇒ Complex Problem

utility

total utilitygoodpututility

Page 16: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

1 mi–( )p∈

1

1

0.55

0.65

ansport.fm 16/27 May 26, 2004

Binary Packet Marking

Single Marking Bit ⇒ Path Marking Rate: M p 1i∏–=

1

0.50.1

0.3

Page 17: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

ed congestion controld decrease

uration

ansport.fm 17/27 May 26, 2004

Service Differentiation

WTP Modification to TCP• approximate rate-based flow control by window-bas• additional parameters control speed of increase an

Marking Algorithms• RED, VQ, LBM

Service Differentiation• good with RED & LBM, ok with VQ• depending on TCP/WTP details

Marking Probability• steep increase with RED, depending on RED config

Average Queueing Delay• RED & LBM better than VQ

Page 18: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

lenges

?

rate is very low

ding rate?

ansport.fm 18/27 May 26, 2004

Packet Marking and Rate Control - Chal

Modelling• applicability of idealized mathematical models• short-lived flows → background noise?• system stability in the presence of feedback delays

Technical• multiple resources vs. single-bit marking

• additive load signal? only approximated, if marking• per packet accounting is expensive

User Preferences• price may not be known ahead of time• price may fluctuate• incentives for providers to upgrade networks?

• only indirect marketing incentives

Security• responsibility for payment vs. responsibility for sen

Page 19: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

et marks)

ansport.fm 19/27 May 26, 2004

Flow Control vs. Admission Control

Flow Control• throttle sending rate according to load signal (pack• packet marking at internal nodes• feedback from receiver• suitable for elastic flows

Admission Control• decide about connection acceptance• inherent per-domain concept

• reliability of end systems• feedback between edge gateways• suitable for inelastic flows

Page 20: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

ic Trafficad state

cey

ansport.fm 20/27 May 26, 2004

Packet Marking and Admission Control

Use Packet Marking for Admission Control of Inelast• end systems or gateways probe network to infer lo• or infer load from existing traffic• no calls are accepted, if load is below threshold

Gateways: Solve Technical and Security Challenges• controlling traffic and reacting to packet marks• easier to account for than individual end systems• more reliable rate control reaction• operated by network provider• offering traditional signalling-based service interfa• fixed price per mark vs. very high willingness-to-pa

Different Level of Insight• mathematical models and proofs for flow control• reasoning and simulation for admission control

Integration of Elastic and Inelastic Flows?• at least offer unused capacity to background traffic

Page 21: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

)

(?)

forwardingrmin rmax

rate

mark/dropprobability

LBM

ansport.fm 21/27 May 26, 2004

Packet Marking Algorithms

Random Early Detection (RED) & Variants• queue-based feedback• ineligible packets → random drop (ok)• meaning of path marking rate for inelastic flows (?

Virtual Queue (VQ) & Variants• hybrid feedback, time-scale dependent• ineligible packets → bursty dropping (?)• inelastic flows → binary path marking rate

Load Based Marking (LBM)• rate-based feedback• ineligible packets → continuous random dropping• path marking rate is product of local load values• use relative load of link or node (!)

1

avg. queuethmin thmax Qmax

length

mark/dropprobability 1

forwardingvirtual rate

rate

mark/dropprobability 1

RED VQ

Page 22: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

al Nodes

t ECT

queueshold

ndom drop

none

ansport.fm 22/27 May 26, 2004

Marking vs. Dropping

Dropping of Ineligible Packets?Influence of Ineligible Packets on Local Load?⇒ Differentiated Queue Management (DQM) at Intern

ECT set

ECT clear

ECT rateestimator

packetmarking

total rateestimator

high queuethreshold

always

early discard, if no

random

low thre

packet marking adaptive early ra

Page 23: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

rol

250 300

ansport.fm 23/27 May 26, 2004

Experimental Results - Admission Cont

• admission control of VoIP flows• VQ marking & simple admission control threshold

0

2

4

6

8

10

0 50 100 150 200

Lo

ad i

n M

bit

/s

Experiment Time in Seconds

acceptedtraffic

Page 24: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

ation

nd trafficQM discrimination

250 300

ansport.fm 24/27 May 26, 2004

Experimental Results - Traffic Discrimin

• mix of VoIP flows and unresponsive UDP backgrou• VQ marking, simple admission control threshold, D

0

2

4

6

8

10

12

0 50 100 150 200

Lo

ad in

Mb

it/s

Experiment Time in Seconds

accepted

background

total traffic

goodput

traffic

Page 25: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

and resources information

rate x

ork providerr a fixed surcharge

ansport.fm 25/27 May 26, 2004

Dynamic Pricing

Packet Marking, Flow Control, and Dynamic Pricing• economic market models• market efficiency: stability and high utilization

Packet Marking and Admission Control Gateways• traditional business model possible: price per time• dynamic pricing: calculate dynamic price from load

• price formula possible for relative marking

• insurance model• gateways operated by different institution than netw• gateways accept the economic risk of rising load fo• over-subscription → bad luck for everyone

Deployment• use gateways now, end system control later?• chain of trust to solve security problems?

a1 x–------------ b+

Page 26: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

it"

ansport.fm 26/27 May 26, 2004

Admission Control - Challenges

Service Integration• support elastic and inelastic flows• different time-scales• flow control at edge vs. flow control at end system

Dynamic System Adaptation• reactive system → safety margins needed

• automatic parameter adaptation?• controlled overbooking → currently "use it or loose

• only actual traffic generates load signals

Delay Guarantees?• precise: delay differentiation

Page 27: CS 856 Internet Transport Performance Congestion Control: TCP, …mkarsten/cs856-S04/4-transport.pdf · 2006. 7. 11. · 4-transport.fm1/27 May 26, 2004 Martin Karsten - CS 856, Spring

4-tr Martin Karsten - CS 856, Spring 2004

es

ansport.fm 27/27 May 26, 2004

Discussion

End-System Rate Control and Packet Marking Charg• packet marking algorithms

Packet Marking and Gateway Admission Control• packet marking algorithms• "use it or loose it" problem• safety margins