Transport Overview

Network Transport Layer:
Primal-Dual Resource Allocation;
TCP in New Settings
Y. Richard Yang
http://zoo.cs.yale.edu/classes/cs433/
4/6/2016
1
Outline
 Admin and recap
 Bandwidth allocation framework
 Network overview
2
Admin.
r Exam 1
m
m
m
High – 74
Low – 36
Solutions and grading rubric to be posted online
• Please discuss any questions with me and TFs
r Assignment four
m Questions?
r Projects
3
Admin: Web Server Benchmarking
(2016; Using Zoo Machines)
4
Admin: Web Server Benchmarking
(Dedicated Machine; 2013)
Apache (2013)
- Apache: 4.925 Gbps
- Fastest student server: 7.530 Gbps
5
Outline
r Recap
 Transport congestion control
 What is congestion
 The AIMD alg
o TCP/reno congestion control
o TCP/Vegas
o A unifying view of TCP/Reno TCP/Vegas
o Network wide resource allocation
o Framework
o Axiom derivation of network-wide objective function
 Derive distributed algorithm
Outline
r Recap
 Transport congestion control
 What is congestion
 The AIMD alg
o TCP/reno congestion control
o TCP/Vegas
o A unifying view of TCP/Reno TCP/Vegas
o Network wide resource allocation
o Framework
o Axiom derivation of network-wide objective function
 Derive distributed algorithm
Recap: TCP/Reno and TCP/Vegas
TCP/Reno
TCP/Vegas
Congestion
signal
loss rate p
Dynamics (x’)
x=
Equilibrium
1
RTT 2
xreno 
queueying delay Tqueueing
1 2
- px
2
 vegas
 reno
RTT
x = RTTx 2 (RTTmin + ax - RTT)
p
xvegas  Tqueueing
8
Recap: Interpreting Congestion Measure
ql(t)
q2(t)
pf 
xf(t)
q
l
f uses l
TCP/Reno:
x=
1
RTT 2
- px
1
2
2
 12 x2 ( RTT22 x2  p)
TCP/Vegas: x = RTTx (RTTmin + ax - RTT)
2
= RTTx 2 ( ax -Tqueueing )
9
Recap: Network-Wide Resource
Allocation Examples
Objective
Allocation (x1, x2, x3)
TCP/Reno
0.26
0.74
0.74
TCP/Vegas
1/3
2/3
2/3
Max Throughput
0
1
1
Max-min
½
½
½
Max sum log(x)
1/3
2/3
2/3
Max sum of -1/(RTT2 x)
0.26
0.74
0.74
x1
C= 1
x2
C= 1
x3
10
Roadmap: Resource Allocation Frameworks
r Engineering (design):
m how
to determine
objective?
m given objective,
how to design
effective alg?
subject to
U x
x c
over
x0
max
f F

f 

f
f : f uses link l


f 
l
for any link l
r Science/reverse engineering
(understand):
m better
understanding of current protocols
11
Recap: Nash Bargain Solution (NBS)
r
x2
R
T
s
x1
12
Recap: Nash Bargain Solution (NBS)
r Surprising result by John Nash
x2
(1951)
m
the rate allocation point is the
feasible point which maximizes
x1x2  xF
r This is equivalent to maximize
 log( x
f
R
x1
)
f
r In other words, assume each flow
f has utility function log(xf)
13
Outline
r Recap
 Transport congestion control
 What is congestion
 The AIMD alg
o TCP/reno congestion control
o TCP/Vegas
o A unifying view of TCP/Reno TCP/Vegas
o Network wide resource allocation
o Framework
o Axiom derivation of network-wide objective function
 Derive distributed algorithm
x1
Problem
U
max
f F
subject to
over
1
x2

f 

x
1
x3
xf
f
f : f uses link l



 cl for any link l
x0
Typical setting:
max f(x)
s.t. x in S
15
x1
Problem
max
U
f F
subject to
over
1
x2

f 

x
1
x3
xf
f
f : f uses link l



 cl for any link l
x0
Q: Why is it hard to solve the problem
using a distributed protocol (i.e., in the
Internet)?
16
A Two-Slide Summary of Constrained
Convex Optimization Theory
max
f ( x)
subject to
g ( x)  0
over
xS
q
S
f(x)
q
max
U
f F

