420 likes | 429 Views
Explore essential TCP modeling concepts and various models including stochastic processes. Understand control and network system models. Study TCP interactions with Active Queue Management algorithms like RED.
E N D
TCP Modeling CMPT 765/408: Computer Networks Simon Fraser University Cheng-Hsin Hsu cha16@cs.sfu.ca
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
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
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:
Expected Sending Rate • Altman et al. show the model has a stationary solution: • given: • (loss process) is ergodic stationary
Expected Value of • Expected sending rate: , where • is the loss event frequency
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
Average Loss Probability • Define • : average loss probability • : the number of transmitted packet • : the number of loss events • We have
Rewrite the Average Sending Rate • Multiple these two equations: • We have
Rewrite the Average Sending Rate (cont.) • Define a normalized correlation function: • We have
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
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)
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
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
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
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 slides are based on the online notes at http://www.cse.cuhk.edu.hk/~cslui/CSC5480/stochastic_tcp_notes.ps.gz
Active Queue Management Algorithm -- RED • Packet drop function is a function of the average queue length at that router 1 Drop probability p pmax tmin tmax Average queue length x Modified from: Fluid-based Analysis of a Network of AQM Routers Supporting TCP Flows with an Application to RED -- ppt file at http://dna-wsl.cs.columbia.edu/pubsdb/citation/presentationfile/27/sigcomm2000.ppt
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
Model a Single Congested Router • Consider a bottleneck router with transmission capacity C • The packet drop functionis 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
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
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
Model Window Size • Window size is modeled by the Poisson Counter Driven Stochastic Differential equations • AIMD behavior of TCP • Take expectation, we have:
Packet Drop/Mark Round Trip Delay (t) Revisit Loss Rate AQM Router B(t) p(t) Sender Receiver Loss Rate as seen by Sender: l(t) = B(t-t)*p(t-t) Copied from: Fluid-based Analysis of a Network of AQM Routers Supporting TCP Flows with an Application to RED -- ppt file at http://dna-wsl.cs.columbia.edu/pubsdb/citation/presentationfile/27/sigcomm2000.ppt
Revisit Loss Rate (cont.) • Let x(t) be the total traffic load at the bottleneck router • Recall: • Write loss rate as:
Final Model • Finally, we have N differential equations
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
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
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)
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
System Model • Models the rates as differential equations: where • : route transmission rate • : feedback information regarding the link condition
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
Objective Functions • Individual route: • Network Obj. Function:
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!
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
Uniqueness and Stability • Hence, U(x(t)) is strictly increasing with t unless • is the unique maximum and is stable about the optimum point
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
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
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.
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
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