Worker Thread Model for Non-Blocking TCP/IP Simulation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing server testing software faces inefficiencies when simulating thousands of virtual users due to high context switching costs associated with blocking TCP/IP calls, leading to degraded performance as servers approach maximum load.

Innovation Solution

Implementing a worker thread model that uses non-blocking, asynchronous TCP/IP calls processed by a dedicated module, eliminating blocking calls and reducing context switches by handling all network traffic with a single thread, while separate virtual user threads supervise network connections.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If each virtual user is simulated as a separate process with blocking TCP/IP calls, then the simulation accurately represents real user behavior, but the context switching costs increase significantly and performance degrades

Engineering Contradiction:
Improveaccuracy of virtual user simulationVSAvoidserver testing performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the network communication functionality by extracting blocking TCP/IP calls from virtual user processes and consolidating them into a single dedicated worker thread. This segmentation separates the simulation logic (remaining in processes) from the network I/O operations (handled by the worker thread), allowing accurate virtual user simulation without the performance penalty of frequent context switches between processes making network calls.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The worker thread acts as an intermediary between the virtual user processes and the network stack. Instead of each process directly making blocking network calls that cause context switches, the worker thread mediates network communications for all virtual users, eliminating the harmful context switching while preserving the simulation accuracy of multi-process architecture.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If thousands of threads are used to simulate virtual users, then the testing software can handle large numbers of concurrent users, but the operating system cannot handle these threads efficiently

Engineering Contradiction:
Improvenumber of virtual users that can be simulatedVSAvoidthread handling efficiency
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent merges the network communication responsibilities of thousands of virtual user threads into a single worker thread. This consolidation reduces the number of active threads from thousands to one, making the system manageable and efficient for the operating system while still supporting large numbers of virtual users through the single-threaded network handling architecture.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The worker thread performs multiple functions: it handles network I/O for all virtual users, processes incoming connections, manages outgoing requests, and coordinates communication with the network stack. This multi-functionality allows a single thread to replace what would traditionally require thousands of threads, improving thread handling efficiency while maintaining the ability to simulate large user bases.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Ease of manufacture

If blocking TCP/IP calls are used in virtual user code, then the code is simple and easy to implement, but the execution is halted until the function finishes and context switching costs increase

Engineering Contradiction:
Improvesimplicity of virtual user codeVSAvoidexecution time due to blocking calls
Core Design Contradiction:
Ease of manufactureVSLoss of time

Solution Approach 1:

The patent extracts blocking TCP/IP calls from the virtual user process code and relocates them to the dedicated worker thread. This extraction removes the time-consuming blocking operations from the virtual user execution path, allowing virtual user code to remain simple and easy to implement while eliminating the execution halts and context switching costs associated with blocking calls.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The worker thread serves as an intermediary that handles network operations asynchronously for virtual users. Instead of virtual users directly executing blocking network calls that halt their execution, the worker thread mediates these operations in the background, eliminating execution time loss while maintaining the simplicity of virtual user code through a clean architectural separation.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS7703103B2Serving concurrent TCP/IP connections of multiple virtual internet users with a single thread
Publication Date: 2010.04.20 MICRO FOCUS IP DEV
  • US7703103B2 patent drawing
  • US7703103B2 patent drawing
  • US7703103B2 patent drawing

AI summary

A method for facilitating network communications from one or more independent execution threads by a dedicated worker thread. Because an operating system is not designed for use with a large number of threads, such a system requires the use of multiple computers for simulating a large number of virtual users. This increases complexity, as well as cost. The present invention reduces the number of threads needed, which reduces resource needs, and in turn increases the number of virtual users that can be simulated. According to the present invention, a worker thread uses non-blocking function calls to efficiently handle requests for network operations.