f 

subject to
Ax  C
over
x0
xf



f(x) concave
g(x) linear
S is a convex set
-Map each x in S, to [g(x), f(x)]
-For each slope q (>=0), computes
f(x) – q g(x) of all mapped [f(x), g(x)]
g(x)
D(q)  max  f ( x)  qg ( x) 
xS
17
A Two-Slide Summary of Constrained
Convex Optimization Theory
S
f(x)
q1
max
f ( x)
subject to
g ( x)  0
over
xS
q2
f(x) concave
g(x) linear
S is a convex set
D(q)  max  f ( x)  qg ( x) 
q3
xS
-D(q) is called the dual;
q (>= 0) are called prices in economics
-D(q) provides an upper bound on obj.
- According to optimization theory:
g(x) when D(q) achieves minimum over
all q (>= 0), then the optimization
objective is achieved.
18
x1
Dual of the Primal
max
U
f F
subject to
over
1
x2

f 

x
1
x3
xf
f
f : f uses link l



 cl for any link l
x0


D(q)  max  U f ( x f )   ql (  x f  cl ) 
x f 0
l
f :uses l
 f

19
Decomposition
x1
x2
1
1
x3
r Assume each link l has non-negative
congestion signal ql, consider the dual D(q)


D(q)  max  U f ( x f )   ql (  x f  cl ) 
x f 0
l
f :uses l
 f



 max  U f ( x f )  x f  ql    ql cl
x f 0
f 
l: f uses l 
l


  max U f ( x f )  x f  ql    ql cl
x f 0
f
l: f uses l 
l

20
Distributed Optimization: User Problem
r Given network-wide signal per unit rate pf
(=sum of ql along the path), flow f chooses
rate xf to maximize:
max U f x f   x f p f
x
f
over
xf  0
r Using the network signals, the optimization
problem of each user is decoupled:
independent of each other!
21
Distributed Optimization:
User Problem
max
U f x f   x f p f
over
xf  0
xf
How should flow f adjust xf locally?
x f  U ' f x f   p f
At equilibrium (i.e., at optimal), xf satisfies:
U
'
f
x   p
f
f
0
22
Interpreting Congestion Measure
ql(t)
q2(t)
xf(t)
pf 
q
l
f uses l
x f  U ' f x f   p f
23
Distributed Optimization:


D
(
q
)

max
U
(
x
)

x
q

Network Problem
 x 0 f f f  l    ql cl
f
f

l: f uses l

l
Assume after all flows have picked their
optimal rates given congestion signal, the
network (i.e., link l) adjusts the link signals
ql :
~
min q0 D( q)   ql (cl 
l
x
f
)
f : f uses l
24
Distributed Optimization: min q³0 D(q) = åql (cl - å x f )
l
f : f uses l
Network Problem
how should link l adjust ql locally?
ql  
D ( q )
ql

D(q)  cl   x f
ql
f :uses l
ql 
x
f
 cl
f :uses l
25
Decomposition
r SYSTEM(U):
r USERf:
subject to
U x
x  c
over
x0
max

f 
f F

f 
f
f : f uses link l
l
for any link l
max U f x f   x f p f
x
f
over
xf  0
r NETWORK:
~
min q0 D( q)   ql (cl 
l
x
f : f uses l
f
)
26
Outline
r Recap
 Transport congestion control
 What is congestion
 The AIMD alg
o TCP/reno congestion control
o TCP/Vegas
o A unifying view of TCP/Reno TCP/Vegas
o Network wide resource allocation
o Framework
o Axiom derivation of network-wide objective function
o Derive distributed algorithm
 TCP/Reno, TCP/Vegas revisited
' x   p

x

f
TCP/Reno Dynamics f U f f
x = ( RTT22 x2 - p)
x2
2
U

2
 U (xf )  
 x RTT
 f
'
f
'
f




x   p
f
f
2
2
U f (xf )  
RTT 2 x f
28
' x   p

x

f
TCP/Vegas Dynamics f U f f
x = RTTx 2 ( ax - (RTT - RTTmin ))
U ' f x f   p f
 U ( x f )  x
