1 / 23

Space-Efficient TCAM-based Classification Using Gray Coding

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. Outline. Introduction Related works SRGE : Efficient Encoding of Short Ranges Hybrid SRGE

gdoris
Download Presentation

Space-Efficient TCAM-based Classification Using Gray Coding

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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. 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.

  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

  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 . 1 2

  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.

  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.

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

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

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

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

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

  13. SRGE (7/9) Prefixes1 Prefixes2

  14. SRGE (8/9)

  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.

  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.

  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: 0*1 Applied dependent encoding *10 Gray code representation

  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

  19. Experimental result & analysis (2/6) • More than 60% of the unique ranges have length less than 20. • 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 • nE(D) : # TCAM entries required to represent D using scheme E • FE (D) : D’s database expansion factor using E • r(D) : # range rules in D • nrE (D) : # TCAM entries required to represent all of D’s range rules using encoding scheme E. • FRE (D) : D’s range redundancy factor • Database expansion factor • Range redundancy factor

  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. 16% 5.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.

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

More Related