Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Space-Efficient TCAM-based Classification Using Gray Coding Authors: Anat Bremler-Barr and Danny Hendler Publisher: IEEE INFOCOM 2007 Present: Chen-Yu.

Similar presentations


Presentation on theme: "1 Space-Efficient TCAM-based Classification Using Gray Coding Authors: Anat Bremler-Barr and Danny Hendler Publisher: IEEE INFOCOM 2007 Present: Chen-Yu."— Presentation transcript:

1 1 Space-Efficient TCAM-based Classification Using Gray Coding Authors: Anat Bremler-Barr and Danny Hendler Publisher: IEEE INFOCOM 2007 Present: Chen-Yu Lin Date: Dec,3, 2008

2 2 Outline Introduction Related works SRGE: Efficient Encoding of Short Ranges Hybrid SRGE Experimental results and comparative analysis

3 Introduction TCAMs are not well-suited for representing rules that contain range fields. The resulting range expansion can be dramatically reduce TCAM utilization. Observation : The majority of real-life database ranges are short. 60% unique length 40% length less than 20 This paper present a novel algorithm called Short Range Gray Encoding (SRGE). SRGE encodes range borders as binary reflected gray codes and represents the resulting range by a minimal set of ternary string. To the best of our knowledge, SRGE is the first algorithm that significantly reduces range expansion without resorting to use of extra bits. To further improve TCAM utilization, we use extra bits by employing hybrid- SRGE scheme. 3

4 Related works (1/3) Extended TCAM Implements range matching directly in hardware. This is a long-term solution. It seems changing the ternary nature of TCAM entries. Issues of TCAM range representation Prefix expansion Database dependent range encoding Database independent range encoding 4

5 Related works (2/3) Prefix expansion A traditional technique for range representation. The worst case expansion ratio for W-bit fields is 2W-2. For example : 2-bit. 5 12

6 Related works (3/3) Database dependent range encoding Use the extra bits available in TCAM entries for encoding ranges that occur in the database more efficiently. The encoding of a range may depend on the number of occurrences of the range in the database. [6][7] proposed hierarchical encoding schemes, however, that may reduce the expansion of range rules considerably complicates the task of incrementally updating. Our hybrid-SRGE scheme encodes the vast majority of ranges without using extra bits and use dependent encoding only for a very small number of ranges. Database independent range encoding Encode each range independently of the distribution of ranges in the database. 6

7 SRGE (1/9) Gray code A binary encoding of a contiguous range of integers such that the codes of any two adjacent numbers differ by a single bit. SRGE uses a specific Gray code called binary-reflected Gray code (BRGC). This reflection property of BRGC allows our algorithm to minimize the size of range cover sets. 7

8 SRGE (2/9) 8 SRGE example: range [6 - 14] 6 14 0101 1011 p

9 SRGE (3/9) 9 SRGE example: range [6 - 14] 6 14 1100 0100 p pl pr

10 SRGE (4/9) 10 Prefixes 1 = {010*} Prefixes 1 = {*10*} SRGE example: range [6 - 14] S’

11 SRGE (5/9) 11 SRGE example: range [6 - 14] S’ P’ pl’ pr’ 1110 1010

12 SRGE (6/9) 12 SRGE example: range [6 - 14] S’ P’ pl’ pr’ Prefixes 2 = {101*, 1001} Prefixes 2 = {1*1*, 1*01}

13 SRGE (7/9) 13 Prefixes 1 Prefixes 2

14 SRGE (8/9) 14

15 SRGE (9/9) The ternary strings in the cover set produced by the SRGE-cover procedure may overlap each other. Although some of the entries representing a range may overlap, the SRGE algorithm only requires a single TCAM lookup. If a key falls inside a range R, then the lookup will return the first matching entry that belongs to the cover of R. 15

16 Hybrid – SRGE (1/2) The size of TCAM entries is typically larger than the size of classification rules. This leaves a number of extra bits. To further improve TCAM utilization Use these extra bits by employing a database dependent hybrid – SRGE. The high-level idea is to assign a single extra bit to each of the ranges whose TCAM entries consumption is highest under SRGE encoding. X : # extra bits available in every TCAM entry. Hybrid – SRGE procedures: Compute a list of unique ranges that occur in the database. Sorted in decreasing order of the overall number of redundant entries. The first X ranges in the list is dealt with by using a standard database- dependent encoding. 16

17 Hybrid – SRGE (2/2) The well known range ≤ 1024 is the heaviest range under SRGE. Hybrid-SRGE assigns the first extra bit (bit 1) to the heaviest range. Each entry that contains a source port field with the range ≤ 1024 is set to 1, else set to *. Example: 17 Gray code representation *10 0*1 Applied dependent encoding

18 Experimental result & analysis (1/6) We evaluate the efficiency of the hybrid-SRGE scheme on 2 databases. real-life The collection of 126 separate files Total 223K rules which contain 280 unique ranges. Prefix expansion resulted in an expansion factor of 2.6 ~ 26% of rules contained range fields. Random database 18

19 Experimental result & analysis (2/6) 19 1.More than 60% of the unique ranges have length less than 20. 2.22% of the total number of unique ranges have length 2.

20 Experimental result & analysis (3/6) Notation definitions: D : a classification database n(D) : # rules in D n E (D) : # TCAM entries required to represent D using scheme E F E (D) : D’s database expansion factor using E r(D) : # range rules in D nr E (D) : # TCAM entries required to represent all of D’s range rules using encoding scheme E. FR E (D) : D’s range redundancy factor Database expansion factor Range redundancy factor 20

21 Experimental result & analysis (4/6) Evaluation SRGE on random databases A perfect encoding scheme will achieve a database expansion factor of 1. Will also have a range encoding redundancy factor of 0. 21 5 16% 5.5%

22 Experimental result & analysis (5/6) Evaluation hybrid-SRGE on real-life databases Our tests show that the hybrid-SRGE scheme success in reducing database expansion caused by range rules from a factor of 2.3 to a factor of only 1.03. 22

23 Experimental result & analysis (6/6) 23 For each range, we calculate its contribution as follows: # times it appears * # entries required to represent it 92%


Download ppt "1 Space-Efficient TCAM-based Classification Using Gray Coding Authors: Anat Bremler-Barr and Danny Hendler Publisher: IEEE INFOCOM 2007 Present: Chen-Yu."

Similar presentations


Ads by Google