'
f
 U f ( x f )   log( x f )
29
Summary: TCP/Vegas and TCP/Reno
r Pricing signal is
r Pricing signal is loss rate p
queueing delay Tqueueing
xf 

Tq ueueing
xf 
 U 'f ( x f ) 
xf
 U f ( x f )   log( x f )
RTT
p
U 'f ( x f )  p
U 'f ( x f )  Tqueueing


 
 U (x f )  
 x RTT
 f
'
f
 U f (x f )  




2
'
2
RTT x f
30
Summary: Resource Allocation Framework
r Engineering (design):
m how
to determine
objective?
m given objective,
how to design
effective alg?
subject to
U x
x c
over
x0
max
f F

f 



f 
f
f : f uses link l
l
for any link l
r Science/reverse engineering
(understand):
m better
understanding of current protocols
r Additional pointers
m
http://www.statslab.cam.ac.uk/~frank/pf/
31
Outline
r Recap
 Transport congestion control
 What is congestion
 The AIMD alg
o TCP/reno congestion control
o TCP/Vegas
o A unifying view of TCP/Reno TCP/Vegas
o Network wide resource allocation
o Framework
o Axiom derivation of network-wide objective function
o Derive distributed algorithm

New protocols
Motivation
TCP/Reno growth function
cwnd
TD
TD
TD
TD
Wm
ssthresh
CA
CA
CA
CA
Grows linearly throughout.
Motivation: Is there a faster way?
Time
TCP BIC Algorithm
cwnd
TD
WmaxTD
TD
TD
Wm
Wmin
CA
CA
CA
CA
Time
 Setting
-
Wmax = cwnd size before reduction
- Too big
-
Wmin = β*Wmax – just after reduction, where β is
multiplicative decrease factor
- Small
 Basic idea
-
binary search between Wmax and Wmin
TCP BIC Algorithm: Issues
cwnd
TD
WmaxTD
TD
TD
Wm
Wmin
CA
CA
CA
CA
Time
 Pure binary search (jump from Wmin to (Wmax and Wmin)/2)
may be too aggressive
o
Use a large step size Smax
 What if you grow above Wmax?
-
Use binary growth (slow start) to probe more
TCP BIC Algorithm
Max Probing
Wmax + 3Smax
Packet loss
event
Wmax + 2Smax
Wmax +Smax
Wmin
Wmin
Wmax
W
max++SSmin
min
Wmax
(midpoint – Wmin)< Smin
midpoint = (Wmin + Wmax)/2
Wmin + Smin
midpoint = (Wmin + Wmax)/2
midpoint = (Wmin + Wmax)/2
WW
min
min+ Smax Wmin + Smax
midpoint – Wmin > Smax
Wmin = β*Wmax
Additive Increase
Binary Search
Slow Start
Additive Inc.
TCP BIC Algorithm
while (cwnd < Wmax) {
if ( (midpoint - Wmin) > Smax )
cwnd = cwnd + Smax
else
if ((midpoint - Wmin) < Smin)
cwnd = Wmax
else
cwnd = midpoint
if (no packet loss)
Wmin = cwnd
else
Wmin = β*cwnd
Wmax = cwnd
midpoint = (Wmax + Wmin)/2
}
Additive Increase
Binary Search
TCP BIC Algorithm: Probe
while (cwnd >= Wmax){
if (cwnd < Wmax + Smax)
cwnd = cwnd + Smin
else
cwnd = cwnd + Smax
if (packet loss)
Wmin = β*cwnd
Wmax = cwnd
}
Slow growth
Fast growth
Max Pro
TCP BIC - Summary
Max Probing
+ Smin
+ Smax
Packet loss
event
Wmax
+ Smax
Additive
Increase
Time
jump to
midpoint
Binary
Increase
Slow
Start
Additive
Increase
TCP BIC in Action
TCP BIC Analysis
 Advantages
o Faster convergence at large gap
o Slower growth at convergence to avoid
timeout
 Issues
o Still depend on RTT
o Complex growth function
More details: http://www.land.ufrj.br/~classes/coppe-redes-2007/projeto/BIC-TCP-infocom-04.pdf
41
TCP Cubic
 cwnd = C( t – K)3 + Wmax , where
