Server Polling Thread Mode Switching for Latency-Power Control
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing packet transfer methods in virtualized environments suffer from increased power consumption and latency due to constant CPU usage and software interrupt processing, particularly in dense traffic conditions.
Innovation Solution
A server delay control device is implemented as a polling thread in the kernel or user space, with mode switching between sleep and busy poll modes based on traffic frequency, using a traffic frequency measurement unit and mode switching control to optimize CPU usage and reduce latency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Loss of time
If a polling thread constantly monitors packet arrival to reduce latency, then packet processing latency is reduced, but CPU power consumption increases
Solution Approach 1:
The polling thread dynamically adjusts its operation mode based on traffic conditions. During sparse traffic, the thread enters sleep mode to save power. During dense traffic, the thread activates continuous polling to minimize latency. This dynamic adaptation resolves the contradiction by making the system responsive to actual workload conditions rather than operating at constant high performance or constant power saving mode.
Solution Approach 2:
The system changes the operational parameter of the polling thread from continuous active polling to sleep mode based on traffic density detection. By monitoring traffic patterns and adjusting the thread's state accordingly, the system achieves low latency when needed while conserving power during normal conditions, thus resolving the latency-power consumption tradeoff.
2Ease of operation
If software interrupt processing is used for packet transfer, then packet processing can be delegated to kernel, but processing latency increases due to interrupt overhead and queueing
Solution Approach 1:
The invention extracts the packet processing function from the kernel's interrupt-driven model and places it in user space via the polling thread. This separation allows the polling thread to directly monitor and process packets without going through kernel interrupt handling, thereby eliminating interrupt overhead and reducing latency while maintaining ease of operation through direct user-space control.
Solution Approach 2:
The system replaces the mechanical interrupt-based packet processing mechanism with a polling-based approach. Instead of relying on hardware interrupts to trigger kernel processing, the polling thread actively checks for packets in a ring buffer, substituting the interrupt mechanism with a direct polling mechanism that avoids interrupt overhead and queueing delays.
3Productivity
If DPDK is used for high-speed packet processing, then packet processing performance improves, but flexibility for switching modules is reduced
Solution Approach 1:
The polling thread is designed to be universally applicable across different network configurations and traffic conditions. It can handle both sparse and dense traffic patterns, support various packet processing scenarios, and adapt to different module switching requirements. This multi-functionality allows the system to achieve high-speed processing like DPDK while maintaining the flexibility needed for diverse network applications.
Solution Approach 2:
The polling thread dynamically adapts its behavior based on traffic conditions and processing requirements. During high-speed processing needs, it operates in continuous polling mode to maximize throughput. When module switching or flexible routing is required, it can adjust its polling strategy and packet handling logic to accommodate different scenarios, thus achieving both high performance and adaptability.
Data Source
AI summary
A server delay control device that is set up in a kernel space of an OS and started as a thread to use a polling model to monitor an arriving packet, wherein the thread has operation modes of a sleep control mode in which the thread is put to sleep and a constantly busy poll mode in which the thread is kept constantly busy polling, and the server delay control device includes a traffic frequency measurement unit that measures traffic inflow frequency, and a mode switching control unit that switches an operation mode of the thread between the sleep control mode and the constantly busy poll mode, on the basis of the traffic inflow frequency measured by the traffic frequency measurement unit.


