Presentation is loading. Please wait.

Presentation is loading. Please wait.

Author: Haoyu Song, Murali Kodialam, Fang Hao and T.V. Lakshman Publisher/Conf. : IEEE International Conference on Network Protocols (ICNP), 2009 Speaker:

Similar presentations


Presentation on theme: "Author: Haoyu Song, Murali Kodialam, Fang Hao and T.V. Lakshman Publisher/Conf. : IEEE International Conference on Network Protocols (ICNP), 2009 Speaker:"— Presentation transcript:

1 Author: Haoyu Song, Murali Kodialam, Fang Hao and T.V. Lakshman Publisher/Conf. : IEEE International Conference on Network Protocols (ICNP), 2009 Speaker: Han Jhen Guo Date: 2010.01.06 SCALABLE IP LOOKUPS USING SHAPE GRAPHS

2 INTRODUCTION Find that there are significant structural, or shape, similarities between different part of a lookup trie Exploit these similarities by using a new data structure that is called shape graphs to reduce structural redundancy, greatly improve upon the memory-efficiency of tries 2

3 INTRODUCTION - SHAPE GRAPHS Two trees are isomorphic if by switching a node’s left and right child nodes, along with the sub- trees they are rooted at, the two trees become identical  eg. There are 8 trie nodes, but there are only 4 (50%) unique isomorphic sub-trees 3 P0 P1 P3 P2 P4

4 INTRODUCTION - SHAPE GRAPHS The transformation of the trie data structure from a tree to a more compact graph where the compaction is accomplished using structural similarities in the trie give each unique isomorphic sub-tree a unique id starting from 1 (The id 0 is intentionally reserved for a NULL shape) 4 1 0 ? ?

5 INTRODUCTION - SHAPE GRAPHS Condensing all the trie nodes with the same label to one graph node and removing the redundant trie branches In reality (BGP AS1221 prefixes table), has more than 210K IPv4 prefixes 576,534 nodes but has only 48,762 (8%) unique isomorphic trees → lower memory consumption Too much loss of information that is inherent in the trie to perform IP lookups 5

6 INTRODUCTION - SHAPE GRAPHS Modification: construct the shape graphs with identical sub-trees In reality (BGP AS1221 prefixes table), has more than 210K IPv4 prefixes 576,534 nodes but has only 76,276 groups of identical sub- trees → # of trie nodes >> # of identical subtrees > # of isomorphic subtrees this modification still can cause a significant reduction in memory usage 6

7 SHAPE GRAPHS - COUNTING THE SHAPE AND LABELING THE TRIE 7 P1 P3 P2 P4 (1) (2) P0 (1) (3) (4) (5) 1→2→…→51→2→…→5 counter 0→30→3 shape id 0 0→20→2 0 0 →5 0→40→4 {1, 0}→ {0, 1}→ {2, 4}→ {3, 2}→

8 SHAPE GRAPHS - COUNTING THE SHAPE AND LABELING THE TRIE terminate the trie traversal as soon as all the shape ids have been accessed Some paths leading to a vertex may indicate valid prefixes while others may not vertex 2 actually maps to paths “0*” and “11*”, in which “11*” is a valid prefix but “0*” is not 8 P1 P3 P2 P4 (1) (2) P0 (1) (3) (4) (5) P2 P1 P3 P4 P0

9 SHAPE GRAPHS - LEAF PUSHING terminating vertex the only vertex in the shape graph that indicates all the valid prefixes, then if we reach this vertex, we know that we have matched a valid prefix and the matched prefix is implied by the walking path only the leaf trie nodes in the original trie can indicate valid prefixes 9

10 SHAPE GRAPHS - LEAF PUSHING Leaf pushing has the negative effect of expanding the prefix table size as well as the corresponding trie size results in fewer shapes the corresponding shape graph is smaller contains one less vertex than before offset of above two points for the AS1221 table, the shape graph after leaf pushing contains 51,962 vertices, a 32% reduction compared to the shape graph before leaf pushing 10

11 SHAPE GRAPHS - LEAF PUSHING 11 P1P0 P3P4P2 P1 nexthop P0 P2 P3 P4 P0 {111*}→ { 00*}→ {110*}→ {01*}→ {101*}→ {100*}→

12 SHAPE GRAPHS - MULTI-BIT SHAPE GRAPHS For improved throughput of single-bit shape graphs The multi-bit shape graph is derived from the binary shape graph Multi-bit shape graph with stride of 1, 2, and 3 12

