fast routing table lookup based on deterministic multi-hashing

26
1 Fast Routing Table Lookup Based on Deterministic Multi- hashing Zhuo Huang , David Lin, Jih-Kwon Peir, Shigang Chen, S. M. Iftekharul Alam Department of Computer and Information Science and Engineering University of Florida

Upload: fisk

Post on 23-Feb-2016

62 views

Category:

Documents


0 download

DESCRIPTION

Fast Routing Table Lookup Based on Deterministic Multi-hashing. Zhuo Huang , David Lin, Jih-Kwon Peir, Shigang Chen, S. M. Iftekharul Alam Department of Computer and Information Science and Engineering University of Florida. Outline. Hash-based routing table lookup - PowerPoint PPT Presentation

TRANSCRIPT

Alternate Home

1Fast Routing Table Lookup Based on Deterministic Multi-hashingZhuo Huang, David Lin, Jih-Kwon Peir, Shigang Chen, S. M. Iftekharul AlamDepartment of Computer and Information Science and EngineeringUniversity of Florida

1Hi everyone: My name is zhuo huang. Today I will present our paper fast routing table , which is done by our group at university of florida.OutlineHash-based routing table lookupChallenges and current approachesOur solution: DM-HashRelated worksPerformance resultsConclusion2Here is the outline of todays speech. I will first go over the routing table lookup problem. After that, I will show you what is the major challenge and why current approach is not optimal. As the third part, I will show you our solution DM-Hash. The related works will be discussed afterwords. Finally, I will present the performance results and the conclusion2Routing Table LookupFind the Next Hop info for each incoming packet based on its destination address and the Routing Table.

3 Routing TablePrefixNext Hop01*Port A0100*Port B

01000000PrefixNext Hop01*Port A0100*Port B01000000 -> Port BPort APort BPort C01000000What is routing table lookup problem?

Routing table lookup is one of the most important and time consuming task of the network processors.

It searches the routing table to find the next hop information for each Here is an example of a routing table. PrefixLongest prefix match.3Three main approaches T-CAM based approachesLow latency high hardware and power costTrie based approachesLow power, less storage spaceLong lookup latencyHash based approachesPower efficient, good for large tableCollision issues, special support for LPM4There are three main approaches for the routing table lookups. Terent Content Addressable Memory.Trie are even worse for IPV6 for longer prefixes.4Hash-based IP LookupThe prefixes are stored in off-chip SRAM;Organized as buckets;Each bucket stores several prefixes;One bucket, one memory access.

5

IP-lookup Procedure for Length k6

Destination AddressUse the first k bitsHash UnitFetch from SRAMMatch?Matched Prefix and Routing InformationFor a particular prefix length;1 get the k bits2 hash the k bits to one bucket3 the bucket contains a small number of prefixes4 the whole bucket is fetched from the SRAM in one memory access to the network chip5 compare to find a match.

6Two Major ProblemsDetermine the prefix lengthVariable lengths in the routing tableBloom Filters, Prefix ExpansionFetch the bucket(s) from the off-chip SRAMBottleneck of the routing throughputOur target7As we can see from the previous slide, there are two major problems1.determin the lengthThis problem has be well studied. 2. Fetch the buckets from off-chip SRAM Thats our target

7Routing Throughputn prefixes, m bucketsMemory Bandwidth is B (bits/sec)Bucket size (bits) sIf the largest bucket has prefixeseach prefix takes l bitsS= * lNeeds to fetch t bucketsThe maximum routing throughput is B/(t*s) = B/ (t* * l)

8First, let me show you how the hash functions affects the routing throughput.

Go over the lines

