High Performance Switching and Routingtiny-tera.stanford.edu/~nickm/talks/Telecom_Center... ·...
Transcript of High Performance Switching and Routingtiny-tera.stanford.edu/~nickm/talks/Telecom_Center... ·...
Nick McKeownAssistant Professor of Electrical Engineeringand Computer Science
[email protected]://ee.stanford.edu/~nickm
High PerformanceSwitching and RoutingTelecom Center Workshop: Sept 4, 1997.
High Performance Switching and Routing Page 2 of 52
Our Group
Shang-tse “Da” Chuang, Ken Chang,Pankaj Gupta, Youngmi Joo, Steve Lin,
Adisak Mekkittikul, Nick McKeown,Rolf Muralt, Kanta Yamamoto (visitor).
High Performance Switching and Routing Page 3 of 52
1. The Demand for Bandwidth
2. The Shortage of
3. The Architecture of Switches
Switching/Routing Capacity
and Routers
4. Some (of our) solutions
High Performance Switching and Routing Page 4 of 52
What’s the Problem?
Time
Mos
t thi
ngs
High Performance Switching and Routing Page 5 of 52Source: http://www.mfsdatanet.com/MAE/west.stats.html
Feb Apr Jun Aug Nov
200
400
600
800
460
200150
123
Agg
rega
te b
andw
idth
(M
bps)
100
620
520
720
Feb Apr
The San Jose NAPThe demand
High Performance Switching and Routing Page 6 of 52
The supplyR
oute
r P
erfo
rman
ce (
pack
ets/
seco
nd)
103
19901986 1994 1997
104105
106
High Performance Switching and Routing Page 7 of 52
1986 1992 1997
pack
ets/
seco
nd
Demand
Supply
Why we need faster switches/routers
High Performance Switching and Routing Page 8 of 52
•Exponential growth in the number of users.•Exponential growth in traffic per user per hour.•Linear growth in hours per user per day.
Why the growth?
High Performance Switching and Routing Page 9 of 52
Time of day5am 8am
100%
30%
Dialup DemandModem usage at U.C. Berkeley
“America on Hold”
% o
f mod
ems
in u
se
High Performance Switching and Routing Page 10 of 52
Traffic Inversion10 years ago
High Performance Switching and Routing Page 11 of 52
ISP
ISP
Traffic InversionToday
High Performance Switching and Routing Page 12 of 52
November 1st, 1996
Why is this a problem?
Pac
ket L
oss
(%)
High Performance Switching and Routing Page 13 of 52
The race is on...
pack
ets/
seco
nd
Demand
Supply
- Gigabit Routers- IP Switching- Tag Switching- Layer-3 switches
High Performance Switching and Routing Page 14 of 52
1. The Demand for Bandwidth
2. The Shortage of
3. The Architecture of Switches
Switching/Routing Capacity
and Routers
4. Some (of our) solutions
High Performance Switching and Routing Page 15 of 52
The Architecture of
Forwarding
OutputScheduler
Signaling &
Generic Packet Processor:
Decision
Processor
Switches and Routers
Mgmt
Interconnect
(e.g. IP Router, ATM Switch, LAN Switch)
Data Hdr
High Performance Switching and Routing Page 16 of 52
Performance of IP Routers
Min back-to-back packet size Packet size
ArrivalTime
CopyTime
Forwarding
Time
Time
Decision
High Performance Switching and Routing Page 17 of 52
Performance of IP Routers
Min back-to-back packet size Packet size
Arrivalrate
Copyrate
Headerprocessingtime
Most routersdo this poorly!
Most routersdo this ~ ok
Time
High Performance Switching and Routing Page 18 of 52
The Evolution of RoutersThe first shared memory routers
RoutingCPU
LineCard
LineCard
LineCard
BufferMemory
DMA DMA DMA
MAC MAC MAC
High Performance Switching and Routing Page 19 of 52
The Evolution of RoutersThe first shared memory routers
RoutingCPU
LineCard
LineCard
LineCard
BufferMemory
DMA DMA DMA
MAC MAC MAC
High Performance Switching and Routing Page 20 of 52
The Evolution of RoutersReducing the number of bus copies
RoutingCPU
LineCard
BufferMemory
DMA
MAC
BufferMemory
RouteCache
DMA
MAC
BufferMemory
RouteCache
DMA
MAC
BufferMemory
RouteCache
High Performance Switching and Routing Page 21 of 52
The Evolution of RoutersReducing the number of bus copies
RoutingCPU
LineCard
BufferMemory
DMA
MAC
BufferMemory
RouteCache
DMA
MAC
BufferMemory
RouteCache
DMA
MAC
BufferMemory
RouteCache
updates
High Performance Switching and Routing Page 22 of 52
The Evolution of RoutersAvoiding bus contention
MA
C
Buffer
Mem
ory
Route
Cache
MAC
BufferMemory
RouteCache
MA
C
Buf
fer
Mem
ory
Rou
teC
ache
BufferMemory
CPUROUTE
Advantage:Non-blocking backplane—
Disadvantage:Difficult to provide QoS
high throughput
High Performance Switching and Routing Page 23 of 52
Multigigabit Routing
MA
C
Buf
fer
Mem
ory
BufferMemory
CPUROUTE
MAC
BufferMemory
MA
C
Buffer
Mem
ory
BBN’s Multigigabit Router
Buffer
Memory
CPU
ROUTE
2.4Gb/s
2.4Gb/s
2.4Gb/s
5Mpps
50Gb/sCrossbar
High Performance Switching and Routing Page 24 of 52
1. The Demand for Bandwidth
2. The Shortage of
3. The Architecture of Switches
Switching/Routing Capacity
and Routers
4. Some (of our) solutions
High Performance Switching and Routing Page 25 of 52
Some (of our)Solutions
1. Accelerating Lookups:• Label-Swapping
• Longest-matching prefixes
2. Switched Backplanes• Input Queueing
— Theory— Unicast— Multicast
• Fast Buffering
• Speedup
3.Our main project: The Tiny Tera
High Performance Switching and Routing Page 26 of 52
Routing Lookups
212.17.9.4
Class A
Class B
Class C212.17.9.0 Port 4
Class A Class B Class C D
ExactMatch
(hash, cache,pipeline...)
Routing Table:
High Performance Switching and Routing Page 27 of 52
212.0.0.0/8
212.17.0.0/16212.17.9.0/24
212.17.9.4
CIDR uses “longest matching prefix” routing:
Hashing, caching and pipelining are hard!
Routing Lookups withCIDR (“supernetting”)
High Performance Switching and Routing Page 28 of 52
Solution 1:Label Swapping
Forwarding
OutputScheduler
Signaling &
Decision
ProcessorMgmt
Interconnect
Data Hdr Label
NewLabel Port
DirectLookup
IP Switching, Tag Switching, ARIS, Cell-switched Router,....
High Performance Switching and Routing Page 29 of 52
Solution 2:Perform Lookups Faster!
Size ofRouting Tables
Cost of Memory(per byte)
Observation #1:
Time
High Performance Switching and Routing Page 30 of 52
Performing Lookups Faster
Prefix length
Numberin routingtable
24
212.17.9.0/24
212.17.9.40 232-1
256
Observation #2:
High Performance Switching and Routing Page 31 of 52
212.17.9.1 101
0
1
1
Port 4
Port 4Port 3
look further
look furtherPort 3
256Port 4Port 5
Port 4Port 5
16Mbytes of 50ns DRAM
<1Mbyte of 50ns DRAM
Solution 2 (cont):20 million lookups per second
High Performance Switching and Routing Page 32 of 52
1. Accelerating Lookups:• Label-Swapping
• Longest-matching prefixes
2. Switched Backplanes• Input Queueing
— Theory— Unicast— Multicast
• Fast Buffering
• Speedup
3.Our main project: The Tiny Tera
High Performance Switching and Routing Page 33 of 52
Shared Memory:
Input Queueing:
Should we use shared memory
Advantages:SimplicityHigh Bandwidth
Disadvantages:HOL BlockingLess efficient
Advantages:Highest Throughput.
Disadvantages:N-fold internal speed-up
N p
orts
Difficult to control packet delay.
or input-queueing?
Possible to control packet delay.
Shared Memory
High Performance Switching and Routing Page 34 of 52
TimeM
emor
y S
ize
Time
Mem
ory
Spe
ed
SRAM
DRAM
Memory Bandwidth
High Performance Switching and Routing Page 35 of 52
An aside: How fast can sharedmemory operate?
Route Lookup
SharedMemory
200byte packet
5ns SRAM
How fast can a 16 port switch run with this architecture?
5ns per packet 2 memory operations per cell time×aggregate bandwidth is 160Gb/s⇒
High Performance Switching and Routing Page 36 of 52
Because of ashortage of memory bandwidth, mostmultigigabit and terabit switches and routers useeither:
1. Input Queueing, or2. Combined Input and Output Queueing.
Should we use shared memoryor input-queueing?
High Performance Switching and Routing Page 37 of 52
1 24 21 2
Inputs Outputs
ρmax 2 2– 58%= =
Input Cell Buffer
Cells CellsN
The Problem A Solution....
Head of Line Blocking
“Virtual Output Queueing”
ρmax 100%=
High Performance Switching and Routing Page 38 of 52
Input 1
Q(1,1)
Q(1,n)
A1(t)
Input m
Q(m,1)
Q(m,n)
Am(t)
D1(t)
Dn(t)
Output 1
Output n
Matching, MA1,1(t)
?
....but requires scheduling...
High Performance Switching and Routing Page 39 of 52
RequestGraph
BipartiteMatching
1234
1234
1234
1234
(Weight = 18)
25
242
7
....which is equivalent to graph matching
High Performance Switching and Routing Page 40 of 52
Practical Algorithms
1. iSLIP — Weight = 1
2. iLQF — Weight = Occupancy
— Simple to implement
— Iterative round-robin
3. iOCF — Weight = Cell Age
4. MCFF — Weight = Backlog
Simple, fast,efficient
Good fornon-uniformtraffic.Complex!Good fornon-uniformtraffic.Simple!
High Performance Switching and Routing Page 41 of 52
Multicast TrafficQueue Architecture
2. Why treat multicast differently?1. Making use of the crossbar
3. Why maintain a single FIFO queue?4. Fanout-splitting
134
High Performance Switching and Routing Page 42 of 52
0.1
1
10
100
1000
10000
0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 0.22 0.24
Ave
rage
Cel
l Lat
ency
Offered Load
Fanout-splittingNo Fanout-splitting
Fanout-Splitting
High Performance Switching and Routing Page 43 of 52
Multicast Traffic
1. Residue Concentration
2. Tetris-based schedulers
High Performance Switching and Routing Page 44 of 52
Gigabit and TerabitRouting
1. Accelerating Lookups:• Label-Swapping
• Longest-matching prefixes
2. Switched Backplanes• Input Queueing
— Theory— Unicast— Multicast
• Fast Buffering
• Speedup
3.Our main project: The Tiny Tera
High Performance Switching and Routing Page 45 of 52
Fast BufferingPing-pong Memory
BufferMemory
BufferMemory
BufferMemory
M
M/2
M/2
High Performance Switching and Routing Page 46 of 52
Fast BufferingPing-pong Memory
M
t
Occupancy
M/2
M/2
Maximum “cost” = M/2
High Performance Switching and Routing Page 47 of 52
In practise, cost <5%
Fast BufferingPing-pong Memory
Buffer size, M
Loss rate with
Loss rate with
single memory: M
ping-pong: (M/2,M/2)LossRate
High Performance Switching and Routing Page 48 of 52
Gigabit and TerabitRouting
1. Accelerating Lookups:• Label-Swapping
• Longest-matching prefixes
2. Switched Backplanes• Input Queueing
— Theory— Unicast— Multicast
• Fast Buffering
• Speedup
3.Our main project: The Tiny Tera
High Performance Switching and Routing Page 49 of 52
Combined Input- and Output-Queueing:
Matching Output Queueingwith Input- and Output- Queueing
How much speedup is enough?
k readsand writes
High Performance Switching and Routing Page 50 of 52
Conventional wisdom suggests:
Matching Output Queueingwith Input- and Output- Queueing
How much speedup is enough?
A speedupk 2 4–= leads to high throughput
High Performance Switching and Routing Page 51 of 52
Fact To match output queueing, with FIFO input queues:k = N
Matching Output Queueingwith Input- and Output- Queueing
=?Traffic
Output QueuedSwitch
Combined Input
Switchand Output Queued
Fact To match output queueing, with virtual output queues:k = 4 is sufficient
Conjecture: To match output queueing, with VOQs:k = 2 is sufficient
High Performance Switching and Routing Page 52 of 52
1. Accelerating Lookups:• Label-Swapping
• Longest-matching prefixes
2. Switched Backplanes• Input Queueing
— Theory— Unicast— Multicast
• Fast Buffering
• Speedup
3.Our main project: The Tiny Tera