In-Kernel WAN Optimization Datapath for Router Storage Latency
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing WAN optimization solutions are expensive and do not fully meet customer needs, and the kernel storage stack introduces significant overhead, leading to increased latency and reduced IOPS as storage devices become faster.
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 move segments from disk storage to kernel memory, and employing a cache to manage segment storage and retrieval.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
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 must implement their own file systems and poll for I/O completion leading to wasted CPU cycles and high energy consumption
Solution Approach 1:
The patent introduces a kernel module as an intermediary between the application and the storage device. This kernel module handles I/O operations through a polling mechanism controlled by a threshold parameter, mediating between the application's need for direct access and the kernel's resource management requirements. The kernel module can switch between polling and interrupt-driven modes based on the threshold, optimizing the balance between latency and CPU consumption.
2Productivity
If a dedicated CPU core is allocated per SPDK thread to maintain low latency and high throughput, then I/O performance is improved, but system resource utilization decreases and hardware requirements increase
Solution Approach 1:
The patent implements dynamic CPU core allocation where the same CPU core can be shared between application execution and I/O operations. The kernel module dynamically switches between handling application requests and performing I/O polling based on a threshold parameter, allowing flexible resource allocation without dedicating separate cores for I/O operations.
3Ease of operation
If the kernel storage stack is used to manage storage operations, then application development is simplified, but I/O latency is doubled and IOPS are reduced due to kernel overhead
Solution Approach 1:
The patent performs preliminary actions by pre-allocating buffers and preparing I/O operations in the kernel module before actual data transfer. The kernel module pre-configures the polling mechanism and threshold parameters in advance, allowing rapid response to I/O requests without the overhead of traditional kernel storage stack processing during actual data operations.
Applied Scientific Principles
This section explains which scientific principles are used to turn an abstract innovation direction into a practical engineering solution.
Function Achieved in This Case
This approach reduces latency and improves throughput by minimizing the overhead of the kernel storage stack and allowing direct access to underlying devices, while also reducing the need for intrusive application-level changes or new hardware.
Implementation Method 1
the method performs an operation to DMA (direct memory access) the particular segment into the kernel memory from a disk storage of the first router
Data Source
AI summary
Some embodiments of the invention provide a WAN optimization method for optimizing traffic flows through a WAN. 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 from a second site source device to a first site destination device, a file including compressed segments not yet stored by the first router, and copies the compressed segments to a memory shared with a decompression program in the first router's user space. For each compressed segment, the method receives a notification that a decompressed segment obtained by decompressing the compressed segment has been written to a disk storage of the first router, the notification including a block address for the decompressed segment, and updates a cache of the first router with an entry mapping the decompressed segment to the block address.


