340 likes | 485 Views
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.
E N D
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 • Motivation • Essentials TCP Features • Investigate TCP Mathematical Models • Periodic Model • Detailed Packet Loss Model
Why Model TCP Mathematically? Options: • Experimental Observation • Computer Simulation • Mathematical Modeling
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
Essentials of TCP Modeling
TCP Essentials • Every TCP model must capture • Window Dynamics (internal and deterministic) • Packet Loss Process (external and uncertain) • Mainly Reno flavours are modelled • Triple duplicate ACK • window = window / 2 • TCP state = Congestion Avoidance • Packet Loss • window = 1 • TCP state = slow start
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?
TCP Window Dynamics • Slow Start: Exponential Increase • Congestion Avoidance: Linear Increase • Exponential Back off: Multiplicative Decrease
Packet Loss Process • Packet loss triggers window decrease • Packet loss is uncertain • This uncertainty is typically modeled as a stochastic process • E.g. probability p of losing a packet
Gallery of TCP Models • Periodic Model • Detailed Packet Loss Model • Stochastic model • Control system model • Network system model
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
Steady State / Periodic Model loss occurs • 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? W W/2 period time (RTT)
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)
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).
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?
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
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
Triple Duplicate ACK (TDA) Goal: E[X(P)] = E[Y] / E[A] E[Y] is the expected number of packets per TDA period E[A] is the expected TDA period duration
ith TDA Period Approach Find expressions for Yi and Ai (ith TDA period). Wi - Window size of ith TDA period Ri - 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.
TDAs Question If a TCP connection has an average RTT of 200ms, and packet loss probability 0.05, what is the average throughput?
TDAs Answer RTT=0.2, P=0.05. Using the TDA expression X(0.05) = 26.69 packets/second
Timeouts Approach Find an expressions for E[X(P)] = E[M] / E[S]. Si = ZiTD + ZiTO (ith period duration) ZiTD - TDAs duration, losses recovered by TDA ZiTO - Timeouts duration, loss results in timeout
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?
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
Comparison Against ns-2 trans-Atlantic TCP Connection Very Low Low Moderate High
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.
Results • Complete Detailed Packet Loss Model Provides a good approximation for any probability loss or enforced receiver window size limit.