Download presentation
Presentation is loading. Please wait.
Published byReina Westbrook Modified over 10 years ago
2
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
3
Outline Hash-based routing table lookup Challenges and current approaches Our solution: DM-Hash Related works Performance results Conclusion 2
4
Routing Table Lookup Find the Next Hop info for each incoming packet based on its destination address and the Routing Table. 3 Routing Table PrefixNext Hop 01*Port A 0100*Port B 01000000 PrefixNext Hop 01*Port A 0100*Port B 01000000 -> Port B Port A Port B Port C 01000000
5
Three main approaches T-CAM based approaches Low latency high hardware and power cost Trie based approaches Low power, less storage space Long lookup latency Hash based approaches Power efficient, good for large table Collision issues, special support for LPM 4
6
Hash-based IP Lookup The prefixes are stored in off-chip SRAM; Organized as buckets; Each bucket stores several prefixes; One bucket, one memory access. 5
7
IP-lookup Procedure for Length k 6 Destination Address Use the first k bits Hash Unit Fetch from SRAM Match? Matched Prefix and Routing Information
8
Two Major Problems Determine the prefix length Variable lengths in the routing table Bloom Filters, Prefix Expansion… Fetch the bucket(s) from the off-chip SRAM Bottleneck of the routing throughput Our target 7
9
Routing Throughput n prefixes, m buckets Memory Bandwidth is B (bits/sec) Bucket size (bits) s If the largest bucket has Ω prefixes each prefix takes l bits S= Ω * l Needs to fetch t buckets The maximum routing throughput is B/(t*s) = B/ (t* Ω * l) 8
10
Challenge A good hash function for hash- based routing table lookup should be: Optimal or nearly optimal bucket size; (Ω =n/m) 1 bucket access; (t=1) 9
11
Existing Approaches Single Hash: Easy to implement; 1-bucket access Large bucket size Non-deterministic Multiple Hash: Nearly optimal bucket size Need to access multiple buckets Only achieve 1/k of the optimal throughput, if using k hash functions 10
12
Deterministic Multi-hashing When placing a prefix, it can be placed to multiple buckets Reduce bucket size When searching a prefix, only one bucket needs to be searched; Reduce the number of fetched buckets Use an index table to record where each prefix goes Nearly optimal routing throughputs 11
13
Index Table Simplest way: Record the choice for each prefix Need a table at least as large as the routing table A small table: Suitable to be placed on chip Different prefixes share the same entry Each prefix is hashed to multiple entries in the table 12
14
DM-Hash 13 Multiple hash functions On-chip Index table. Each entry stores a value Xor all the values to determine the bucket How to setup it?
15
Index Table Setup Each 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! 14
16
Order Example Four Prefixes P 0, P 1, P 2, P 3 ; Index table: 4 entries: E 0, E 1, E 2, E 3 ; Hash to the index table: P 0 : -> E 0, E 3 P 1 : -> E 1, E 3 P 2 : -> E 2, E 3 P 3 : -> E 0, E 2 Order: E 0, E 1, E 2, E 3 ; Order: E 3, E 2, E 1, E 0 ; E 3, E 2, E 1, E 0 is better! 15
17
Progressive Order Find a order to determine the entries Key idea Balance the number of prefixes decided by each entry during the setup 16
18
Assign Values for the Index Table Try all the possible m values of the entry E Get m different ways to place the prefixes whose locations are determined by the value of E Find the most balanced one among the m possible choices 17
19
Results for Random Prefixes Put 1,000,000 Prefixes to 300,000 buckets: Hash SchemeBucket SizePrefixes fetched per lookup Prefect44 Single Hash15 2-hash612 3-hash515 10-hash440 DM-Hash (x=30K)66 DM-Hash (x=60K)55 DM-Hash (x=120K)44 18
20
Analysis How large the index table should be? Let x be the index table size For m=300,000 n=1000,000, we get x>67180 19
21
Related Works (1) Hashing Approaches: Multiple Hashing: Broder 2001; D-left Hashing: Bonomi 2006 Cockoo Hashing: Demetriades 2008 Peacock Hashing: Kumar 2008 Perfect Hashing: Lu 2007 20
22
Related Works (2) Bloom filters and its variance: Bloom filter: Dharmapurikar 2003 Bloomier filter: Chazelle 2004 Chisel: Hasan 2006 Distributed and Load Balanced Bloom Filters: Song 2009 21
23
Determine the Prefix Length 22 On-Chip TCAM Off-chip SRAM Expanded to 23 bits
24
Routing Table Experiment 5 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 bits 23
25
Throughput 24 A future network processor needs to process >150 M packets per second Our DM-Hash can achieve the throughput up to 250 M packets per second
26
Conclusion DM-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. 25
27
26 Thanks! Questions?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.