Database Thread Pool Control via Sleep Mode Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The increasing complexity of software and rapid growth in data volume pose challenges in efficiently managing and maintaining software applications, databases, and platform systems, particularly in processing and storing data, leading to resource limitations and potential system overload.

Innovation Solution

A computer-implemented method for controlling the execution of concurrent threads in a database management system by limiting the number of threads that can run in parallel, allowing new threads to be opened when tasks enter a sleep mode, and applying waiting times when the thread limit is reached, thereby optimizing resource usage and preventing system overload.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If the number of concurrent threads is increased to process more tasks in parallel, then productivity is improved, but the system may become overloaded and reliability deteriorates

Engineering Contradiction:
Improvetask processing throughputVSAvoidsystem stability
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system dynamically adjusts the number of active threads based on current system load conditions. When a task enters sleep mode, threads are released back to the pool; when tasks wake up, threads are allocated only if the current thread count is below the threshold. This dynamic adjustment resolves the contradiction by allowing high productivity when resources are available while preventing overload that would compromise reliability.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system continuously monitors the current number of active threads and compares it against the maximum threshold. This feedback mechanism controls thread allocation: tasks that wake from sleep mode are assigned threads only when the current count is below the limit, otherwise they enter sleep mode again. This feedback loop ensures productivity is maximized without exceeding reliability thresholds.

Inventive Principle:
Principle #23Feedback

2Ease of operation

If threads are allowed to execute without limitation, then ease of operation is improved, but resource consumption increases and system performance deteriorates

Engineering Contradiction:
Improvetask execution simplicityVSAvoidcomputational resource utilization
Core Design Contradiction:
Ease of operationVSUse of energy by moving object

Solution Approach 1:

Tasks automatically manage their own thread allocation by entering sleep mode when threads are unavailable and waking up when threads become available. The system self-regulates resource consumption without requiring external intervention, maintaining ease of operation while preventing excessive resource utilization. Tasks simply execute when resources permit and pause when they don't, eliminating the need for complex manual resource management.

Inventive Principle:
Principle #25Self-service

3Reliability

If the maximum number of threads is limited to prevent overload, then reliability is improved, but productivity decreases when the limit is reached

Engineering Contradiction:
Improvesystem stabilityVSAvoidtask processing throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

Tasks that exceed the thread limit enter sleep mode and periodically attempt to wake up and re-enter execution. This periodic retry mechanism ensures that when system load decreases and threads become available, waiting tasks can resume execution. This resolves the contradiction by maintaining reliability through thread limits while preserving eventual productivity through periodic execution attempts.

Inventive Principle:
Principle #19Periodic action

Solution Approach 2:

Tasks enter sleep mode in advance when the thread limit is reached, rather than blocking the system or causing errors. This preliminary action of pausing execution allows the system to maintain stability while queuing tasks for future execution. When threads become available, tasks can resume without having caused system overload, thus maintaining both reliability and eventual productivity.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS20250013626A1Controlling concurrently executing threads
Publication Date: 2025.01.09 SAP SE
  • US20250013626A1 patent drawing
  • US20250013626A1 patent drawing
  • US20250013626A1 patent drawing

AI summary

The present disclosure relates to computer-implemented methods, software, and systems for controlling the execution of concurrent threads executing tasks in a database management system. A first task is executed at a first thread from a pool of threads for execution of tasks at the database management system. It can be identified that the execution of the first task is paused and that the first task is in a sleep mode. In response to identifying that the first task is in an awake mode after the sleep mode, it can be determined whether a current number of threads in the pool that are currently processing tasks in parallel is below an allowed number of threads. It can be determined that the allowed number of threads has been reached and a waiting status can be assigned to the first task at the first thread.