13 SHAPE GRAPHS - AVOIDING PREFIX EXPANSION Prefix expansion is unlike the multi-bit trie where the next hop can be embedded into each trie node, the shape graph uses a hash table to store all the {prefix, nexthop} pairs When the stride is large, the expanded prefix table would become quite large 13

14 SHAPE GRAPHS - AVOIDING PREFIX EXPANSION Maintain a 2 s -bit bitmap in each vertex to indicate which group of edges are for the same original prefix, if they lead to the terminating vertex 14 0011010101 0011

15 SHAPE GRAPHS - PERFORMING IP LOOKUPS  eg. search IP = 11011 15 01 0 0 11 next vertex is NOT the terminating node → bitmap is unused next vertex is the terminating node → use bitmap → prefix length = 2(1+1)-log 2 2 = 3 → prefix = 110* s: stride k: traveled step → prefix length = t: consecutive 1s (or 0s) in the bitmap P1 nexthop P0 P2 P3 P4 P0 {111*}→ { 00*}→ {110*}→ {01*}→ {101*}→ {100*}→

16 SHAPE GRAPHS - INCREMENTAL UPDATE “lazy” deletion simplify the operation and save memory accesses  eg. delete prefix “100*” Insertion: the route processing software works on the leaf-pushing trie first and then modifies the shape graph and the hash table if necessary 16 P1 nexthop P0 P2 P3 P4 P2 P0 {111*}→ { 00*}→ {110*}→ {01*}→ {101*}→ {100*}→ P0 P1 P3 P2 P4

17 SHAPE GRAPHS - INCREMENTAL UPDATE 17 Illustration of the shape graph updates as the new prefixes “001*” is inserted not used in lookup but preserve *

18 SHAPE GRAPHS - INCREMENTAL UPDATE Illustration of the shape graph updates as the new prefixes “1100*” is inserted 18 *

19 SHAPE GRAPHS - INCREMENTAL UPDATE Illustration of the shape graph updates as the new prefixes “1111* ” is inserted 19 reused again

20 SHAPE GRAPHS - INCREMENTAL UPDATE Unused vertices should be recycled regularly (i.e. remove the unused vertices from the memory and reuse the corresponding shape ids for new shapes) to avoid exhausting the memory if otherwise unattended 20

21 IMPLEMENT CONSIDERATIONS - FAST SHAPE GRAPH LOOKUP Deploy multiple memory blocks and spread the graph vertices into them to improve the lookup throughput 21

22 IMPLEMENT CONSIDERATIONS - FAST SHAPE GRAPH LOOKUP Memory balance each memory block should roughly contain the same number of vertices so the memory block size Algorithm - min-max heuristic sort the vertices in decreasing weight order each graph vertex is associated with a weight which indicates the probability for it to be accessed by a prefix lookup assign each vertex in the current least weighted memory block according to the weight order; we repeat the process until all vertices are assigned 22

23 IMPLEMENT CONSIDERATIONS - EFFICIENT HASH TABLE CONSTRUCTION Assign the weight to the vertices static scheme a vertex with weight w means there are w prefixes passing through it dynamic scheme keeps track the access rate of each vertex and update their weight accordingly when a better vertex distribution is preferred, we run the algorithm and escort the affected vertices to their new host memory blocks 23

24 PERFORMANCE EVALUATION Number of trie nodes versus number of graph vertices the left side is for AS1221 and the right side is for Maewest A large table AS1221 that contains 215,454 prefixes A small table Maewest that contains 27,930 prefixes 24

25 PERFORMANCE EVALUATION Overall memory consumption comparison on two prefix tables 25

26 PERFORMANCE EVALUATION Memory consumption for different number of memory blocks 26 support k bloom filter (k prefix length); the prefixes with lengths that are not covered by the Bloom filters need to be expanded to multiple longer prefixes ← overhead!

27 PERFORMANCE EVALUATION The number of shape graph vertices vs. the number of multi-bit trie nodes for IPv6 forwarding tables the left side is for the IPv6 BGP table (900 prefixes) and the right side is for the synthesized IPv6 table (generate from the AS1221 IPv4 table, 215,518 prefixes) 27


Download ppt "Author: Haoyu Song, Murali Kodialam, Fang Hao and T.V. Lakshman Publisher/Conf. : IEEE International Conference on Network Protocols (ICNP), 2009 Speaker:"

Similar presentations


Ads by Google