Dynamic Task Scheduler for Concurrent Workloads

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional task schedulers in database management systems (DBMS) face performance degradation due to excessive thread creation and context switches when handling highly concurrent analytical and transactional workloads, leading to suboptimal resource utilization and increased scheduling costs.

Innovation Solution

Implement a dynamic task scheduler that adjusts the number of worker threads based on available cores and query requirements, allowing for parallel execution of tasks and dynamic concurrency level adjustments to optimize resource utilization by leveraging multicore processors effectively.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional task schedulers activate a number of threads equal to the number of cores in the processor, then the system can effectively leverage parallel processing capabilities, but excessive thread creation and context switches occur when handling highly concurrent workloads, leading to performance degradation

Engineering Contradiction:
Improveparallel processing capabilityVSAvoidthread management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the thread pool into multiple stacks (e.g., OLTP stack and OLAP stack) that can be independently managed and scaled. Each stack maintains its own set of worker threads, allowing the system to handle different types of workloads with appropriate thread configurations without creating excessive context switches between heterogeneous workloads.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements dynamic thread pool management where the number of worker threads in each stack can be adjusted based on workload characteristics and system conditions. Thread pools can be scaled up or down dynamically, and threads can be migrated between stacks, allowing the system to adapt to changing concurrency requirements while maintaining optimal resource utilization.

Inventive Principle:
Principle #15Dynamics

2Productivity

If the system creates an excessive number of threads to handle highly concurrent OLAP and OLTP queries, then query processing capacity increases, but thread creation costs and context switches increase, diminishing overall DBMS performance

Engineering Contradiction:
Improvequery processing capacityVSAvoidthread creation and context switch time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent pre-allocates thread pools for different workload types (OLTP and OLAP) before actual queries arrive. This preliminary action ensures that when concurrent queries arrive, the system can immediately assign them to appropriate pre-existing threads rather than creating new threads on-demand, thereby avoiding thread creation overhead and reducing context switch frequency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent creates separate thread pool copies for different workload stacks, allowing independent management and optimization of thread resources for OLTP and OLAP operations. This copying approach enables the system to maintain multiple specialized thread pools that can be independently scaled and managed, reducing the need for context switches between dissimilar workloads.

Inventive Principle:
Principle #26Copying

3Device complexity

If the DBMS uses a single thread pool for both OLTP and OLAP workloads, then resource utilization simplifies, but performance degrades due to contention between blocking OLTP tasks and compute-intensive OLAP tasks

Engineering Contradiction:
Improvethread pool management simplicityVSAvoidworkload handling performance
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent segments the unified thread pool into separate stacks (OLTP stack and OLAP stack) that handle different workload types independently. This segmentation reduces contention between blocking OLTP transactions and compute-intensive OLAP queries by providing dedicated thread resources for each workload type, while still maintaining centralized management benefits.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies different management policies and characteristics to different stacks based on their specific workload requirements. OLTP stacks can be configured for low-latency response with smaller thread pools, while OLAP stacks can use larger thread pools optimized for batch processing. This local quality approach allows each stack to be optimized for its specific workload type while maintaining overall system coordination.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS10545789B2Task scheduling for highly concurrent analytical and transaction workloads
Publication Date: 2020.01.28 SAP SE
  • US10545789B2 patent drawing
  • US10545789B2 patent drawing
  • US10545789B2 patent drawing

AI summary

Systems and method for a task scheduler with dynamic adjustment of concurrency levels and task granularity are disclosed for improved execution of highly concurrent analytical and transactional systems. The task scheduler can avoid both over commitment and underutilization of computing resources by monitoring and controlling the number of active worker threads. The number of active worker threads can be adapted to avoid underutilization of computing resources by giving the OS control of additional worker threads processing blocked application tasks. The task scheduler can dynamically determine a number of parallel operations for a particular task based on the number of available threads. The number of available worker threads can be determined based on the average availability of worker threads in the recent history of the application. Based on the number of available worker threads, the partitionable operation can be partitioned into a number of sub operations and executed in parallel.