Virtually Cool Ternary Content Addressable Memory Suparna - - PowerPoint PPT Presentation

virtually cool ternary content addressable memory
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 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

slide-2
SLIDE 2

2

Content Word 0C1 Content Word 1C1 Content Word 2C1

...

Content Word nC1 Matchlines Search WordC1 Searchlines Location Addressed Store (LAS)

Ternary Content Addressable Memory (TCAM)

– Fast (constant time) key lookup

  • Parallel match on large data array
slide-3
SLIDE 3

3

0 0 0 0 1 1 0 * * * * 1 0 1 * * 0 0 0 0 1 1 * * ... 0 0 0 1 0 0 1 1

Matchlines Searchlines

Ternary Content Addressable Memory (TCAM)

– 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 TCAM RAM

slide-4
SLIDE 4

4

Search word

0 0 0 0 1 1 0 * * * * 1 0 1 * * 0 0 0 0 1 1 * * ... 0 0 0 1 0 0 1 1

Matchlines * * 0 0 0 1 1 0 1 Searchlines

Ternary Content Addressable Memory (TCAM)

– 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 0 0 0 0 1 1 0 * 0 0 0 0 1 1 * * TCAM RAM

slide-5
SLIDE 5

5

Search word

0 0 0 0 1 1 0 * * * * 1 0 1 * * 0 0 0 0 1 1 * * ... 0 0 0 1 0 0 1 1

Matchlines * * 0 0 0 1 1 0 1 Searchlines

TCAM

Assoc. RAM LAS

Ternary Content Addressable Memory (TCAM)

– 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

Meiners et al, 2010: Fast regular expression matching using small TCAMs for network intrusion detection and prevention

0 0 0 0 1 1 0 * 0 0 0 0 1 1 * * TCAM RAM Example: Encoding a DFA in TCAM

slide-6
SLIDE 6

6

**C* **C* *B** *B** A*** A*** *BCD *BC AB*D AB*D ABC* ABC* ABCD ABCD

A TCAM is a Natural Candidate for Representation of Space/Time Efficient Associative Search Structures

  • Subset query – Ternary Bloom Filter
  • Similarity search

– Ternary Locality Sensitive Hashing (TLSH) – Approximate nearest neighbor

  • Regular expression pattern matching

– Compact DFA in TCAM

  • Database join

– Multi-match exploitation

  • More flexible than radix tree, grid of

tries, hash table

– different constraints (only power of 2 ranges, not ordered, fixed width)

Parallel matching construct on a wild-card storage - powerful abstraction Ability to simultaneously search through a large number of sub-spaces of a (typically sparse) fixed dimensional space.

ABC AB* A*C *BC *B* *C* ***

data

A** B C A A** 1** 0*0

data data data data

*00 Lattice view 3D attrib to data associations A,B,C: attrib dimensions Sub-spaces view *01

slide-7
SLIDE 7

7

But the Parallel Match Circuit Has a High Power Cost

MB/ chip $/chip $/MB Spee d (ns) Watts /chip Watts/ MB DRAM 128 10-20 0.08- 0.16 40-80 1-2 0.008 - 0.016 SRAM 9 50-70 5.5- 7.8 3-5 1.5-3 0.17- 0.33 TCAM 4.5 200- 300 44.5- 66.7 4-5 15-20 3.33 - 4.44

Agarwal & Sherwood 2008: TCAM Power and Delay Model Pagiamtzis et al 2006: CAM Circuits and Architectures: Tutorial & Survey Goel & Gupta, SIGMETRICS'10: Small Subset Queries Using Ternary Bloom Filters

Mismatches are an

  • verhead
slide-8
SLIDE 8

IBM Confidential

Content Addressable Store (TCAS) Level 1 Content Addressable Store (TCAS) Level 2 Content-Based Cache Location Addressable Hierarchical Store (LAS) Location Based Cache

Content Based Page

Content Addressable Virtual Memory Hierarchy

  • Content Locality

– Contiguity in content key-space – Physically dispersed

  • Content-Based Page

– Sub-space range in content key space – Entries may be physically dispersed – Different from traditional paging !

  • Classifying workload

content locality

– Rare Hits – Frequent Item Hits – Nearby Item Hits – Random Hits

slide-9
SLIDE 9

IBM Confidential

01011 * 11101000 01011 * 11101001 01011 * 11101010 01011 * 11101011 01011* 111010 * * Virtual Content Space Physical representation (P1, P3, PN in Level 1) P1 P2 P3 PN Content Block Level 2 CA-Store Level 1 CA-Store Content Cache Content Pages ...

Example: Virtual Content Space to TCAS Mapping

slide-10
SLIDE 10

IBM Confidential

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 ? – ??

slide-11
SLIDE 11

IBM Confidential

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

Example: Virtual Content Space to TCAS Mapping

slide-12
SLIDE 12

IBM Confidential

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

slide-13
SLIDE 13

IBM Confidential

Today is the 150th 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.”