The Impact of Delay Variations on TCP Performance

27
INSTITUT FÜR KOMMUNIKATIONSNETZE UND RECHNERSYSTEME Prof. Dr.-Ing. Dr. h. c. mult. P. J. Kühn Universität Stuttgart The Impact of Delay Variations on TCP Performance Michael Scharf Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart [email protected] ITG FG 5.2.1 Workshop, Hamburg 20. Feb. 2004

Transcript of The Impact of Delay Variations on TCP Performance

Page 1: The Impact of Delay Variations on TCP Performance

INSTITUT FÜRKOMMUNIKATIONSNETZEUND RECHNERSYSTEME

Prof. Dr.-Ing. Dr. h. c. mult. P. J. Kühn

Universität Stuttgart

The Impact of Delay Variations on TCP Performance

Michael ScharfInstitut für Kommunikationsnetze und Rechnersysteme

Universität [email protected]

ITG FG 5.2.1 Workshop, Hamburg20. Feb. 2004

Page 2: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

❐ Characteristics of mobile networks

❐ Impact of delay variations on TCP

❐ Modeling the RTT estimation in TCP

❐ Model validation

❐ Optimization approaches

❐ Conclusions and future work

Outline

Page 3: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Network architecture (simplified)

❐ Few packet losses due to highly persistent link layer

❐ Rather low bandwidth, but high latency

❐ Variable delays and significant jitter

❍ Retransmission of radio blocks (ARQ mechanism)

❍ Cell handovers and link outages

❍ Radio resource preemption by voice traffic

➥ Impact of delay variations on TCP performance?

Characteristics of mobile networks

IP

TCP

IP

PHY PHY

Layer 2

IP

TCPEnd−to−end connection

Mobile terminal

Base station

Fixed terminal

ARQ

TCP... IP... RLC... MAC... PHY... ARQ... FEC...

Transmission Control ProtocoInternet Protocol Radio Link Control Medium Access Control Physical Layer Automatic Repeat Request Forward Error Correction

Radio link

RLC MAC

Layer 2

Layer 1 Layer 1...

FEC

RLC MAC

Page 4: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Transmission Control Protocol (TCP)❐ Window-based, reliable transport protocol

❍ Receiver advertised window

❍ Congestion window

❐ Error recovery

❍ Fast retransmit/Fast recovery mechanism

❍ Retransmission timeouts

❐ Different variants: TCP Reno, NewReno, SACK, ...

Impact of delay variations on TCP (1)

ACK

3 dupl. ACK

exceeded

Con

gest

ion

win

dow

start

avoidanceCongestion

SlowFast retransmit/

Fast recovery

Slow start threshold

Fast retransmit/Fast recovery

Slow start

Congestion

Slow start threshold

Time

Timeout

Multiple packet lossPacket loss

Timeoutavoidance

Page 5: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Potential effects❐ Spurious TCP timeouts = timeouts even though no packets are lost

❍ Go-back-N mechanism unnecessarily retransmits segments

❍ Needless reduction of congestion window

➥ TCP may waste bandwidth or underutilize the available resources

Impact of delay variations on TCP (2)

Page 6: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Potential effects❐ Spurious TCP timeouts = timeouts even though no packets are lost

❍ Go-back-N mechanism unnecessarily retransmits segments

❍ Needless reduction of congestion window

➥ TCP may waste bandwidth or underutilize the available resources

❐ Mis-estimation of available network capacity by TCP

❍ Buffer overflows if over-estimated

❍ Poor throughput if under-estimated

Impact of delay variations on TCP (2)

Data Data

AC

K

µ1

µACK

Data Data

AC

K

DataData µ2<µ1

µACK

AC

K

AC

K

TCP sender TCP recv .

High service rate

Lower service rate

Page 7: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Potential effects❐ Spurious TCP timeouts = timeouts even though no packets are lost

❍ Go-back-N mechanism unnecessarily retransmits segments

❍ Needless reduction of congestion window

➥ TCP may waste bandwidth or underutilize the available resources

❐ Mis-estimation of available network capacity by TCP

