Buffer Sizing: Going from Small To Tiny

Download Report

Transcript Buffer Sizing: Going from Small To Tiny

Reducing the Buffer Size
in Backbone Routers
Yashar Ganjali
High Performance Networking Group
Stanford University
February 23, 2005
[email protected]
http://www.stanford.edu/~yganjali
Motivation

Problem
–
–

Possible solution
–

Internet traffic is doubled every year
Disparity between traffic and router growth
(space, power, cost)
All-optical networking
Consequences
–
–
Large capacity  large traffic
Very small buffers
23 February 2005
High Performance Networking Group
2
Outline of the Talk


Buffer sizes in today’s Internet
From huge to small (Guido’s results)
–

2-3 orders of magnitude reduction
From small to tiny
–
Constant buffer sizes?
23 February 2005
High Performance Networking Group
3
Backbone Router Buffers
Source
Router
Destination
C
2T

Universally applied rule-of-thumb
–
A router needs a buffer size: B=2TxC


2T is the two-way propagation delay
C is the capacity of the bottleneck link

Known to the inventors of TCP
Mandated in backbone routers

Appears in RFPs and IETF architectural guidelines

23 February 2005
High Performance Networking Group
4
Review: TCP Congestion Control
Only W packets
may be outstanding
Rule for adjusting W
–
–
W ← W+1/W
W ← W/2
If an ACK is received:
If a packet is lost:
Source
Dest
Window size
Wmax
Wmax
2
t
23 February 2005
High Performance Networking Group
5
Multiplexing Effect in the Core
W
B
0
Buffer Size
23 February 2005
High Performance Networking Group
Probability
Distribution
6
Backbone router buffers

It turns out that
–
–
The rule of thumb is wrong for a core routers
today
2T  C
Required buffer is
instead of 2T  C
n
23 February 2005
High Performance Networking Group
7
Required Buffer Size
2T  C
n
Simulation
23 February 2005
High Performance Networking Group
8
Impact on Router Design

10Gb/s linecard with 200,000 x 56kb/s flows
–
Rule-of-thumb: Buffer = 2.5Gbits

–
Becomes: Buffer = 6Mbits



Requires external, slow DRAM
Can use on-chip, fast SRAM
Completion time halved for short-flows
40Gb/s linecard with 40,000 x 1Mb/s flows
–
–
Rule-of-thumb: Buffer = 10Gbits
Becomes: Buffer = 50Mbits
23 February 2005
High Performance Networking Group
9
How small can buffers be?




Imagine you want to build an all-optical
router for a backbone network…
…and you can build a few dozen packets in
delay lines.
Conventional wisdom: It’s a routing problem
(hence deflection routing, burst-switching,
etc.)
Our belief: First, think about congestion
control.
23 February 2005
High Performance Networking Group
10
TCP with ALMOST No Buffers
23 February 2005
Utilization
of bottleneck link = 75%
High Performance Networking Group
11
Problem Solved?



75% utilization with only one unit of buffering
More flows  Less buffer
Therefore, one unit of buffering is enough
23 February 2005
High Performance Networking Group
12
TCP Throughput withSmall Buffers
TCP Throughput vs. Number of Flows
0.9
0.8
Throughput
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0
23 February 2005
200
400
600
Number of Flows
800
High Performance Networking Group
1000
13
TCP Reno Performance
Buffer Size = 10; Load = 80%
1
0.9
Throughput
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0
23 February 2005
1000
2000
3000
4000
Bottleneck Capacity Mbps
High Performance Networking Group
5000
6000
14
Two Concurrent TCP Flows
23 February 2005
High Performance Networking Group
15
Simplified Model



Flow 1 sends W packets during each RTT
Bottleneck capacity = C packets per RTT
Example: C = 15, W = 5
1 RTT


Flow 2 sends two consecutive packets during
each RTT
Drop probability is increased with W
23 February 2005
High Performance Networking Group
16
Simplified Model (Cont’d)

