0% found this document useful (0 votes)
27 views11 pages

13 Congestion Avoidance

The document discusses various techniques for congestion control in computer networks, including TCP congestion avoidance and explicit congestion notification (ECN). It explains that TCP causes congestion as it probes for available bandwidth and reacts after packet loss occurs. Better approaches aim to detect incipient congestion before packet loss using methods like RED queue management and ECN signaling. The document also covers challenges in accurately estimating round-trip times to avoid congestion collapse from incorrect retransmission timer settings. Overall, it analyzes how congestion control algorithms evolved to prevent network overload and ensure fair resource sharing.

Uploaded by

artwitht02
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views11 pages

13 Congestion Avoidance

The document discusses various techniques for congestion control in computer networks, including TCP congestion avoidance and explicit congestion notification (ECN). It explains that TCP causes congestion as it probes for available bandwidth and reacts after packet loss occurs. Better approaches aim to detect incipient congestion before packet loss using methods like RED queue management and ECN signaling. The document also covers challenges in accurately estimating round-trip times to avoid congestion collapse from incorrect retransmission timer settings. Overall, it analyzes how congestion control algorithms evolved to prevent network overload and ensure fair resource sharing.

Uploaded by

artwitht02
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

Recap

½ congestion window
½ congestion window

More TCP

• Congestion avoidance
Application
• TCP timers Presentation
Session
• TCP lifeline Transport
Network
Data Link
Physical

1
Congestion Control vs Avoidance

• TCP causes congestion as it probes for the available


bandwidth and then recovers from it after the fact
– Leads to loss, delay and bandwidth fluctuations
– We want congestion avoidance, not congestion control

• Congestion avoidance mechanisms


– Aim to detect incipient congestion, before loss. So monitor
queues to see that they absorb bursts, but not build steadily

TCP protocol uses some kind of


avoidance

Congestion avoidance phase


ssthresh

• Avoid congestion by increasing linearly


• Can we do more?

2
Router Model: “FCFS with Tail Drop”

Arriving Next free Next to


packet buffer transmit

Free buffers Queued packets

Arriving Next to
packet transmit

Drop

The case against drop-tail queue management

FCFS
P6 P5 P4 P3 P2 P1 Scheduler

ͻ >ĂƌŐĞƋƵĞƵĞƐŝŶƌŽƵƚĞƌƐŝƐ䇾ĂďĂĚƚŚŝŶŐ䇿
ʹ ĞůĂLJ͗ĞŶĚͲƚŽͲĞŶĚůĂƚĞŶĐLJĚŽŵŝŶĂƚĞĚďLJůĞŶŐƚŚŽĨ
ƋƵĞƵĞƐĂƚƐǁŝƚĐŚĞƐŝŶŶĞƚǁŽƌŬ
ͻ ůůŽǁŝŶŐƋƵĞƵĞƐƚŽŽǀĞƌĨůŽǁŝƐ䇾ĂďĂĚƚŚŝŶŐ䇿
ʹ &ĂŝƌŶĞƐƐ͗ĐŽŶŶĞĐƚŝŽŶƐƚƌĂŶƐŵŝƚƚŝŶŐĂƚŚŝŐŚƌĂƚĞƐĐĂŶ
ƐƚĂƌǀĞĐŽŶŶĞĐƚŝŽŶƐƚƌĂŶƐŵŝƚƚŝŶŐĂƚůŽǁƌĂƚĞƐ

3
Random early packet drop (RED)

FCFS
P6 P5 P4 P3 P2 P1 Scheduler

tŚĞŶƋƵĞƵĞůĞŶŐƚŚĞdžĐĞĞĚƐƚŚƌĞƐŚŽůĚ͕ĚƌŽƉƉĂĐŬĞƚƐ
ǁŝƚŚƋƵĞƵĞůĞŶŐƚŚĚĞƉĞŶĚĞŶƚƉƌŽďĂďŝůŝƚLJ
ʹ ƉƌŽďĂďŝůŝƐƚŝĐƉĂĐŬĞƚĚƌŽƉ͗ĨůŽǁƐƐĞĞƐĂŵĞůŽƐƐƌĂƚĞ
ʹ ƉƌŽďůĞŵ͗ďƵƌƐƚLJƚƌĂĨĨŝĐ;ďƵƌƐƚĂƌƌŝǀĞƐǁŚĞŶƋƵĞƵĞŝƐ
ŶĞĂƌƚŚƌĞƐŚŽůĚͿĐĂŶďĞŽǀĞƌƉĞŶĂůŝnjĞĚ