❍ Buffer overflows if over-estimated

❍ Poor throughput if under-estimated

❐ Packet reordering

❍ May trigger spurious fast retransmits

❍ Usually prevented by reliable link layer

Impact of delay variations on TCP (2)

Data Data

AC

K

µ1

µACK

Data Data

AC

K

DataData µ2<µ1

µACK

AC

K

AC

K

TCP sender TCP recv .

High service rate

Lower service rate

Page 8: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Spurious timeouts - An example

Impact of delay variations on TCP (3)

55 60 65 70 75

Time [s]

3e+05

3.5e+05

4e+05

4.5e+05

Seq

uenc

e no

.

SegmentsACKsFast retransmitTimeout

TCP Reno

Needlessretransmissions

Timeout after 4 sec

Fast retransmit

Segments

ACKs

5 sec off period

(spurious)

Page 9: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

RTT sampling by TCP

Modeling the RTT estimation in TCP (1)

Default method:

❐ One measurement per RTT

❐ Low sampling rate

❐ No measurement on retransmitted segments (Karn’s algorithm)

t1

RTT= now−t 1

sender

recv.

RTT= now−t 2t2 t3

Page 10: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

RTT sampling by TCP

Modeling the RTT estimation in TCP (1)

Timestamps (RFC 1323):

❐ Additional 12 byte TCP header option

❐ Samples with every new ACK

❐ Measurements on retransmitted seg-ments

Default method:

❐ One measurement per RTT

❐ Low sampling rate

❐ No measurement on retransmitted segments (Karn’s algorithm)

t1

RTT= now−t 1

sender

recv.

RTT= now−t 2t2 t3

t1

response:

RTT= now−t 1

RTT= now−t 2

RTT= now−t 5

t1 t2 t5

recv.

sendert1

t3 t4 t6

RTT= now−t 4

RTT= now−t 3

Page 11: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

RTO calculation❐ Tradeoff necessary

❍ Frequent spurious timeouts if value too small (aggressive timer)

❍ Long idle times if value too large (conservative timer)

❐ Algorithm according to RFC 2988:

RTTVAR: v n( ) 34--- v n 1–( ) 1

4--- s n 1–( ) x n( )–

SRTT: s n( )

⋅+⋅

78--- s n 1–( ) 1

8--- x n( )

RTO: R n( )

⋅+⋅

max s n( ) 4 v n( ) m,⋅+( )

=

=

=

❐ Recommendation for minimum: m=1 sec

❐ Coarse timer granularity in many protocol stacks

Modeling the RTT estimation in TCP (2)

Page 12: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Assumptions❐ Single bottleneck: Radio link

❐ Main parameters

❍ Service rate µ❍ Latency τ❍ Buffer size B µ τ⋅>

❐ TCP bulk data transfer

❍ Single TCP connection over radio link

❍ Greedy source

❐ Not limited by receiver advertised window

➥ Typical saw-tooth behavior with cycles

Modeling the RTT estimation in TCP (3)

latency τ

TC

P s

ende

r

buffer size Bservicerate µ

RecoveryFast

actual valuex

Congestion Avoidance

max

max

approximation

Time t

RT

T x

one cycle

0

0.5 x

Page 13: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Modeling approach

❐ RTO calculation is a non-linear filter

❐ Approximation: Linear input function x n( )❐ Number of samples per cycle:

N f µ τ B sampling method, , ,( )=

➥ RTO duration R n( ) can be determined analytically

Modeling the RTT estimation in TCP (4)

Non−linear RTO

calculation

RTT x(n)

0 N−1

xmin

xmax

R(n

)

nn

x(n)

nn

RTO R(n)

one cycle 0 N−1one cycle

Rmax

Rmin

∆min

x(n)

Page 14: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

RTT sampling rate❐ Path capacity: C B 1 µ τ⋅+ +=

❐ Delayed Acknowledgements mechanism: b segments per ACK

❐ Samples per cycle for default measurements

N b12--- C 1+( ) 2+=

❐ Samples per cycle for timestamps

