Presentation is loading. Please wait.

Presentation is loading. Please wait.

TCP Modeling CMPT 765/408: Computer Networks Simon Fraser University

Similar presentations


Presentation on theme: "TCP Modeling CMPT 765/408: Computer Networks Simon Fraser University"— Presentation transcript:

1 TCP Modeling CMPT 765/408: Computer Networks Simon Fraser University
Cheng-Hsin Hsu 2/17/2019

2 Agenda Motivation for mathematical TCP modeling
Essentials of TCP modeling Gallery of TCP models Periodic model Detailed packet loss model Stochastic model with general loss process Control system model Network system model Summary Essentials of TCP modeling includes (1) Windows dynamic: common assumption x(t) = W(t) / RTT, where x(t) is the transmission rate and W(t) is the windows size. (2) Packet-loss process, aggregates and summarize network condition along the TCP connection. 2/17/2019

3 Stochastic Model with General Loss Process
Previous models assume i.i.d. packet loss process with loss probability Not true in the Internet -- bursty errors and depends on the window size. Need a general loss process Incorporate a general loss process to the detailed packet-loss model Ignore inessential details to ease the burden of analysis In the internet, loss probability may be dependent on (1) previous loss probability (bursty errors), (2) windows size (a large window may cause more packet loss because of the router buffer overflows. Incorporate a general loss process to the detailed packet-loss model significantly increase the complexity of the system. We lose the tractability in the resulted system. How do we simplify the model? 2/17/2019

4 Dynamics of the TCP Transmission Rate
In this model, packet losses are modeled as events. Happens at time T1, T2, T3, and so on. S0, s1, s2, and so on are the inter-loss period X0, x1, x2, x3 are the instantaneous sending rate just before the packet loss happens So, x can be written as a function of previous x, s, the additive increase slope, and the multiplicative decrease ratio 2/17/2019

5 Simple Model of TCP Transmission Rate
Consider packet losses as events : instantaneous transmission rate : interval between events Write , where : multiplicative decrease factor (=1/2) : additive increase factor (= ) Assume has the correlation function: \nu (the multiplicative decrease factor) = 1/2 in a typical TCP implementation. \alpha (the additive increase factor) is given of \alpha = 1 / (RTT ^2). Because window size increases by 1/RTT for each ACK received, we divide 1/RTT by RTT again to compute the rate. 2/17/2019

6 Expected Sending Rate Altman et al. show the model has a stationary solution: given: (loss process) is ergodic stationary Stationary means all statistical properties (like mean and 2nd moment) are not varying with time. Ergodic means that statistical sampling can be performed at one instant across a group of identical processes or sampled over time on a single process with no change in the measured result. Finite intervals between loss events 2/17/2019

7 Expected Value of Expected sending rate: , where
is the loss event frequency Note that: X_n is the instantaneous sending rate when n-th loss event happens the insensitivity property: E[X_n^*] only depends on E[S], and does not depend on the inter loss time correlation nor on its higher-order moments. 2/17/2019

8 The Second Moment of Diagonal Linearity of expectation
We jump a little bit at the last step, see the paper for all the details They are only simple bookkeeping task. 2/17/2019

9 Average Sending Rate Using Palm probability, Altman et al. provide the average TCP sending rate as: Observation: average sending rate is a function of loss frequency, loss interval correlation functions, linear increase factor (thus RTT), and multiplicative decrease factor Loss frequency: \lambda = E[S_n], loss interval correlation functions R(k), and linear increase factor \alpha=1/(RTT^2), and multiplicative decrease factor \nu \lambda looks weird here as higher loss frequency should lead to lower sending rate. However, \lambda and R(k) are not independent, hence, when \lambda changes, R(k) functions would also change. Next, we want to draw the relation between the average sending rate and loss probability 2/17/2019

10 Average Loss Probability
Define : average loss probability : the number of transmitted packet : the number of loss events We have \lambda = 1/E[S_n] \bar{X} is the average sending rate. 2/17/2019

11 Rewrite the Average Sending Rate
Multiple these two equations: We have 1. Note that \lambda is a given constant. Normalize the R(k) function to get rid of \lambda. Note that \lambda is a constant as S_n is a stationary process. 2/17/2019

12 Rewrite the Average Sending Rate (cont.)
Define a normalized correlation function: We have \alpha = 1/(RTT)^2 Take its positive root for the final solution 2/17/2019

13 Final Average Sending Rate
We write Observation: average transmission rate is inversely related to The round-trip time The square root of the loss probability \alpha = 1/(RTT)^2 Follows the inverse square root p law 2/17/2019

14 Receiver Rate Limitation
Receiver places a packet receiving rate limit M, such that Same as limiting window size to This results in a nonlinear model, the explicit expressions for and are hard to derive (if all possible) 1. Extend the model to the case where receiver places a limit on window size. 2/17/2019

15 Receiver Rate Limitation (cont.)
Instead, upper and lower bounds are given if the sending rate is limited by receiver window E.g., the lower bound (of the sending rate) converges to: as 1. Extend the model to the case where receiver places a limit on window size. 2/17/2019

16 Stochastic model with general loss process
Consider a general loss process -- e.g., i.I.d. random losses, Markovian arrival loss process, etc. Losses are modeled as events Result follows the inverse square-root p law Summary Only need stationary Here, p is the loss probability 2/17/2019

17 Agenda Motivation for mathematical TCP modeling
Essentials of TCP modeling Gallery of TCP models Periodic model Detailed packet loss model Stochastic model with general loss process Control system model Network system model Summary Essentials of TCP modeling includes (1) Windows dynamic: common assumption x(t) = W(t) / RTT, where x(t) is the transmission rate and W(t) is the windows size. (2) Packet-loss process, aggregates and summarize network condition along the TCP connection. 2/17/2019

18 Control System Model Previous model assumes that losses occur because of insufficient resources Active Queue Management (AQM) techniques are proposed to cope with congestion problem A router intentionally drops packets when it detects congestions Random Early Detection (RED) is a key AQM proposal Some node may actively drop packets 2/17/2019 Some slides are based on the online notes at

19 Active Queue Management Algorithm -- RED
Packet drop function is a function of the average queue length at that router 1 Drop probability p Idea: drop early, so that TCP connections may back off. This implies TCP sending rate is affected by AQM algorithm. One nature question is how does AQM affects TCP traffic (sending rate)? pmax tmin tmax Average queue length x 2/17/2019 Modified from: Fluid-based Analysis of a Network of AQM Routers Supporting TCP Flows with an Application to RED -- ppt file at

20 Key Features of Control System Model
Study the interaction of TCP with AQM (e.g., RED) Model data traffic as fluid Model packet losses as Poisson process Derive a set of differential equations to describe the AQM policy and queue length We will only briefly discuss the interaction between TCP windows size and AQM algm. See the paper for queueing process analysis. 2/17/2019

21 Model a Single Congested Router
Consider a bottleneck router with transmission capacity C The packet drop function is denoted by p(x) The queueing length at time t is q(t) Let N TCP flows (labeled as Ni, where i=1,2,…,N) pass through this bottleneck router 2/17/2019

22 Model RTT Wi(t): window size of flow i at time t
Ri(t): RTT of flow i at time t RTT is modeled (assumed) as: is a fixed propagation delay models the queueing delay 2/17/2019

23 Model Sending Rate and Packet Losses
Bi(t): instantaneous throughput (sending rate) of flow i at time t Follows the fluid model Assume the number of packet losses is describe by a Poisson process {Ni(t)} with rate 1. Essentially the same as x(t) = W(t) / RTT -- different notation 2/17/2019

24 Model Window Size Window size is modeled by the Poisson Counter Driven Stochastic Differential equations AIMD behavior of TCP Take expectation, we have: This model makes sense because The first term corresponds to the additive increase part, which says the window size will increase by one every RTT The second term corresponds to the multiplicative decrease part, which halves the windows size at the instance of arrival of loss (dN_I(t)=1) Assume the windows size is independent to packet loss, which is not true .But it’s made to ease the burden of analysis. Want to cancel \lambda! 2/17/2019

25 Revisit Loss Rate Loss Rate as seen by Sender: l(t) = B(t-t)*p(t-t)
AQM Router B(t) p(t) Packet Drop/Mark Sender Receiver Note that we only consider one TCP flow here! Round Trip Delay (t) Loss Rate as seen by Sender: l(t) = B(t-t)*p(t-t) 2/17/2019 Copied from: Fluid-based Analysis of a Network of AQM Routers Supporting TCP Flows with an Application to RED -- ppt file at

26 Revisit Loss Rate (cont.)
Let x(t) be the total traffic load at the bottleneck router Recall: Write loss rate as: Now we consider multiple flows 2/17/2019

27 Final Model Finally, we have N differential equations
The equation system reveals the relation between window size and packet drop function p(.). 2/17/2019

28 Control System Model Capture the relationship between window size and packet drop function p(.) used by AQM Can be used to design better AQM The original paper also analyzes the interaction between queue length and window size The original paper generalizes the single bottleneck case to complete networks Summary See the paper for details 2/17/2019

29 Agenda Motivation for mathematical TCP modeling
Essentials of TCP modeling Gallery of TCP models Periodic model Detailed packet loss model Stochastic model with general loss process Control system model Network system model Summary Essentials of TCP modeling includes (1) Windows dynamic: common assumption x(t) = W(t) / RTT, where x(t) is the transmission rate and W(t) is the windows size. (2) Packet-loss process, aggregates and summarize network condition along the TCP connection. 2/17/2019

30 Network System Model Consider a collection of TCP flows for optimal network bandwidth allocation Optimization-based approach: formulate the bandwidth allocation problem as nonlinear programming problems The formulation is useful to various communication networks (not only to IP) Previous models often consider one TCP flow at a time. Here, we present a model that consider the whole network as a system. Different from previous models, this is a resource allocation (optimization) problem. However, the textbook only considers the TCP as the application of this optimization problem. We will concentrate on the TCP application. 2/17/2019

31 System Overview Assume the network contains l links, each of them has capacity Cl (in bps) Each TCP flow using a route (path) r, r can be written as a list of links; let set R be the collection of all routes Matrix A is defined as Air =1 if route r uses link l; Air =0, otherwise Previous models often consider one TCP flow at a time. Here, we present a model that consider the whole network as a system. A routing matrix A is defined as…. 2/17/2019

32 System Model Models the rates as differential equations: where
: route transmission rate : feedback information regarding the link condition Packet loss is a kind of feedback information 2/17/2019

33 System Model (cont.) : a function of RTT, known as the gain of the differential equation system : willingness-to-pay, describes how aggressive the rate control algorithm is Capture AIMD feature The aggressive is observed by the amount of rate increase (how fast we increase the sending rate) without any negative feedback (ask to reduce the rate) This algorithm thus captures the essential features of TCP (AIMD) These equations form the constraints in the optimization problem. 2/17/2019

34 Objective Functions Individual route: Network Obj. Function:
The network objective function is given by aggregating the individual utility functions then subtract the link cost. The integral basically computes the total traffic load on a link l. 2/17/2019

35 Optimal Solution Kelly et al. show there is a unique solution
that is the optimal set of transmission rates (maximize the obj. function) is solved by differentiating the obj. fcn. w.r.t. all , and set them to be zero. Observation: it is a distributed algorithm! 2/17/2019

36 Why Centralized Algorithm is Bad?
Not scalable Solving nonlinear programming problems is not computational trivial Consider the scale of the Internet, we have too many routes! Even we mange to build a super centralized point, the (injected) control messages would interfere with the actual data The original paper actually proposed a centralized version, the one we presented is a relaxation of that. Kelly show x* is unique and stable as follows. 2/17/2019

37 Uniqueness and Stability
Hence, U(x(t)) is strictly increasing with t unless is the unique maximum and is stable about the optimum point 2/17/2019

38 Rate of Convergence Linearize the system around the optimum solution using: Write these equation into a vector: Where X, W, P’ are diagonal matrices with entries 2/17/2019

39 Rate of Convergence (cont.)
The smallest eigenvalue of determine the convergence rate Close to zero, then the convergence takes a long time Large, the system will return to the optimal performance rather quickly 2/17/2019

40 Proportional Fairness
is proportionally fair if is feasible and for any other feasible vector If the utility function is of the form Ur(xr)=wr log xr, the optimal allocation satisfies proportional fairness Proportional fairness states a connection achieves a sending rate in proportion to the number of network links that it requires. 2/17/2019

41 Network System Model Formulate resource allocation problems
Exists a unique and stable optimum solution Convergence rate can be derived by computing eigenvalues Achieves proportional fairness 2/17/2019

42 Agenda Motivation for mathematical TCP modeling
Essentials of TCP modeling Gallery of TCP models Periodic model Detailed packet loss model Stochastic model with general loss process Control system model Network system model Summary We have seen many TCP models. All of them capture the essential TCP features, e.g., AIMD. However, they look at the modeling problem at different angles. General loss process model treats the packet loss as a stationary process 2/17/2019


Download ppt "TCP Modeling CMPT 765/408: Computer Networks Simon Fraser University"

Similar presentations


Ads by Google