In-Kernel WAN Optimization Router Datapath
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing WAN optimization solutions are expensive and do not fully meet customer needs, while kernel storage stacks introduce overhead that increases latency and reduces IOPS, especially with faster storage devices.
Innovation Solution
A WAN optimization method that utilizes an in-kernel end-to-end datapath in a router to optimize traffic flows by retrieving and reconstructing files directly from kernel memory, using DMA operations to transfer segments from disk storage, and employing a cache to manage segment storage and retrieval.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If complete kernel bypass through libraries (e.g., SPDK) is used to allow applications to access underlying devices directly, then I/O latency is reduced and throughput is improved, but applications are forced to implement their own file systems and poll for I/O completion, leading to wasted CPU cycles and high energy consumption
Solution Approach 1:
The invention segments the storage access function into two parts: the kernel bypass library handles direct device access and I/O operations, while a separate user-space file system implementation handles file system logic. This segmentation allows each component to operate independently and efficiently without forcing applications to implement both functions.
Solution Approach 2:
The invention introduces an intermediary component - a user-space file system library that mediates between applications and the kernel bypass I/O operations. This intermediary handles file system operations and I/O completion notifications without requiring applications to poll, thus reducing CPU cycle consumption while maintaining direct device access benefits.
2Productivity
If a dedicated CPU core is allocated per SPDK thread to avoid high latencies and reduced throughput, then I/O performance is improved, but hardware resources are consumed and system complexity increases
Solution Approach 1:
The invention makes CPU cores universal by allowing a single CPU core to handle multiple SPDK threads through cooperative scheduling. The user-space file system implementation can yield CPU execution voluntarily, allowing other threads to run on the same core, thus eliminating the need for dedicated CPU cores per thread while maintaining high IOPS performance.
Solution Approach 2:
The invention introduces dynamic CPU core allocation where CPU cores are not statically assigned to specific SPDK threads but are dynamically shared based on workload demands. The user-space file system can dynamically yield or acquire CPU time, allowing flexible resource utilization that adapts to changing I/O patterns without requiring dedicated cores.
3Ease of operation
If the kernel storage stack is used to manage storage operations, then applications can use standard file system interfaces, but I/O latency is doubled and both application-observed latency and IOPS are impeded
Solution Approach 1:
The invention creates a user-space copy of the file system implementation that mirrors the functionality of kernel-space file systems. This user-space file system library provides standard file system interfaces familiar to applications while operating outside the kernel storage stack, thus avoiding the latency overhead of kernel space operations while maintaining interface compatibility.
Data Source
AI summary
Some embodiments of the invention provide a WAN optimization method for optimizing traffic flows through a WAN connecting multiple sites each having at least one router. The method is performed in a kernel space of a first router at a first site. From a second router at a second site, the method receives, in an optimized data stream originating from a source device at the second site and destined to a destination device at the first site, a file including compressed segments not yet stored in a database of the first router. The method copies the compressed segments to a shared memory used with a decompression program operating in the first router's user space. For each compressed segment, the method receives, from the decompression program, a decompressed segment obtained by decompressing the compressed segment, and stores the decompressed segment in a kernel space memory for use in processing the file.