N38--- C 1+( )2 C

b---- 1+ +=

Modeling the RTT estimation in TCP (5)

Page 15: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Numerical results

Modeling the RTT estimation in TCP (6)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

relative offset in cycle: n / (N - 1)

0.4

0.5

0.6

0.7

0.8

0.9

1

1.1

1.2

1.3

1.4

1.5

1.6

1.7

1.8

1.9R

TO

dur

atio

n R

(n)

norm

aliz

ed b

y x m

ax

x(n)

510

2030

4050

6080

100N

Page 16: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Numerical results

❐ RTO characteristics highly depends on sampling rate

❐ Algorithm more aggressive if timestamps are used ( N 10» )

➥ RFC 2988 and timestamps do not harmonize well

Modeling the RTT estimation in TCP (6)

10 100

Number of samples per cycle N

0

0.5

1

1.5

2

RT

O d

urat

ion

norm

aliz

ed b

y x m

ax Rmax

R

Rmin

∆min

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1

relative offset in cycle: n / (N - 1)

0.4

0.5

0.6

0.7

0.8

0.9

1

1.1

1.2

1.3

1.4

1.5

1.6

1.7

1.8

1.9R

TO

dur

atio

n R

(n)

norm

aliz

ed b

y x m

ax

x(n)

510

2030

4050

6080

100N

Page 17: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Simulation setup

❐ Various network configurations (GPRS, UMTS)

❐ Parametrization of RTT estimator

❍ With and w/o timestamps

❍ Granularity 10 ms or 200 ms

Model validation (1)

TC

P s

ende

r TC

P recv.

Basestation

Mobileterminal

10 ms

10 ms10 ms

10 ms

13.4 -384kbps

13.4 -64 kbps

3-24 kb

100 ms 100 ms

100 ms100 ms

Data

ACKs

Page 18: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Selected examples

➥ Model matches quite well to simulation results

Model validation (2)

60 70 80 90 100 110 120

Time t [s]

0

1000

2000

3000

4000

5000

[ms] Rsim(t)

xsim(t)

one cycleN = 8 rDL=53.6 kbps, rUL=13.4 kbps,

B=8, τext=20 ms, G=10 ms

Rmax (model)

Rmin (model)

R (model)

60 70 80 90 100 110 120

Time t [s]

0

1000

2000

3000

4000

5000

[ms]

Rsim(t)

xsim(t)

one cycleN = 66 rDL=53.6 kbps, rUL=13.4 kbps,

B=8, τext=20 ms, G=10 ms

Rmax (model)

Rmin (model)

R (model)

Without timestamps With timestamps

Page 19: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Different GPRS and UMTS scenarios

Model validation (3)

10 100

Number of samples per cycle N

0

0.5

1

1.5

2

2.5

RT

O d

urat

ion

norm

aliz

ed b

y x m

ax Rmax

R

Rmin

∆min

model

simulation

Fine timer granularity

Page 20: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Different GPRS and UMTS scenarios

➥ Discrepancies for coarse timer granularity

Model validation (3)

10 100

Number of samples per cycle N

0

0.5

1

1.5

2

2.5

RT

O d

urat

ion

norm

aliz

ed b

y x m

ax Rmax

R

Rmin

∆min

model

simulation

10 100

Number of samples per cycle N

0

0.5

1

1.5

2

2.5

RT

O d

urat

ion

norm

aliz

ed b

y x m

ax Rmax

R

Rmin

∆min

Fine timer granularity Coarse timer granularity

Page 21: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Performance degradation by spurious timeouts

➥ Spurious timeouts are triggered by off periods of duration T off Rmax>

Model validation (4)

0 1 2 3 4 5 6

Off period duration Toff [s]

0

50

100

150

200

250

300N

umbe

r of

RT

Os

Ton=30 s

Ton=60 s

Ton=120 s

Rmin Rmax∆min

(mean

duration)on period

Timeout probability

Toff Ton

Dat

a ra

te

Time

Page 22: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Performance degradation by spurious timeouts

➥ Spurious timeouts are triggered by off periods of duration T off Rmax>

