buffalo: bloom filter forwarding architecture for large organizations minlan yu princeton university...

28
BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University [email protected] Joint work with Alex Fabrikant, Jennifer Rexford 1 CoNEXT’09

Upload: alannah-horn

Post on 23-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations

Minlan YuPrinceton University

[email protected] work with Alex Fabrikant, Jennifer Rexford

1

CoNEXT’09

Page 2: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

Large-scale SPAF Networks• Large network using flat addresses

– Simple for configuration and management– Useful for enterprise and data center networks

• SPAF:Shortest Path on Addresses that are Flat– Flat addresses (e.g., MAC addresses)– Shortest path routing (link state, distance vector)

2

SH

S

S

S

S

S S

S S

S S S

S

H

H

H

H

HH

H

H

Page 3: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

Scalability Challenges

• Recent advances in control plane– E.g., TRILL, SEATTLE– Topology and host information dissemination– Route computation

• Data plane remains a challenge– Forwarding table growth (in # of hosts and switches)– Increasing link speed

3

Page 4: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

State of the Art

• Hash table in SRAM to store forwarding table– Map MAC addresses to next hop– Hash collisions: extra delay

• Overprovision to avoid running out of memory– Perform poorly when out of memory– Difficult and expensive to upgrade memory

4

00:11:22:33:44:55

00:11:22:33:44:66

aa:11:22:33:44:77

… …

Page 5: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

Bloom Filters• Bloom filters in fast memory (SRAM)

– A compact data structure for a set of elements– Calculate s hash functions to store element x– Easy to check membership – Reduce memory at the expense of false positives

h1(x) h2(x) hs(x)01000 10100 00010

x

V0Vm-1

h3(x)

Page 6: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

• One Bloom filter (BF) per next hop– Store all addresses forwarded to that next hop

6

Nexthop 1

Nexthop 2

Nexthop T

……Packetdestination

query

Bloom Filters

hit

BUFFALO: Bloom Filter Forwarding

Page 7: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

BUFFALO Challenges

7

Page 8: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

BUFFALO Challenges

8

Page 9: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

Optimize Memory Usage• Consider fixed forwarding table• Goal: Minimize overall false-positive rate

– Probability one or more BFs have a false positive

• Input:– Fast memory size M– Number of destinations per next hop– The maximum number of hash functions

• Output: the size of each Bloom filter– Larger BF for next-hops with more destinations

9

Page 10: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

Constraints and Solution

• Constraints– Memory constraint

• Sum of all BF sizes fast memory size M

– Bound on number of hash functions• To bound CPU calculation time• Bloom filters share the same hash functions

• Proved to be a convex optimization problem– An optimal solution exists– Solved by IPOPT (Interior Point OPTimizer)

10

Page 11: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

– Forwarding table with 200K entries, 10 next hop– 8 hash functions– Optimization runs in about 50 msec

Minimize False Positives

11

Page 12: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

Comparing with Hash Table

12

65%

• Save 65% memory with 0.1% false positives

• More benefits over hash table– Performance degrades gracefully as tables grow– Handle worst-case workloads well

Page 13: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

BUFFALO Challenges

13

Page 14: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

False Positive Detection

• Multiple matches in the Bloom filters– One of the matches is correct– The others are caused by false positives

14

Nexthop 1

Nexthop 2

Nexthop T

……Packetdestination

query

Bloom Filters Multiple hits

Page 15: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

Handle False Positives• Design goals

– Should not modify the packet– Never go to slow memory– Ensure timely packet delivery

• BUFFALO solutions – Exclude incoming interface

• Avoid loops in “one false positive” case

– Random selection from matching next hops• Guarantee reachability with multiple false positives

15

Page 16: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

One False Positive• Most common case: one false positive

– When there are multiple matching next hops– Avoid sending to incoming interface

• Provably at most a two-hop loop– Stretch <= Latency(AB)+Latency(BA)

16

False positive

AA

Shortest path

BB

dst

Page 17: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

Multiple False Positives• Handle multiple false positives

– Random selection from matching next hops– Random walk on shortest path tree plus a few

false positive links– To eventually find out a way to the destination

17

dstdst

Shortest path tree for dst

False positive link

Page 18: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

Stretch Bound

• Provable expected stretch bound – With k false positives, proved to be at most– Proved by random walk theories

• However, stretch bound is actually not bad– False positives are independent– Probability of k false positives drops exponentially

• Tighter bounds in special topologies– For tree, expected stretch is polynomial in k

18

Ο(3k / 3)

Page 19: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

Stretch in Campus Network

19

When fp=0.001%99.9% of the packets have

no stretch

When fp=0.001%99.9% of the packets have

no stretch0.0003% packets have a stretch of shortest path

length

0.0003% packets have a stretch of shortest path

length

When fp=0.5%, 0.0002% packets have a stretch 6 times of shortest path

length

When fp=0.5%, 0.0002% packets have a stretch 6 times of shortest path

length

Page 20: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

BUFFALO Challenges

20

Page 21: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

Problem of Bloom Filters

• Routing changes– Add/delete entries in BFs

• Problem of Bloom Filters (BF)– Do not allow deleting an element

• Counting Bloom Filters (CBF)– Use a counter instead of a bit in the array– CBFs can handle adding/deleting elements– But, require more memory than BFs

21

Page 22: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

Update on Routing Change

• Use CBF in slow memory– Assist BF to handle forwarding-table updates– Easy to add/delete a forwarding-table entry

22

CBF in slow memory

BF in fast memory

Delete a route

Page 23: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

Occasionally Resize BF• Under significant routing changes

– # of addresses in BFs changes significantly– Re-optimize BF sizes

• Use CBF to assist resizing BF– Large CBF and small BF– Easy to expand BF size by contracting CBF

23

1 0

Hard to expand to size 4

CBF BF

Easy to contract CBF to size 4

Page 24: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

BUFFALO Switch Architecture

24

– Prototype implemented in kernel-level Click

Page 25: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

Prototype Evaluation

• Environment– 3.0 GHz 64-bit Intel Xeon– 2 MB L2 data cache, used as fast memory size M

• Forwarding table– 10 next hops– 200K entries

25

Page 26: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

Evaluation Results

• Peak forwarding rate– 365 Kpps, 1.9 μs per packet– 10% faster than hash-based EtherSwitch

• Performance with FIB updates– 10.7 μs to update a route– 0.47 s to reconstruct BFs based on CBFs

• On another core without disrupting packet lookup• Swapping in new BFs is fast

26

Page 27: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

Conclusion• Three properties of BUFFALO

– Small, bounded memory requirement– Gracefully increase stretch with the growth of forwarding

table– Fast reaction to routing updates

• Key design decisions– One Bloom filter per next hop– Optimizing of Bloom filter sizes– Preventing forwarding loops– Dynamic updates using counting Bloom filters

27

Page 28: BUFFALO: Bloom Filter Forwarding Architecture for Large Organizations Minlan Yu Princeton University minlanyu@cs.princeton.edu Joint work with Alex Fabrikant,

• Thanks!

• Questions?

28