Elastic Thread Pool for Low-Latency I/O Workloads

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing multi-threaded file system servers face performance issues with low-latency I/O bound workloads due to unnecessary thread switching and contention, which decreases I/O data rate and resource utilization.

Innovation Solution

An elastic request handling technique that limits the number of active server threads based on measured I/O workload latency and context switch overhead, prioritizing low-latency I/O requests and maintaining dedicated threads for each vCPU to minimize context switching.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the number of server threads is automatically scaled up to handle increasing client workload, then the server can accommodate more requests, but lock contention and context switch overhead increase which decreases I/O data rate and performance

Engineering Contradiction:
Improverequest handling capacityVSAvoidlock contention and context switch overhead
Core Design Contradiction:
ProductivityVSObject-generated harmful factors

Solution Approach 1:

The system dynamically adjusts the number of active server threads based on measured workload characteristics and performance metrics. Instead of static or purely automatic scaling, the thread count is adapted in response to actual system conditions, allowing the server to optimize between handling capacity and overhead generation.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The invention changes the parameter of thread count from an automatically scaled value to an elastically adjusted value based on measured performance. By monitoring I/O data rates and workload characteristics, the system modifies the number of active threads to maintain optimal performance, preventing the harmful effects of excessive thread contention.

Inventive Principle:
Principle #35Parameter changes

2Speed

If more server threads are spawned to handle low-latency I/O bound workloads, then more requests can be processed in parallel, but unnecessary thread switching and vCPU migration occur which reduces I/O data rate

Engineering Contradiction:
ImproveI/O data rateVSAvoidcontext switch overhead
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The system employs partial action by maintaining only the necessary number of active threads rather than spawning excessive threads for all possible workloads. By measuring actual workload demands and adjusting thread count accordingly, the system avoids the excessive thread creation that leads to context switch overhead and vCPU migration, thereby preserving I/O data rate.

Inventive Principle:
Principle #16Partial or excessive action

3Productivity

If I/O operations are processed with greater resource utilization, then throughput increases, but latency requirements may not be met for all operation types

Engineering Contradiction:
ImproveI/O throughputVSAvoidI/O latency
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system segments I/O operations by type and latency requirements, applying different thread pool configurations for different operation categories. By measuring workload characteristics and separating operations into different handling groups, the system can optimize throughput for operations that tolerate higher latency while maintaining low latency for operations that require it, such as random reads versus sequential writes.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS12204755B2Elastic request handling technique for optimizing workload performance
Publication Date: 2025.01.21 NUTANIX INC
  • US12204755B2 patent drawing
  • US12204755B2 patent drawing
  • US12204755B2 patent drawing

AI summary

An elastic request handling technique limits a number of threads used to service input/output (I/O) requests of a low-latency I/O workload received by a file system server executing on a cluster having a plurality of nodes deployed in a virtualization environment. The limited number of threads (server threads) is constantly maintained as “active” and running on virtual central processing units (vCPUs) of a node. The file system server spawns and organizes the active server threads as one or more pools of threads. The server prioritizes the low-latency I/O requests by loading them onto the active threads and allowing the requests to run on those active threads to completion, thereby obviating overhead associated with lock contention and vCPU migration after a context switch (i.e., to avoid rescheduling a thread on a different vCPU after execution of the thread was suspended).