Improving DBMS Scheduling Decisions with Fine-grained Performance Prediction on Concurrent Queries -- Extended
Ziniu Wu, Markos Markakis, Chunwei Liu, Peter Baile Chen, Balakrishnan Narayanaswamy, Tim Kraska, Samuel Madden
TL;DR
This paper tackles non-intrusive scheduling for OLAP workloads by introducing IconqSched, a lightweight proxy that optimizes query submission timing using Iconq, a bi-directional LSTM predictor of concurrent system runtimes. Iconq models complex interactions among overlapping queries by encoding them as Interaction feature vectors and processing them with a bidirectional LSTM to predict each target query’s System runtime. A greedy scheduling algorithm uses Iconq’s predictions to select and submit queries at key decision points, balancing End-to-end runtime, queuing time, and fairness via a starvation penalty. Empirical evaluation on Postgres and AWS Redshift with CAB and BRAD workloads shows meaningful End-to-end improvements (e.g., up to 28% mean and up to 39% tail on Postgres; up to 14% mean and 22% tail on Redshift), along with strong accuracy and robustness of the Iconq predictors. The approach is non-intrusive, extensible to other DBMS, and supports downstream tasks like query optimization and SLO maintenance.”
Abstract
Query scheduling is a critical task that directly impacts query performance in database management systems (DBMS). Deeply integrated schedulers, which require changes to DBMS internals, are usually customized for a specific engine and can take months to implement. In contrast, non-intrusive schedulers make coarse-grained decisions, such as controlling query admission and re-ordering query execution, without requiring modifications to DBMS internals. They require much less engineering effort and can be applied across a wide range of DBMS engines, offering immediate benefits to end users. However, most existing non-intrusive scheduling systems rely on simplified cost models and heuristics that cannot accurately model query interactions under concurrency and different system states, possibly leading to suboptimal scheduling decisions. This work introduces IconqSched, a new, principled non-intrusive scheduler that optimizes the execution order and timing of queries to enhance total end-to-end runtime as experienced by the user query queuing time plus system runtime. Unlike previous approaches, IconqSched features a novel fine-grained predictor, Iconq, which treats the DBMS as a black box and accurately estimates the system runtime of concurrently executed queries under different system states. Using these predictions, IconqSched is able to capture system runtime variations across different query mixes and system loads. It then employs a greedy scheduling algorithm to effectively determine which queries to submit and when to submit them. We compare IconqSched to other schedulers in terms of end-to-end runtime using real workload traces. On Postgres, IconqSched reduces end-to-end runtime by 16.2%-28.2% on average and 33.6%-38.9% in the tail. Similarly, on Redshift, it reduces end-to-end runtime by 10.3%-14.1% on average and 14.9%-22.2% in the tail.
