34
Prentice Hall High Performance TCP/IP Networking, Hassan-Jain TCP Modelling

TCP Modelling

Embed Size (px)

DESCRIPTION

TCP Modelling. Objectives. Appreciate mathematical modeling of TCP for performance optimization of TCP/IP networks Understand the fundamental relationship between packet loss probability and TCP performance Investigate the Period Model and the Detailed Packet Loss Models. Contents. - PowerPoint PPT Presentation

Citation preview

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

TCP Modelling

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Objectives

Appreciate mathematical modeling of TCP for performance optimization of TCP/IP networks

Understand the fundamental relationship between packet loss probability and TCP performance

Investigate the Period Model and the Detailed Packet Loss Models

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Contents

Motivation Essentials TCP Features Investigate TCP Mathematical Models

Periodic Model Detailed Packet Loss Model

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Motivation

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Why Model TCP Mathematically?

Options: Experimental Observation Computer Simulation Mathematical Modeling

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Motivation for TCP Modeling

The sheer scale of the TCP operating environment Models in general are required to gain a deeper understanding of

TCP dynamics Uncertainties exist in the TCP operating environment

Uncertainties can be modeled as stochastic processes to drive TCP responses

To quantify metrics that define system performance To drive the design of TCP-friendly algorithms for

multimedia applications TCP is the most widely used transport layer protocol

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Essentials of

TCP Modeling

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

TCP Essentials

Every TCP model must captureWindow Dynamics (internal and deterministic)Packet Loss Process (external and uncertain)

Mainly Reno flavours are modelled Triple duplicate ACK

window = window / 2TCP state = Congestion Avoidance

Packet Losswindow = 1TCP state = slow start

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Standard Modeling Assumption

X(t) = W(t)/RTT

where, X(t) is TCP Throughput,

W(t) is Window Size,

RTT is Round Trip Time.

What does X(t) = W(t)/RTT implicity assume?

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

TCP Window Dynamics

Slow Start: Exponential Increase Congestion Avoidance: Linear Increase Exponential Back off: Multiplicative Decrease

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Packet Loss Process

Packet loss triggers window decrease Packet loss is uncertain This uncertainty is typically modeled as a

stochastic processE.g. probability p of losing a packet

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

TCP Models

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Gallery of TCP Models

Periodic Model Detailed Packet Loss Model Stochastic model Control system model Network system model

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Periodic Model

Goal

To find an expression for the average TCP Throughput as a function of packet loss probability.

with TCP in Steady State Periodic Window Size Constant Packet Loss Probability

X(P) = number of packets per period / period duration

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Steady State / Periodic Model

time (RTT)

W/2

W

loss occurs

period

Simplest possible model W is the maximum

supportable window size (then loss occurs)

TCP window starts at w/2 grows to W, then halves, repeat forever …

W(t) packets transmitted each RTT

W(t+1) = W(t) + 1 each round until a loss occurs

Why not model slow start?

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

T

Packets Transmitted Per Period

To find W as a function of P.

# packets sent per “period” = base * average height = (T / RTT) * (W/2 + W) / 2

= W/2 * (W/2 + W) / 2 = 1/P

W/2 * (W/2 + W) / 2 = 1/P => W = root(8/3P)

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Inverse Square Root P Law X(P)

X(P) is the average sending rate of the TCP source

X(P) = (number of packets sent per period ) / (period duration)

= (1/P) / (RTT * W/2) , since W – W/2 = W/2

= (1/RTT) * (3/2P)^(1/2)

where P is the packet loss probability, W = root(8/3P).

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Inverse Square P Law Question

If a TCP connection has an average RTT of 200ms, and packet loss probability 0.05, what is the average throughput?

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Inverse Square P Law Answer

RTT=0.2, P=0.05.

Using the Inverse Square P Law

X(P) = (1/P) / root(3/2P)

X(0.05) = (1/0.2)*(root(3/2x0.05))

= 27.4 packets/second

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Detailed Packet Loss Model

Goal

To find an expression for the average TCP Throughput as a function of packet loss probability.

with random packet loss events and considering

triple duplicate ACKs time outs receiver window limits

E[X(P)] = number of packets per period / period duration

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Triple Duplicate ACK (TDA)Goal: E[X(P)] = E[Y] / E[A]

E[Y] is the expected number of packets per TDA periodE[A] is the expected TDA period duration

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

ith TDA PeriodApproach

Find expressions for Yi and Ai (ith TDA period).

Wi - Window size of ith TDA periodRi - Number of roundsΒi - Number of packets in final roundαi - Number of the packet lost in the ith period

Yi - number of packets transmitted Ai - period duration

Find E[Y] and E[A] as a function of P.

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

TDA’s

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

TDAs Question

If a TCP connection has an average RTT of 200ms, and packet loss probability 0.05, what is the average throughput?

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

TDAs Answer

RTT=0.2, P=0.05.

Using the TDA expression

X(0.05) = 26.69 packets/second

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Timeouts

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

TimeoutsApproach

Find an expressions for E[X(P)] = E[M] / E[S].

Si = ZiTD + Zi

TO (ith period duration)

ZiTD - TDAs duration, losses recovered by TDA

ZiTO - Timeouts duration, loss results in timeout

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Timeouts

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Limits on the Receiver Window Size

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Complete Model Question

If a TCP connection has an average RTT of 200ms, and packet loss probability 0.05, if the receiver limits the its window size to Wm = 20 packets and the TCP sender has a timeouts value of To = 500ms, what is the average throughput?

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Complete Model Answer

RTT=0.2, P=0.05, Wm=20 packets, To=500ms.

Using the TDA expression

X(0.05) = 24.73 packets/second

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Comparison Against ns-2 trans-Atlantic TCP Connection

Very Low

Low

High

Moderate

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Results

Against a simulated trans-Atlantic TCP simulation connection

Inverse Square P Law

If moderately low packet loss probability, then good estimates are provided

If very low receiver window limits send rate and overestimates are provided

Otherwise, overestimates the send rate, due to a lack of accounting for timeouts

Suitable for small packet loss probability and no receiver window limits.

Prentice HallHigh Performance TCP/IP Networking, Hassan-Jain

Results

Complete Detailed Packet Loss Model

Provides a good approximation for any probability loss or enforced receiver window size limit.