Graph Partitioning for Scalable Longest Prefix Matching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current Ternary Content Addressable Memories (TCAMs) face challenges with scalability and power consumption, especially when dealing with ternary keys containing wildcards, and algorithmic approaches struggle with chaotic wildcard distributions, limiting their performance and scalability in search applications.

Innovation Solution

The proposed solution involves partitioning ternary keys into sub-tables represented as sub-graphs, where each sub-table is searched in parallel by a fixed number of execution threads, optimizing the architecture for longest prefix matching (LPM) by locating specified bits in most significant positions and wildcards in least significant bits, and constructing graphs that require only single node processing for lookups, with the ability to handle wildcard bits efficiently.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If TCAM is used for ternary key search, then search performance is high and deterministic, but power consumption is extreme and scalability is limited

Engineering Contradiction:
Improvesearch performanceVSAvoidpower consumption
Core Design Contradiction:
ReliabilityVSUse of energy by stationary object

Solution Approach 1:

The patent divides the TCAM into multiple sub-TCAMs, each handling a specific subset of ternary keys. This segmentation allows the system to maintain high search performance for each subset while reducing the overall power consumption compared to a single large TCAM, and enables scalability by adding more sub-TCAMs as needed.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes the operating parameters by introducing a threshold parameter that determines when to use TCAM versus algorithmic search. By dynamically adjusting this threshold based on key characteristics (number of wildcards), the system optimizes the balance between power consumption and search performance.

Inventive Principle:
Principle #35Parameter changes

2Use of energy by stationary object

If algorithmic approach is used for ternary key search, then power consumption is reduced, but performance deteriorates when wildcards are distributed chaotically

Engineering Contradiction:
Improvepower consumptionVSAvoidsearch performance
Core Design Contradiction:
Use of energy by stationary objectVSReliability

Solution Approach 1:

The patent uses the number of wildcards in a key as a parameter to determine the search strategy. When the number of wildcards is below a threshold, algorithmic search is used (low power). When the number of wildcards exceeds the threshold, TCAM search is used (high performance). This parameter-based decision optimizes both power consumption and performance.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent dynamically switches between algorithmic search and TCAM search based on the characteristics of the query key. This dynamic adaptation allows the system to optimize performance and power consumption in real-time, rather than using a fixed approach.

Inventive Principle:
Principle #15Dynamics

3Quantity of substance

If TCAM scales to larger capacity, then more keys can be stored, but scalability is limited to a few hundred thousand keys

Engineering Contradiction:
Improvenumber of keysVSAvoidscalability
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The patent segments the large TCAM into multiple smaller sub-TCAMs, each manageable in size. This allows the system to scale by adding more sub-TCAMs rather than building a single enormous TCAM, improving scalability while maintaining the ability to store large numbers of keys.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent adds a dimensional aspect by introducing multiple levels of search (algorithmic search for some keys, TCAM search for others). This multi-dimensional approach to search allows the system to handle larger key spaces than a single TCAM level could accommodate.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

4Productivity

If graph partitioning is applied to sub-tables, then computational overhead is reduced and parallel processing is enabled, but device complexity increases

Engineering Contradiction:
Improvesearch efficiencyVSAvoidsystem architecture
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the search system into multiple independent sub-TCAMs that can be processed in parallel. Each sub-TCAM handles a specific partition of keys, allowing concurrent search operations that reduce overall computational overhead and improve productivity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary partitioning of keys into subsets that are assigned to different sub-TCAMs. This preliminary organization enables efficient parallel processing during search operations, as each sub-TCAM can independently process its assigned subset without coordination overhead.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20240354305A1Method and system for efficient partitioning and construction of graphs for scalable high-performance longest prefix matching
Publication Date: 2024.10.24 ALTERA CORP
  • US20240354305A1 patent drawing
  • US20240354305A1 patent drawing
  • US20240354305A1 patent drawing

AI summary

Methods, apparatus, and systems for efficient partitioning and construction of graphs for scalable high-performance search applications. In one aspect a graph-based method for performing a longest prefix match (LPM) is disclosed. A plurality of ternary keys and created or accessed, each representing an Internet Protocol (IP) mask and having a length w and a number of specific bits comprising a prefix length followed by one or more wildcards. The ternary keys are partitioned into subsets as a function of the prefix lengths of the ternary keys. For each subset, a graph is constructed, and the graph is stored in memory. The graphs are searched for a match for an IP address. A result associated with the graph associated with the subset of prefixed with the longest prefix length is returned. Associated apparatus and systems for implementing the methods are also disclosed. In some embodiments, a graph memory engine (GME) is used.