Fair Scheduling for Mixed-Query Database Loads

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database management systems face challenges in handling mixed query loads, where high-cost queries consume excessive resources, leading to starvation and increased latency for low-cost queries, resulting in longer-than-expected response times and reduced throughput.

Innovation Solution

A fair scheduling system that divides query jobs into sub-query tasks based on a cost estimate, allowing these tasks to be executed concurrently and managed within a job execution queue, ensuring that high-cost and low-cost queries are executed fairly by limiting the number of concurrent sub-query tasks and using a result limiter to manage resource usage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If high-cost queries are executed concurrently with low-cost queries, then query throughput is improved, but low-cost queries are starved of computing resources leading to increased latency

Engineering Contradiction:
Improvequery throughputVSAvoidlow-cost query latency
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent segments high-cost queries into multiple sub-queries with limited resource consumption. Each sub-query is assigned a resource limit (e.g., maximum number of results to return) that prevents it from consuming excessive computing resources. This segmentation allows multiple sub-queries to run concurrently without starving low-cost queries, thus maintaining both high throughput and low latency.

Inventive Principle:
Principle #1Segmentation

2Ease of operation

If resource limits are imposed on sub-queries, then fair resource distribution is achieved, but query execution complexity increases

Engineering Contradiction:
Improvefair resource distributionVSAvoidquery execution management
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The patent introduces a fair scheduler as an intermediary component that manages the execution of sub-queries. The fair scheduler monitors resource consumption, enforces limits on sub-queries, and coordinates execution to ensure fair distribution of computing resources. This intermediary layer abstracts the complexity of resource management from the query execution process, making it easier to implement fair distribution while handling the complexity internally.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10817513B2Fair scheduling for mixed-query loads
Publication Date: 2020.10.27 PALANTIR TECHNOLOGIES INC
  • US10817513B2 patent drawing
  • US10817513B2 patent drawing
  • US10817513B2 patent drawing

AI summary

A fair scheduling system with methodology for scheduling queries for execution by a database management system in a fair manner. The system obtains query jobs for execution by the database management system and cost estimates to execute the query jobs. Based on the cost estimates, the system causes the database management system to execute the query jobs as separate sub-query tasks in a round-robin fashion. By doing so, the execution latency of low cost query jobs that return few results is reduced when the query jobs are concurrently executed with high cost query jobs that return many results.