W(t+1) = p(t)x[W(t)/2] + [1-p(t)]x[W(t)+1]
But, p grows linearly with W
E[W] = O(C ½)
Link utilization = W/C
As C increases, link utilization goes to zero.

Snow model!!!




23 February 2005
High Performance Networking Group
17
Q&A
Q. What happens if flow 2 never sends any
consecutive packets?
A. No packet drops unless utilization = 100%.
Q. How much space we need between the two
packets?
A. At least the size of a packet.
Q. What if we have more than two flows?
23 February 2005
High Performance Networking Group
18
Per-flow Queueing



Let us assume we have a queue for each
flow; and
Server those queues in a round robin
manner.
Does this solve the problem?
23 February 2005
High Performance Networking Group
19
Per-flow Buffering
23 February 2005
High Performance Networking Group
20
Per-Flow Buffering
Temporarily Idle
Time t


Time t + RTT
Flow 3, does not have a packet at time t; Flows 1
and 2 do.
At time t+RTT we will see a drop.
23 February 2005
High Performance Networking Group
21
Ideal Solution



If packets are spaced out perfectly; and
The starting times of flows are chosen randomly;
We only need a small buffer for contention
resolution.
23 February 2005
High Performance Networking Group
22
Randomization



Mimic an M/M/1
queue
Under low load,
queue size is
small with high
Probability
Loss can be
bounded
r
M/M/1
EX 
1
Buffer B
Packet
Loss
b
23 February 2005
High Performance Networking Group
1 r
P X  k   r k
X
P(Q > b)
r
23
TCP Pacing

Current TCP:
–

Send packets when ACK received.
Paced TCP:
–
–
Send one packet every W/RTT time units.
Update W, and RTT similar to TCP
23 February 2005
High Performance Networking Group
24
CWND: Reno vs. Paced TCP
23 February 2005
High Performance Networking Group
25
TCP Reno: Throughput vs. Buffer Size
23 February 2005
High Performance Networking Group
26
Paced TCP: Throughput vs. Buffer Size
23 February 2005
High Performance Networking Group
27
Early Results
Congested core router with 10 packet buffers.
Average offered load = 80%
RTT = 100ms; each flow limited to 2.5Mb/s
source
source
>10Gb/s
>10Gb/s
router
10Gb/s
server
23 February 2005
High Performance Networking Group
28
What We Know
Arbitrary
Injection
Process
If Poisson Process
with load < 1
Theory
Any rate > 0
need unbounded
buffers
Need buffer
size of approx:
O(logD + logW)
i.e. 20-30 pkts
Complete
Centralized
Control
Experiment
TCP Pacing:
Results as good
or better than for
Poisson
Constant fraction
throughput with
constant buffers
[Leighton]
D=#of hops
W=window size
[Goel 2004]
23 February 2005
High Performance Networking Group
29
RENO
PACING
Limited Congestion Window
Limited Window
23 February 2005
Unlimited Window
High Performance Networking Group
30
Slow Access Links
Congested core router with 10 packet buffers.
RTT = 100ms; each flow limited to 2.5Mb/s
source
source
5Mb/s
5Mb/s
router
10Gb/s
server
23 February 2005
High Performance Networking Group
31
Conclusion


We can reduce 1,000,000 packet buffers to
10,000 today.
We can “probably” reduce to 10-20 packet
buffers:
–
–

With many small flows, no change needed.
With some large flows, need pacing in the access
routers or at the edge devices.
Need more work!
23 February 2005
High Performance Networking Group
32
Extra Slides
23 February 2005
High Performance Networking Group
33
Pathological Example


Flow 1: S1  D; Load = 50%
Flow 2: S2  D; Load = 50%
S1
D
1
2
3
4
S2


If S1 sends a packet at time t, S2 cannot
send any packets at time t, and t+1.
To achieve 100% throughput we need at
least one unit of buffering.
23 February 2005
High Performance Networking Group
34