➥ Impact only significant in case of frequent delay variations

Model validation (4)

0 1 2 3 4 5 6

Off period duration Toff [s]

0

50

100

150

200

250

300N

umbe

r of

RT

Os

Ton=30 s

Ton=60 s

Ton=120 s

Rmin Rmax∆min

(mean

duration)on period

0 1 2 3 4 5 6

Toff [s]

5

5.5

6

6.5

Goo

dput

λG [k

byte

/s]

SimulationModel

Ton=120 s

Ton=60 s

Ton=30 s

Rmin Rmax

Timeout probability Impact on goodput

Toff Ton

Dat

a ra

te

Time

Page 23: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Architectures

Optimization approaches

mobileterminal GGSN fixed

terminal

GPRS/UMTS GPRS/UMTS

TCP

IP

TCPTCP ?

IP ?IP ?

TCP ? TCP ? TCP

IP

layer 2

Modification ofTCP algorithms

Protocol helper /protocol booster

Split connection

IP

GPRS/UMTS

TCP

IP

GPRS/UMTS

IP

TCP TCP

IP

GPRS/UMTS

IP

TCP

IP

GPRS/UMTS

TCP TCP

protocol helper

layer 2

layer 2

− numerous approaches

− Spurious packet filter

− ACK Regulator

− ACK Buffering

− M−TCP

− Active queue management

− Eifel Algorithm

− F−RTO

− D−SACK

− Freeze TCP

example: WAP

Page 24: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Conclusions❐ Mobile networks are characterized by variable delays

❍ Spurious TCP timeouts degrade performance

❍ Sensitivity of TCP to delay variations depends on RTT estimator

❐ Model for RTT estimation of TCP

❍ RTO duration as a function of path parameters

❍ Significant impact of RTT sampling rate

❍ Timestamps and RFC 2988 do not harmonize well

❐ Quantification of risk of spurious timeouts

➥ Only delay variations of the order of seconds are critical

Future work❐ Simulations with more sophisticated UMTS radio link models

❐ Verification by measurements

Conclusions and future work

Page 25: The Impact of Delay Variations on TCP Performance

INSTITUT FÜRKOMMUNIKATIONSNETZEUND RECHNERSYSTEME

Prof. Dr.-Ing. Dr. h. c. mult. P. J. Kühn

Universität Stuttgart

The Impact of Delay Variations on TCP Performance

Michael ScharfInstitut für Kommunikationsnetze und Rechnersysteme

Universität [email protected]

ITG FG 5.2.1 Workshop, Hamburg20. Feb. 2004

Page 26: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

❐ Modification of TCP algorithms

❍ Sender-based• Eifel Algorithm (RFC 3522)

• F-RTO (P. Sarolahti et. al.)

• D-SACK (RFC 2883)

❍ Receiver-based• Freeze TCP (Goff et. al.)

❐ Protocol helper / protocol booster

❍ Filtering of segments• Spurious packet filter (Schüler et. al.)

• Active queue management (Sågfors et. al.)

❍ Manipulation of acknowledgments• ACK Regularor (Chan&Ramjee)

• ACK Buffering (Huang&Chang)

• M-TCP (Brown&Singh)

❐ numerous split connection approaches

Optimization approaches (cont.)

Page 27: The Impact of Delay Variations on TCP Performance

Institut für Kommunikationsnetze und Rechnersysteme Universität Stuttgart

Eifel algorithm❐ Eliminates retransmission ambi -

guity by timestamps

❐ Can detect spurious timeouts

❐ Improved reaction to spurious timeouts

❍ No go-back-N

❍ Congestion window restored

❍ RTT estimation reinitialized

Optimization approaches (cont.)

55 60 65 70 75

Time [s]

3e+05

3.5e+05

4e+05

4.5e+05

Seq

uenc

e no

.

SegmentsACKsFast RetransmitTimeout

Eifel Algorithmus

Timeout after 3 sec

5 sec off period

Segments

ACKs

original ACK and Eifel algorithm detects

resumes transmission