virtually cool ternary content addressable memory
play

Virtually Cool Ternary Content Addressable Memory Suparna - PowerPoint PPT Presentation

Virtually Cool Ternary Content Addressable Memory Suparna Bhattacharya, K Gopinath IBM, Indian Institute of Science HotOS XIII, May, 2011 Thanks to Bob Montoye, Vijaylakshmi Srinivasan, Bipin Rajendran, Richard Freitas, John Karidis, C Mohan


  1. Virtually Cool Ternary Content Addressable Memory Suparna Bhattacharya, K Gopinath IBM, Indian Institute of Science HotOS XIII, May, 2011 Thanks to Bob Montoye, Vijaylakshmi Srinivasan, Bipin Rajendran, Richard Freitas, John Karidis, C Mohan and Jai Menon

  2. 2 Ternary Content Addressable Memory (TCAM) Matchlines Content Word 0 C1 Content Word 1C 1 Location Addressed Content Word 2C1 Store (LAS) ... Content Word nC 1 Searchlines Search WordC 1 – Fast (constant time) key lookup • Parallel match on large data array

  3. 3 Ternary Content Addressable Memory (TCAM) TCAM Matchlines RAM 0 0 0 0 1 1 0 * * * * 1 0 1 * * 0 0 0 0 1 1 * * ... 0 0 0 1 0 0 1 1 Searchlines – Fast (constant time) key lookup • Parallel match on large data array – Ternary data: 0, 1, * ( “don't care bit” ) • Binary wild-card storage – Used in High Perf. Network routers

  4. 4 Ternary Content Addressable Memory (TCAM) TCAM Matchlines RAM 0 0 0 0 1 1 0 * 0 0 0 0 1 1 0 * * * * 1 0 1 * * 0 0 0 0 1 1 * * 0 0 0 0 1 1 * * ... 0 0 0 1 0 0 1 1 Searchlines * * 0 0 0 1 1 0 1 Search word – Fast (constant time) key lookup • Parallel match on large data array – Ternary data: 0, 1, * ( “don't care bit” ) • Binary wild-card storage – Used in High Perf. Network routers

  5. 5 Ternary Content Addressable Memory (TCAM) TCAM Matchlines RAM Assoc. TCAM LAS 0 0 0 0 1 1 0 * 0 0 0 0 1 1 0 * RAM * * * 1 0 1 * * 0 0 0 0 1 1 * * 0 0 0 0 1 1 * * ... 0 0 0 1 0 0 1 1 Searchlines * * 0 0 0 1 1 0 1 Search word – Fast (constant time) key lookup • Parallel match on large data array Example: Encoding a DFA in TCAM – Ternary data: 0, 1, * ( “don't care bit” ) Meiners et al, 2010: Fast regular expression matching • Binary wild-card storage using small TCAMs for network intrusion detection and – Used in High Perf. Network routers prevention

  6. 6 A TCAM is a Natural Candidate for Representation of Space/Time Efficient Associative Search Structures ABCD data ABCD ABC  Subset query – Ternary Bloom Filter Lattice view data 3D attrib to data  Similarity search ABC* AB*D *BCD ABC* AB*D *BC A*C *BC associations AB* data – Ternary Locality Sensitive Hashing (TLSH) A,B,C: attrib dimensions – Approximate nearest neighbor **C* A*** *B** **C* A*** *B** *C* A** A** *B*  Regular expression pattern matching data – Compact DFA in TCAM data *** *01  Database join – Multi-match exploitation *00  More flexible than radix tree, grid of C 0*0 tries, hash table A B 1** – different constraints (only power of 2 Sub-spaces ranges, not ordered, fixed width) view Parallel matching construct on a wild-card storage - powerful abstraction Ability to s imultaneously search through a large number of sub-spaces of a (typically sparse) fixed dimensional space.

  7. 7 But the Parallel Match Circuit Has a High Power Cost Agarwal & Sherwood 2008: TCAM Power and Delay Model Pagiamtzis et al 2006: CAM Circuits and Architectures: Tutorial & Survey Mismatches MB/ $/chip $/MB Spee Watts Watts/ are an chip d (ns) /chip MB overhead DRAM 128 10-20 0.08- 40-80 1-2 0.008 - 0.16 0.016 SRAM 9 50-70 5.5- 3-5 1.5-3 0.17- 7.8 0.33 TCAM 4.5 200- 44.5- 4-5 15-20 3.33 - 300 66.7 4.44 Goel & Gupta, SIGMETRICS'10: Small Subset Queries Using Ternary Bloom Filters

  8. Content Addressable Virtual Memory Hierarchy  Content Locality – Contiguity in content Content-Based Cache Location Based Cache key-space – Physically dispersed  Content-Based Page – Sub-space range in Content Addressable content key space Store (TCAS) – Entries may be Level 1 physically dispersed Location – Different from Addressable Content traditional paging ! Hierarchical Based Page Store (LAS)  Classifying workload content locality Content Addressable Store (TCAS) – Rare Hits Level 2 – Frequent Item Hits – Nearby Item Hits – Random Hits IBM Confidential

  9. Example: Virtual Content Space to TCAS Mapping Virtual Content Space Physical representation (P1, P3, PN in Level 1) Content Pages Content Cache P1 01011* 111010 * * P2 Level 1 CA-Store Content Block P3 ... 01011 * 11101000 01011 * 11101001 PN 01011 * 11101010 01011 * 11101011 Level 2 CA-Store IBM Confidential

  10. Many interesting questions arise, let us explore one of them in a little more detail...  How do we save and find TCAM entries that have been paged out to DRAM ? – Representing ternary content words in a binary store • Easy: with extra bits – Indexing ternary content words in a location addressable store • What in-memory data structures should we use ? – Hash tables ? – Integer radix tree ? – ?? IBM Confidential

  11. Example: Virtual Content Space to TCAS Mapping Virtual Content Space Physical representation Physical representation (P1, P3, PN in Level 1) after page-out of P1 & P3 01011 * 111010 * * Content Pages Content Cache Content Cache P1 * * * * * * 01011* 111010 * * 01011 * 111010 * * P2 Level 1 CA-Store Level 1 CA-Store Content Block P3 ... 01011 * 11101000 01011 * 11101001 PN 01011 * 11101010 01011 * 11101011 Level 2 CA-Store Level 2 CA-Store IBM Confidential

  12. Implementation Challenges, Design Issues, Debates ...  Feasibility and Potential: e.g. Power-perf-cost trade-off – Understand content locality/working sets of existing workloads – TCAM extensions for efficient multi-match ? – PCM(Phase Change Memory) based TCAM ?  TCAS(Ternary Content Addr Store) & LAS(Location Addr Store) management – Esp. concurrency, sharing ...  Choice of interface: How should the abstraction be exposed to applications ? – Fully transparent vs Exposed interface ?  What new possibilities could be opened up if we make content addressability a first class abstraction in virtual memory design ? – Too radical or outrageous to be worth it ? – Or so crazy that it just might work ? – The good news is that it doesn't need to be that radical unless it makes sense – e.g. compatibility with location based addressing straightforward IBM Confidential

  13. Today is the 150 th birth-anniversary of Rabindranath Tagore Bengali Poet, writer, philosopher, Nobel laureate “... where words come out from the depth of truth, where tireless striving stretches its arms towards perfection, where the clear stream of reason has not lost its way into the dreary desert sand of dead habit ...” “ ... Pearl fishers dive for pearls, merchants sail in their ships, while children gather pebbles and scatter them again. They seek not for hidden treasures, they know not how to cast nets.” IBM Confidential

Recommend


More recommend