Understanding Congestion Control Mohammad Alizadeh Fall 2018 6.829 Computer Networks Understanding Congestion Control Mohammad Alizadeh Fall 2018
What Problem is TCP really solving? Max-min rate allocation? 1 Mb/s x1 = ? x2 = ? x3 = ? x1 x2 x3 Max-min 1/3 TCP Assuming equal RTTs
What Problem is TCP really solving? Max-min rate allocation? 1 Mb/s 1 Mb/s x1 = ? x3 = ? x2 = ? x1 x2 x3 Max-min 1/2 TCP ~0.4 ~0.6
What Problem is TCP really solving? 1 Mb/s 1 Mb/s 1 Mb/s x1 = ? x3 = ? x2 = ? What is the difference between these links?
What Problem is TCP really solving?
Network Utility Maximization TCP is solving an optimization problem! Spurred a lot of research on analyzing and designing network protocols from the lens of optimization
Is My Protocol “Stable”? Example: ns2 simulations, 50 AIMD TCP sources, capacity = 9000 pkt, RED AQM Credit: Low et al. “Dynamics of TCP/RED and a Scalable Control”, INFOCOM 2002.
Control Theoretic Analysis of TCP Model TCP as a dynamical system (“fluid model”) Analyze stability properties via control theory
Outline for Rest of Lecture Network Utility Maximization (NUM) Distributed Algorithm for NUM TCP’s NUM Problem TCP Fluid Models
Utility Function The benefit derived from sending at rate x Good model for elastic flows e.g. file downloads The benefit derived from sending at rate x We’ll assume U(.) is increasing & concave
Examples of Concave Utility Functions
Elastic vs. Inelastic Flows utility, U(x) rate, x utility, U(x) rate, x elastic traffic (e.g., file download) delay-tolerant, no intrinsic rate prefers to share inelastic traffic (e.g., real-time video) delay-sensitive, intrinsic rate prefers to randomize Credit: Frank Kelly (University of Cambridge)
Network Utility Maximization (NUM) c1 = 1 Mb/s c2 = 1 Mb/s x1 x3 x2 maximize log(x1) + log(x2) + log(x3) subject to: x1 + x2 ≤ 1 x1 + x3 ≤ 1
Network Utility Maximization (NUM) c1 = 1 Mb/s c2 = 1 Mb/s x1 x3 x2 maximize log(x1) + log(x2) + log(x3) subject to: x1 x2 x3 1 1 0 1 1 0 1
RLxN NUM: General Case maximize subject to: routing matrix N flows L links maximize subject to: x1 x2 xN c1 c2 cL 0 1 0 1 1 RLxN routing matrix 1 0 1 0 0 0 0 1 1 0 If Ui(.) strictly concave, the problem has unique solution
NUM Example 1: Throughput Maximization c1 = 1 Mb/s c2 = 1 Mb/s x1 x3 x2 maximize x1 + x2 + x3 subject to: x1 + x2 ≤ 1 x1 + x3 ≤ 1 x1★ = 0 Mb/s x2★ = 1 Mb/s x3★ = 1 Mb/s
NUM Example 2: Proportional Fairness c1 = 1 Mb/s c2 = 1 Mb/s x1 x3 x2 maximize log(x1) + log(x2) + log(x3) subject to: x1 + x2 ≤ 1 x1 + x3 ≤ 1 x1★ = 1/3 Mb/s x2★ = 2/3 Mb/s x3★ = 2/3 Mb/s
NUM Example 3: “α-fairness” c1 = 1 Mb/s c2 = 1 Mb/s x1 x3 x2 α ≥ 0 (a constant) maximize subject to: x1 + x2 ≤ 1 x1 + x3 ≤ 1 alpha Objective α = 0 Thrput Maximization α → 1 Proportional Fairness α →∞ Max-min Fairness
Outline The Network Utility Maximization (NUM) Problem Distributed Algorithm for NUM TCP’s NUM Problem TCP Fluid Models
Proportional Fairness Example c1 = 1 Mb/s c2 = 1 Mb/s x1 x3 x2 maximize log(x1) + log(x2) + log(x3) subject to: x1 + x2 ≤ 1 x1 + x3 ≤ 1
Distributed Algorithm c1 = 1 Mb/s c2 = 1 Mb/s x1 p1 p2 x3 x2 pl = “congestion price” for link l price per unit of bandwidth (pl ≥ 0) qi = total price for source i Sum of prices on source i’s path
This is done independently at each source. The Source Problem c1 = 1 Mb/s c2 = 1 Mb/s x1 p1 p2 x3 x2 Pick rate xi to maximize utility: log(xi) – qi xi benefit cost xi = 1/qi This is done independently at each source.
The Network Problem p1 p2 pl(t+1) = [ pl(t) + κ(yl(t) – cl) ]+ c1 = 1 Mb/s c2 = 1 Mb/s x1 p1 p2 x3 x2 Adapt link prices periodically based on congestion pl(t+1) = [ pl(t) + κ(yl(t) – cl) ]+ total traffic at link l [.]+ = max(., 0)
This is done independently at each link. The Network Problem c1 = 1 Mb/s c2 = 1 Mb/s x1 p1 p2 x3 x2 Adapt link prices periodically based on congestion pl(t+1) = [ pl(t) + κ(yl(t) – cl) ]+ This is done independently at each link.
Putting it All Together c1 = 1 Mb/s c2 = 1 Mb/s x1 p1 p2 x3 x2 Sources Links x1(t) = 1 / (p1(t) + p2(t)) x2(t) = 1 / p1(t) x3(t) = 1 / p2(t) p1(t+1) = [p1(t) + κ(y1(t) – c1)]+ p2(t+1) = [p2(t) + κ(y2(t) – c2)]+
Example x1 x2 x3
Outline The Network Utility Maximization (NUM) Problem NUM Distributed Algorithm TCP’s NUM Problem TCP Fluid Models
TCP + PI p1 p2 Sources Links p1(t+1) = [p1(t) + κ(y1(t) – c1)]+ c1 = 1 Mb/s c2 = 1 Mb/s x1 p1 p2 x3 x2 Sources Links x1(t) = 1 / RTT1 x2(t) = 1 / RTT2 x3(t) = 1 / RTT3 p1(t+1) = [p1(t) + κ(y1(t) – c1)]+ p2(t+1) = [p2(t) + κ(y2(t) – c2)]+
What is TCP’s Utility Function?
Outline The Network Utility Maximization (NUM) Problem NUM Distributed Algorithm TCP’s NUM Problem TCP Fluid Models
Is My Protocol “Stable”? Example: ns2 simulations, 50 AIMD TCP sources, capacity = 9000 pkt, RED AQM Credit: Low et al. “Dynamics of TCP/RED and a Scalable Control”, INFOCOM 2002.
TCP/RED Fluid Model - Setup p(t) Bi(t) q(t) Receiver Sender Receiver Sender C Receiver i Sender i One bottlenecked RED router capacity {C (packets/sec) } queue length q(t) drop prob. p(t) N TCP flows window sizes Wi(t) round trip time Ri(t) = Ai+q(t)/C throughputs Bi (t) = Wi(t)/Ri(t)
Fluid Model vs. Simulation Flow set 1 Flow set 2 Flow set 3 Flow set 4 Flow set 5 RED router 1 RED router 2 # flows per flow set: 40 -> 10 (t=75) -> 40 (t=150) Credit: Vishal Misra (Columbia)
Fluid Model vs. Simulation Queue 1 Queue 2
System of Differential Equations All quantities are average values. Timeouts and slow start ignored dWi dt ^ = 1 Ri(q(t)) Additive increase Wi(t-t) ^ Ri (q(t-t)) p(t-t) Loss arrival rate - Wi 2 ^ Mult. decrease Window Size: Queue length: dq dt = ^ + S Ri(q(t)) ^ Wi(t) Incoming traffic -1[q(t) > 0]C ^ Outgoing traffic
System of Differential Equations (cont.) Average queue length: q(t) ^ dx dt = ln (1-a) d - x(t) Where a = averaging parameter of RED(wth) d = sampling interval ~ 1/C Loss probability: dp dt = dx ^ Where dp is obtained from the marking profile