Random early detection (RED) packet drop

Queue Drop
length probability
Max
queue length
Forced drop
Max
threshold Probabilistic
early drop
Min
threshold No drop

Time
ͻ hƐĞĞdžƉŽŶĞŶƚŝĂůĂǀĞƌĂŐĞ ŽĨƋƵĞƵĞůĞŶŐƚŚƚŽĚĞƚĞƌŵŝŶĞ
ǁŚĞŶƚŽĚƌŽƉ
ʹ ĂǀŽŝĚŽǀĞƌůLJƉĞŶĂůŝnjŝŶŐƐŚŽƌƚͲƚĞƌŵďƵƌƐƚƐ
ʹ ƌĞĂĐƚƚŽůŽŶŐĞƌƚĞƌŵƚƌĞŶĚƐ

4
RED summary: why random drop?

ͻ WƌŽǀŝĚĞŐĞŶƚůĞƚƌĂŶƐŝƚŝŽŶĨƌŽŵŶŽͲĚƌŽƉƚŽĂůůͲĚƌŽƉ
ʹ WƌŽǀŝĚĞ䇾ŐĞŶƚůĞ䇿 ĞĂƌůLJǁĂƌŶŝŶŐ
ʹ ǀŽŝĚƐLJŶĐŚƌŽŶŝnjĞĚůŽƐƐďƵƌƐƚƐĂŵŽŶŐƐŽƵƌĐĞƐ
ͻ WƌŽǀŝĚĞƐĂŵĞůŽƐƐƌĂƚĞƚŽĂůůƐĞƐƐŝŽŶƐ͗
ʹ tŝƚŚƚĂŝůͲĚƌŽƉ͕ůŽǁͲƐĞŶĚŝŶŐͲƌĂƚĞƐĞƐƐŝŽŶƐĐĂŶďĞ
ĐŽŵƉůĞƚĞůLJƐƚĂƌǀĞĚ

Explicit congestion notification

ͻ ĂŶǁĞĂǀŽŝĚĐŽŶŐĞƐƚŝŽŶǁŝƚŚŽƵƚůŽƐƐ͍

ͻ ĂŶƚŚĞƌŽƵƚĞƌƐƐŝŐŶĂůƚŚĞŚŽƐƚƐ;ƚŚŝƐŝƐĂďŝƚŽĨĨĨƌŽŵ
ƚŚĞĞŶĚͲƚŽͲĞŶĚĂƌŐƵŵĞŶƚͿ
ʹ ŽŶŽƚǁĂŶƚƚŽƐĞŶĚĂĚĚŝƚŝŽŶĂůƉĂĐŬĞƚƐ͘

Lretrans.10

5
Explicit Congestion Notification (ECN)

ͻ EƐŝŐŶĂůƐĐŽŶŐĞƐƚŝŽŶǁŝƚŚĂďŝƚŝŶƚŚĞ/WŚĞĂĚĞƌ
ͻ ZĞĐĞŝǀĞƌƌĞƚƵƌŶƐŝŶĚŝĐĂƚŝŽŶƚŽƚŚĞƐĞŶĚĞƌ͕ǁŚŽƐůŽǁƐ
ʹ EĞĞĚƚŽƐŝŐŶĂůƚŚŝƐƌĞůŝĂďůLJŽƌǁĞƌŝƐŬŝŶƐƚĂďŝůŝƚLJ
ͻ EĞƚǁŽƌŬͲĂƐƐŝƐƚĞĚĐŽŶŐĞƐƚŝŽŶĐŽŶƚƌŽů

