290 likes | 315 Views
TCAM Razor: A Systematic Approach Towards Minimizing Packet Classifiers in TCAMs. Authors: Chad R. Meiners, Alex X. Liu, Eric Torng Publisher: ICNP 2007 Present: Yu-Tso Chen Date: November, 6, 2007. Department of Computer Science and Information Engineering
E N D
TCAM Razor: A Systematic Approach Towards Minimizing Packet Classifiers in TCAMs Authors: Chad R. Meiners, Alex X. Liu, Eric Torng Publisher: ICNP 2007 Present:Yu-Tso Chen Date:November, 6, 2007 Department of Computer Science and Information Engineering National Cheng Kung University, Taiwan R.O.C.
Outline • 1. Introduction • 2. Definitions and problem description • 3. Multi-dimensional TCAM Mnimization • 4. Experimental Result • 5. Conclusion
Occam’s Razor • “Of two equivalent theories or explanations, all other things being equal, the simpler one is to be preferred.”
Introduction • TCAMs have their own limitations with respect to packet classification • a) Range expansion – TCAM only store rules that are encoded in ternary format • Source & Destination port numbers are specified in Ranges 30 prefixs are needed to represent the single range [1, 65534] 30 X 30 =900 TCAM entries
Encoding Considerations • Range expansions • Encoding ranges has a multiplicative effect • [1,14] => 0001, 001*, 01**, 10**, 110*, 1110 • [1,14] /\ [1,14] => 6 × 6 = 36 entries • 1 rule can lead to over 900 TCAM entries. • Each port interval can leads to 30 rules • w-bit interval => 2w-2 maximum entries • Prefix Encoding • Standard practice to encode entries in prefix format • Each field is in prefix format • Minimizing arbitrary ternary lists is NP-hard
TCAM Challenges • b) Low capacity • – Maximum of 18 Mb • – 2 Mb and 1Mb modules are the most popular • – Each entry has 144 bits • c) Larger capacity consumes more energy • – More power, more heat • – Cooling is a concern • d) Larger capacity consumes more board space • e) Larger capacity is more expensive • – 1Mb module is ~ $250
Outline • 1. Introduction • 2. Definitions and problem description • 3. Matching of Individual Patterns • 4. Selective Grouping of Multiple Patterns • 5. Evaluation Result • 6. Conclusion
Definitions and problem description • Reducing the number of rules in a TCAM directly 900 entries 6 entries
Our solution:TCAM Razor • Above problem is NP-hard, we using three techniques • Decision diagrams • Dynamic programming • Redundancy removal
Our solution:TCAM Razor • Our solution consists of four basic step • 1)Convert a given packet classifier to a reduced decision diagram • 2)Every non-terminal node in the decision diagram minimize the number of prefixs associated with its outgoing edges using dynamic programming • 3)Generate rules from the decision diagram • 4)Remove redundant rules
Outline • 1. Introduction • 2. Definitions and problem description • 3. Multi-dimensional TCAM Mnimization • 4. Experimental Result • 5. Conclusion
From single to Multiple dimension • First step of TCAM Razor is to convert rules into an FDD (Firewall Decision Diagram)
Multi-dimensional TCAMMinimization • Work from the bottom up V2 V3 V1
MINIMUM PACKET CLASSIFIER • 10** (with decision accept and cost 1) • 0 *** (with decision discard and cost 1) • 11** (with decision discard and cost 1)
MINIMUM PACKET CLASSIFIER • 1000 (with decision V2and cost 1) • 101* (with decision V2 and cost 1) • 0 *** (with decision V3 and cost 1) • 1001 (with decision V3 and cost 1) • 11** (with decision V3 and cost 1) V1
Solution Composition V2 V3 V1 Redundant
Outline • 1. Introduction • 2. Definitions and problem description • 3. Multi-dimensional TCAM Mnimization • 4. Experimental Result • 5. Conclusion
Experimental Data • Real-life Packet Classifiers • 42 actual classifiers • 17 structurally distinct classifiers • Synthetic Packet Classifiers • Difficult to get real-life packet classifiers • 18 sets of 100 uniformly sized classifiers • Randomly generated • Generated to look like real classifiers
Experimental Metrics • Direct Rule Expansion Direct(f) • Number of rules produced by encoding classifier f into prefix format • Each rule is the expansion of the minimal prefix representations of each interval • Algorithm application A(f) • Number of prefix rules produced applying algorithm A on classifier f • TCAM Razor • Redundancy Removal
Experimental Metrics • For a set of classifiers S
Experimental Factors • Field Ordering • FDD field order results in a substantial difference • 5! = 120 permutations • Permutation 49 is the best with an average compression of 18.2% • (Source IP, Protocol type, Dest. IP, Dest. Port, Source Port) • TCAM Razor(B) – TCAM Razor using the best of the permutations for f
Compression Ratios • TCAM Razor: 18.2% average compression ratio • Redundancy Removal: 41.8%
Compression Ratios • 13 of 17 classifiers have less than 1%
Synthetic Packet Classifiers • Average compression ratio – .046 • Total compression ratio – .016
Synthetic Packet Classifiers • Average expansion ratio – 8.737 • Total expansionratio – 3.082
Outline • 1. Introduction • 2. Definitions and problem description • 3. Multi-dimensional TCAM Mnimization • 4. Experimental Result • 5. Conclusion
Concluding Remarks • TCAM Razor usually produces significant space savings • 82% reduction in TCAM entries on average • No hardware modification • Can be used to improve existing hardware