From the last equation, we can see that B and l are determined but t and omega are decided by the hash function.8ChallengeA good hash function for hash-based routing table lookup should be:Optimal or nearly optimal bucket size; ( =n/m) 1 bucket access; (t=1)9Existing ApproachesSingle Hash:Easy to implement; 1-bucket accessLarge bucket sizeNon-deterministic Multiple Hash:Nearly optimal bucket sizeNeed to access multiple bucketsOnly achieve 1/k of the optimal throughput, if using k hash functions10Based on the previous requirement, lets see how the existing approaches performs. 10Deterministic Multi-hashingWhen placing a prefix, it can be placed to multiple bucketsReduce bucket sizeWhen searching a prefix, only one bucket needs to be searched;Reduce the number of fetched bucketsUse an index table to record where each prefix goesNearly optimal routing throughputs11In the paper, we propose a new hash scheme, DM-Hash to combine the pros from both the single hash and NM-Hash.In order to do that we need an index table to record.

11Index TableSimplest way:Record the choice for each prefixNeed a table at least as large as the routing tableA small table:Suitable to be placed on chipDifferent prefixes share the same entryEach prefix is hashed to multiple entries in the table12Now the problem is how to design the index table. 12DM-Hash13

Multiple hash functionsOn-chip Index table.Each entry stores a value Xor all the values to determine the bucketHow to setup it?Index Table SetupEach prefix is associated to multiple entries;Each entry is associated to multiple prefixes;The location of a prefix is determined as long as all the entries in the index table that it hashed to is assigned;The order matters!

1414Order ExampleFour Prefixes P0, P1, P2, P3;Index table: 4 entries: E0, E1, E2, E3;Hash to the index table:P0: -> E0, E3 P1: -> E1, E3 P2: -> E2, E3 P3: -> E0, E2Order: E0, E1, E2, E3;Order: E3, E2, E1, E0;E3, E2, E1, E0 is better!

15

15Progressive OrderFind a order to determine the entriesKey ideaBalance the number of prefixes decided by each entry during the setup

16Assign Values for the Index TableTry all the possible m values of the entry EGet m different ways to place the prefixes whose locations are determined by the value of EFind the most balanced one among the m possible choices 1717Results for Random Prefixes Put 1,000,000 Prefixes to 300,000 buckets:

Hash SchemeBucket SizePrefixes fetched per lookupPrefect44Single Hash15152-hash6123-hash51510-hash440DM-Hash (x=30K)66DM-Hash (x=60K)55DM-Hash (x=120K)4418Analysis How large the index table should be?Let x be the index table size

For m=300,000 n=1000,000, we get x>6718019

Related Works (1)Hashing Approaches:Multiple Hashing: Broder 2001;D-left Hashing: Bonomi 2006Cockoo Hashing: Demetriades 2008Peacock Hashing: Kumar 2008Perfect Hashing: Lu 200720Related Works (2)Bloom filters and its variance:Bloom filter: Dharmapurikar 2003Bloomier filter: Chazelle 2004Chisel: Hasan 2006Distributed and Load Balanced Bloom Filters: Song 200921Determine the Prefix Length22

On-Chip TCAMOff-chip SRAMExpanded to 23 bitsRouting Table Experiment5 largest routing tables;DM-Hash, Single-Hash, NM-Hash (2-left Hash);Vary the number of buckets from 16K to 2M;Throughput: Based on the fastest SRAM QDR SRAM III (72-bits block, 500M read/write operations per second)Assume each prefix and routing info takes 40 bits23Throughput24A future network processor needs to process >150 M packets per secondOur DM-Hash can achieve the throughput up to 250 M packets per second

Add line to 150 Only our approach and achieve that.Our 24ConclusionDM-Hash aims at the problem of fast routing table lookup;It minimizes both the size of each bucket and the number of buckets that needs to be fetched;It achieves over 250M table lookup per second;It can be applied to many other applications.2526Thanks!Questions?Prefixes

.

.

.

.

.

.

Buckets

NM-hash

.

.

.

DM-hash

Prefixes

+

+

.

.

.

Index Table

.

.

.

Buckets

P1

P1

P1

P1

P2

P2

P2

P2