Deciding When to Retransmit

• How do you know when a packet has been lost?


– Ultimately sender uses timers to decide when to retransmit

• But how long should the timer be?


– Too long: inefficient (large delays, poor use of bandwidth)
– Too short: may retransmit unnecessarily (causing extra traffic)
– A good retransmission timer is important for good performance

• Right timer is based on the round trip time (RTT)


– Which varies greatly in the wide area. Why?

6
ZddǀĂƌŝĂŶĐĞŝŶ>EƐǀĞƌƐƵƐ/ŶƚĞƌŶĞƚ

LAN case – small, Internet case


regular RTT – large,
varied RTT

Congestion Collapse due to incorrect


RTT estimates

ͻ /ŶƚŚĞůŝŵŝƚ͕ĞĂƌůLJƌĞƚƌĂŶƐŵŝƐƐŝŽŶƐůĞĂĚƚŽĐŽŶŐĞƐƚŝŽŶ
ĐŽůůĂƉƐĞ
ʹ ^ĞŶĚŝŶŐŵŽƌĞƉĂĐŬĞƚƐŝŶƚŽƚŚĞŶĞƚǁŽƌŬǁŚĞŶŝƚŝƐ
ŽǀĞƌůŽĂĚĞĚĞdžĂĐĞƌďĂƚĞƐƚŚĞƉƌŽďůĞŵŽĨĐŽŶŐĞƐƚŝŽŶ
ʹ EĞƚǁŽƌŬƐƚĂLJƐďƵƐLJďƵƚǀĞƌLJůŝƚƚůĞƵƐĞĨƵůǁŽƌŬŝƐďĞŝŶŐ
ĚŽŶĞ

ͻ dŚŝƐŚĂƉƉĞŶĞĚŝŶƌĞĂůůŝĨĞΕϭϵϴϳ
ʹ >ĞĚƚŽsĂŶ:ĂĐŽďƐŽŶ䇻ƐdWĂůŐŽƌŝƚŚŵƐ͕ǁŚŝĐŚĨŽƌŵƚŚĞ
ďĂƐŝƐŽĨĐŽŶŐĞƐƚŝŽŶĐŽŶƚƌŽůŝŶƚŚĞ/ŶƚĞƌŶĞƚƚŽĚĂLJ
΀^ĞĞ䇾ŽŶŐĞƐƚŝŽŶǀŽŝĚĂŶĐĞĂŶĚŽŶƚƌŽů䇿͕^/'KDD䇻ϴϴ΁

7
Estimating RTTs
ͻ /ĚĞĂ͗ĚĂƉƚƌĞƚƌĂŶƐŵŝƐƐŝŽŶƚŝŵĞƌďĂƐĞĚŽŶƌĞĐĞŶƚƉĂƐƚ
ŵĞĂƐƵƌĞŵĞŶƚƐ

ͻ ^ŝŵƉůĞĂůŐŽƌŝƚŚŵ͗
ʹ &ŽƌĞĂĐŚƉĂĐŬĞƚ͕ŶŽƚĞƚŝŵĞƐĞŶƚĂŶĚƚŝŵĞĂĐŬƌĞĐĞŝǀĞĚ
ʹ ŽŵƉƵƚĞZddƐĂŵƉůĞƐĂŶĚĂǀĞƌĂŐĞƌĞĐĞŶƚƐĂŵƉůĞƐĨŽƌ
ƚŝŵĞŽƵƚ
ʹ ƐƚŝŵĂƚĞĚZddсα α džƐƚŝŵĂƚĞĚZddн;ϭͲ αͿdž^ĂŵƉůĞZdd
ʹ dŚŝƐŝƐĂŶĞdžƉŽŶĞŶƚŝĂůůLJͲǁĞŝŐŚƚĞĚŵŽǀŝŶŐĂǀĞƌĂŐĞ;ůŽǁ
α сϬ͘ϴ
ƉĂƐƐĨŝůƚĞƌͿƚŚĂƚƐŵŽŽƚŚĞƐƚŚĞƐĂŵƉůĞƐ͘dLJƉŝĐĂůůLJ͕α
ƚŽϬ͘ϵ͘
ʹ ^ĞƚƚŝŵĞŽƵƚƚŽƐŵĂůůŵƵůƚŝƉůĞ;ϮͿŽĨƚŚĞĞƐƚŝŵĂƚĞ

