NUMA-Aware Flow Table Queues for Lock-Free Packet Processing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In SDN networks, the efficiency of flow table management is reduced due to the use of a single thread or lock for managing flow table information, leading to cross-NUMA-node access issues, which degrades performance and affects network consistency and predictability.
Innovation Solution
A flow table management method using cascaded circular queues and an internal memory file system, where flow table information is allocated based on priority orders of multiple levels of queues without locks, ensuring efficient and lock-free management that supports NUMA architecture.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If a single thread or lock is used to manage flow table information, then consistency and sequentiality are ensured, but management efficiency and processing speed are reduced
Solution Approach 1:
The patent segments the flow table information pool into multiple queues (first-level, second-level, third-level) distributed across different NUMA nodes. Each queue independently manages a portion of flow table information, allowing multiple threads to concurrently access different queues without requiring a single global lock, thus improving management efficiency while maintaining consistency within each queue segment.
Solution Approach 2:
The patent introduces an atomic instruction mechanism as an intermediary to manage access to the segmented queues. Instead of using a single comprehensive lock, atomic instructions provide fine-grained synchronization that allows threads to safely access and modify queue structures without blocking other threads from accessing different queues, resolving the contradiction between consistency and efficiency.
2Device complexity
If flow table information is stored on a particular NUMA node, then memory access is simplified, but cross-NUMA-node access occurs when multiple threads request allocation, reducing management efficiency
Solution Approach 1:
The patent divides the flow table information pool into multiple segments distributed across different NUMA nodes, with each segment accessible to threads on that specific NUMA node. This segmentation eliminates cross-NUMA-node access for local threads while maintaining a simple memory access structure within each NUMA node, thus resolving the contradiction between structural simplicity and management efficiency.
Solution Approach 2:
The patent implements local quality by creating first-level queues that are locally optimized for each NUMA node, allowing threads to access flow table information from local memory without cross-NUMA-node access. Each NUMA node has its own dedicated queue structure, ensuring that local threads access local resources efficiently while the overall system maintains a unified flow table management approach.
3Productivity
If multiple threads concurrently access flow table information, then processing speed increases, but lock contention and cross-NUMA-node access increase, degrading performance
Solution Approach 1:
The patent segments the flow table information pool into multiple independent queues that can be concurrently accessed by different threads. By distributing queues across NUMA nodes and allowing threads to access local queues without acquiring global locks, the system enables true concurrent access that increases processing speed without the performance degradation caused by lock contention.
Solution Approach 2:
The patent implements a self-service mechanism where threads automatically access flow table information from locally allocated queues on their own NUMA node without requiring centralized lock management. This eliminates lock acquisition overhead and allows threads to independently manage their access to flow table information, achieving high concurrent processing speed without time loss due to locking.
Data Source
AI summary
A data packet processing method includes receiving flow table management requests transmitted from threads, at least one of the threads being run on a non-uniform memory access (NUMA) node; based on a flow table management request of a thread being a flow table allocation request allocating, based on priority orders of levels of flow table queues in a flow table information pool of an internal memory file system, a piece of flow table information to the thread based on no lock being acquired, the levels of flow table queues including a first-level flow table queue, a second-level flow table queue, and a third-level flow table queue; and based on the flow table management request being a flow table release request, storing, based on an atomic instruction, flow table information from the flow table release request in a third-level flow table queue.