- Wmax = cwnd before last reduction
- C scaling factor
- t is the time elapsed since last window reduction
-
K = 3 Wb / C
- β multiplicative decrease factor
TCP CUBIC
Max Probing
Cubic starts probing for
more bandwidth
Packet loss
event
Wmax
Time
Fast growth upon
reduction
Steady State Behavior
Around Wmax, window growth almost
becomes zero
TCP CUBIC Advantages
 Good RTT fairness
 Growth dominated by t, competing flows have same t
after synchronized packet loss
 Real-time dependent
 Similar to BIC but linear increases are time

dependent
Does not depend on ACK’s like TCP/ Reno
 Scalability
 Cubic increases window to Wmax (or its vicinity) quickly
and keeps it there longer
TCP CUBIC Drawbacks
 Slow Convergence
- Flows with higher cwnd are more aggressive
initially
=> Prolonged unfairness between flows
- More details:
http://www4.ncsu.edu/~rhee/export/bitcp/c
ubic-paper.pdf
Summary
 Many aspects of TCP can be studied, for
example TCP under wireless (LTE)

http://conferences.sigcomm.org/sigcomm/2013/papers/sigcomm/p363.pdf
Outline
 Admin and recap
 Network resource allocation framework
 Network overview
47
Network Layer
r Transport packet from
source to dest.
r Network layer in every
host, router
Basic function:
m determine route taken
by packets of a flow, and
move the packets along
the route
48
Network Layer: Complexity Factors
r For network providers
m
m
m
efficiency of routes
policy control on routes
scalability
r For users: quality of services
m
m
m
m
guaranteed bandwidth?
preservation of inter-packet timing (no jitter)?
loss-free delivery?
in-order delivery?
r Interaction between users and network
providers
m
signaling: congestion feedback/resource reservation
49
Current Internet Network Layer
Network layer functions:
Transport layer
Routing protocols
•path selection
•e.g., RIP, OSPF, BGP
Control protocols
- router “signaling”
e.g. RSVP
Control protocols
•error reporting
e.g. ICMP
Network
layer
forwarding
Network layer protocol (e.g., IP)
•addressing conventions
•packet format
•packet handling conventions
Link layer
physical layer
51
Routing: Overview
Routing
Goal: determine “good” paths
(sequences of routers) thru
networks from source to dest.
Graph abstraction for the
routing problem:
5
r graph nodes are routers
r graph edges are physical
links
m
links have properties: delay,
capacity, $ cost, policy
A
2
1
B
2
D
3
3
1
C
1
E
5
F
2
52
Routing Design Space
- Robustness
- Optimality
- Simplicity
r Routing has a large design space
m who decides routing?
• source routing: end hosts make decision
• network routing: networks make decision
m
how many paths from source s to destination d?
• multi-path routing
• single path routing
m
will routing adapt to network traffic demand?
• adaptive routing
• static routing
m
…
53
Routing Design Space:
Internet
- Robustness
- Optimality
- Simplicity
r Routing has a large design space
m who decides routing?
• source routing: end hosts make decision
 network routing: networks make decision
- (applications such as overlay and p2p are trying to bypass it)
m
how many paths from source s to destination d?
• multi-path routing
 single path routing (with small amount of multipath)
m
will routing adapt to network traffic demand?
• adaptive routing
 static routing (mostly static; adjust in larger timescale)
m
…
58
Backup Slides
59
Another Decomposition
r SYSTEM(U):
subject to
U x
x  c
over
x0
max
f F
r USERf(Uf; pf)

f 
f
f : f uses link l
max U
x
f
r

f 
l
for any link l
  w
wf
f pf
f
over w f  0


w
log


max
x
f

NETWORK(wf)
f  f 
f F
subject to
 x f  cl for any link
l
f : f uses link l
over
x0
60
Decomposition Theorem
r
There exist vectors p , w and x such
that
1.
2.
3.
r
wf = pfxf for f  F
wf solves USERf(Uf; pf)
x solves NETWORK(w)
The vector x then also solves
SYSTEM(U).
61