TCP round trip time, timeout

ƐƚŝŵĂƚĞĚZddс;ϭͲ αͿΎƐƚŝŵĂƚĞĚZddнαΎ^ĂŵƉůĞZdd

RTT: gaia.cs.umass.edu to fantasia.eurecom.fr

350

300
)s
dn
s)d o
no c
250

ecs e
lii s i
( l
TT i
m
Rm
200
(
TT
150
R
sampleRTT
EstimatedRTT
100
1 8 15 22 29 36 43 50 57 64 71 78 85 92 99 106
time (seconnds)

time (seconds)
SampleRTT Estimated RTT Transport Layer
Kurose and Ross

8
Karn/Partridge Algorithm

• Problem: RTT for retransmitted packets ambiguous


Sender Receiver Sender Receiver
SampleRTT

• SampleRTT
Solution: Don䇻t measure RTT for retransmitted packets and do not
relax backed of timeout until valid RTT measurements

Jacobson/Karels Algorithm

• Problem:
– Variance in RTTs gets large as network gets loaded
– So an average RTT isn䇻t a good predictor when we need it most

• Solution: Track variance too.

– Difference = SampleRTT – EstimatedRTT


– EstimatedRTT = EstimatedRTT + (δ δ x Difference)
– Deviation = Deviation + δ(|Difference|- Deviation)

– Timeout = µ x EstimatedRTT + φ x Deviation


– In practice, δ = 1/8, µ = 1 and φ = 4

Lretrans.18

9
So far we saw Loss-based TCP

ͻ ǀŽůƵƚŝŽŶŽĨůŽƐƐͲďĂƐĞĚdW
ʹ dĂŚŽĞ
ʹ ZĞŶŽ
ʹ ^ĞůĞĐƚŝǀĞĐŬŶŽǁůĞĚŐŵĞŶƚ;ĞdžƉůĂŝŶĞĚŝŶŶĞdžƚ
ƐůŝĚĞͿ

ͻ Y͗ǁŚĂƚŝĨůŽƐƐŶŽƚĚƵĞƚŽĐŽŶŐĞƐƚŝŽŶ͍

Selective ACKS
Extend ACKs with a vector to describe received
segments and hence losses
– Allows for more accurate retransmissions / recovery

No way for us to know


that 2 and 5 were lost
with only ACKs
CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

10
ĞůĂLJͲďĂƐĞĚdWsĞŐĂƐ

ͻ hƐĞƐĚĞůĂLJĂƐĂƐŝŐŶĂůŽĨĐŽŶŐĞƐƚŝŽŶ
ʹ /ĚĞĂ͗ƚƌLJƚŽŬĞĞƉĂƐŵĂůůĐŽŶƐƚĂŶƚŶƵŵďĞƌŽĨ
ƉĂĐŬĞƚƐĂƚďŽƚƚůĞŶĞĐŬƋƵĞƵĞ
ʹ džƉĞĐƚĞĚсtͬĂƐĞZdd
ʹ ĐƚƵĂůсtͬƵƌZdd
ʹ ŝĨĨсdžƉĞĐƚĞĚͲ ĐƚƵĂů
ʹ dƌLJƚŽŬĞĞƉŝĨĨƐŵĂůů
ͻ ĞůĂLJͲďĂƐĞĚdWŶŽƚǁŝĚĞůLJƵƐĞĚƚŽĚĂLJ

Wireless Issues
Wireless links lose packets due to transmission errors
– Do not want to confuse this loss with congestion
– Or connection will run slowly over wireless links!
One Strategy:
– Wireless links use ARQ, which masks errors

CN5E by Tanenbaum & Wetherall, © Pearson Education-Prentice Hall and D. Wetherall, 2011

11

You might also like