TL;DR
This paper tackles the bottleneck of updating flow entries in TCAM-based OpenFlow switches, which is crucial for dynamic network management. They introduce "FastRule," a novel algorithm that significantly accelerates these updates by employing a greedy strategy and an efficient data structure, achieving up to 100x speedup over existing methods.
What Problem Does This Paper Address?
Software-Defined Networking (SDN) and OpenFlow have revolutionized network management by enabling dynamic reconfiguration. However, a critical challenge lies in the speed at which these changes can be applied to the network's data plane, specifically within the TCAM (Ternary Content Addressable Memory) of switches. TCAMs are optimized for fast lookups but are notoriously slow for updates. This slowness creates performance bottlenecks, especially in scenarios requiring rapid responses to network events like failures or traffic engineering. Existing solutions often focus on the control plane or employ algorithms that lead to numerous data movements within the TCAM, hindering overall efficiency. This paper aims to bridge this gap by proposing a data plane optimization for flow entry updates.
Methods
The core of the proposed solution is the FastRule algorithm, which operates in three stages:
- DAG Compiler: This stage converts a flow entry update request into a request for node insertion within a Directed Acyclic Graph (DAG). The DAG represents flow dependencies, helping to minimize unnecessary movements.
- Update Scheduler (Greedy Algorithm): This is the most innovative part. FastRule employs a greedy algorithm to determine the optimal sequence of TCAM entry movements. It iteratively selects the "best" candidate address for the new flow entry based on a "metric" that quantifies the impact on flow dependencies. To accelerate this selection, they explore three methods:
- On-demand: Computing metrics for all candidates each time.
- Pre-compute with array: Storing and updating metrics in an array.
- Pre-compute with BIT (Binary Indexed Tree): Utilizing a modified BIT for efficient minimum range queries, leading to a significant reduction in complexity.
- TCAM API: The generated update sequence is then applied to the physical TCAM.
The paper also discusses optimizations for different TCAM layouts, including a "separated layout" where flow entries are split into top and bottom sections with a free space in the middle, and different deletion strategies (dirty vs. balance delete).
Datasets
The paper evaluates FastRule using several datasets derived from real-world network configurations:
- Access Control List (ACL4, ACL5): Generated using the ClassBench policy generator.
- Firewall (Fw4, Fw5): Also generated using ClassBench.
- Routing Table (ROUTE): Derived from a publicly available L3 routing table (routeviews-rv2-20170606) and converted using ClassBench-ng.
They also generate synthetic flow update data for various flow table sizes (250 to 40k entries) to test scalability.
Key Insights and Ideas
- Flow dependency is key, but its management is the bottleneck: While DAGs are known to help manage flow dependencies, the actual process of updating TCAM entries based on these dependencies is where the real performance hit occurs.
- Greedy approach for TCAM updates: The paper demonstrates that a greedy strategy, which makes locally optimal choices at each step, can effectively construct an efficient TCAM update sequence.
- The power of BIT for minimum range queries: The modification of the Binary Indexed Tree data structure to efficiently find the minimum metric among candidate addresses is a crucial optimization that drastically reduces the algorithm's complexity.
- TCAM layout matters: Different TCAM layouts (original vs. separated) and deletion strategies (dirty vs. balance) have a significant impact on update performance, with separated layouts and dirty deletes generally showing better performance for insert-heavy workloads.
- Firmware time vs. TCAM update time: The paper clearly distinguishes between the time spent in the switch's firmware calculating the update sequence (firmware time) and the actual time taken to modify the TCAM (TCAM update time), showing significant improvements in the former.
Key Results
- FastRule achieves up to 100x faster firmware time compared to state-of-the-art solutions like RuleTris, particularly on larger flow tables.
- The algorithm's time complexity for calculating the update sequence is reduced to O(Cavg (log n)^2), where Cavg is the average diameter of the DAG and n is the TCAM size.
- The TCAM update time (the actual hardware modification) is shown to be largely unaffected by FastRule, meaning the speedup comes from the firmware's efficiency without introducing additional hardware overhead.
- The evaluation demonstrates that FastRule is scalable across various flow table sizes and types, maintaining its performance advantage.
- Different layouts and deletion strategies were analyzed, showing that while separated layouts with balance delete (FR-SB) can be slightly faster for inserts, dirty deletes (FR-SD) are more efficient when deletes are frequent.
Limitations and Future Work
- TCAM size limitations: The authors note that the physical TCAM size of their testbed switch (ONetSwitch) was small, requiring emulation for larger table sizes. While they argue their emulation method is accurate, it's not a direct hardware test for all scenarios.
- TCAM update time for balance delete: The paper highlights that the balance delete strategy in the separated layout (FR-SB) can be slower than other methods when delete operations are frequent, due to the overhead of moving existing entries.
- Future work: The paper implicitly suggests further exploration into optimizing delete operations, especially in different TCAM layouts, and potentially investigating hardware-assisted TCAM update mechanisms. The authors also mention the potential for applying their approach to other TCAM-based network devices beyond OpenFlow switches.
Summary updated