BQSched: A Non-intrusive Scheduler for Batch Concurrent Queries via Reinforcement Learning

📅 2025-04-27
📈 Citations: 0
Influential: 0
📄 PDF
🤖 AI Summary
Concurrent query scheduling for enterprise-scale periodic SQL data pipelines aims to minimize makespan but faces challenges in modeling complex inter-query dependencies and dynamic runtime effects—limitations inherent to conventional heuristic approaches. Method: We propose the first non-intrusive reinforcement learning (RL) batch scheduling framework. It employs an attention-driven state representation to capture query interactions; enhances IQ-PPO with auxiliary tasks for improved training stability; and introduces three key techniques: adaptive action masking, scheduling-gain-based query clustering, and a lightweight incremental simulator—to drastically reduce sampling cost and action-space dimensionality. Results: Evaluated on TPC-DS, our method reduces makespan by 34% and 13% on average over state-of-the-art heuristics and RL-adapted schedulers, respectively. It achieves high efficiency, strong robustness, excellent scalability, and cross-DBMS generalizability.

Technology Category

Application Category

📝 Abstract
Most large enterprises build predefined data pipelines and execute them periodically to process operational data using SQL queries for various tasks. A key issue in minimizing the overall makespan of these pipelines is the efficient scheduling of concurrent queries within the pipelines. Existing tools mainly rely on simple heuristic rules due to the difficulty of expressing the complex features and mutual influences of queries. The latest reinforcement learning (RL) based methods have the potential to capture these patterns from feedback, but it is non-trivial to apply them directly due to the large scheduling space, high sampling cost, and poor sample utilization. Motivated by these challenges, we propose BQSched, a non-intrusive Scheduler for Batch concurrent Queries via reinforcement learning. Specifically, BQSched designs an attention-based state representation to capture the complex query patterns, and proposes IQ-PPO, an auxiliary task-enhanced proximal policy optimization (PPO) algorithm, to fully exploit the rich signals of Individual Query completion in logs. Based on the RL framework above, BQSched further introduces three optimization strategies, including adaptive masking to prune the action space, scheduling gain-based query clustering to deal with large query sets, and an incremental simulator to reduce sampling cost. To our knowledge, BQSched is the first non-intrusive batch query scheduler via RL. Extensive experiments show that BQSched can significantly improve the efficiency and stability of batch query scheduling, while also achieving remarkable scalability and adaptability in both data and queries. For example, across all DBMSs and scales tested, BQSched reduces the overall makespan of batch queries on TPC-DS benchmark by an average of 34% and 13%, compared with the commonly used heuristic strategy and the adapted RL-based scheduler, respectively.
Problem

Research questions and friction points this paper is trying to address.

Efficient scheduling of concurrent SQL queries in pipelines
Overcoming limitations of heuristic and RL-based query schedulers
Reducing makespan and improving scalability in batch query processing
Innovation

Methods, ideas, or system contributions that make the work stand out.

Uses attention-based state representation for query patterns
Implements IQ-PPO algorithm for query completion signals
Introduces adaptive masking and query clustering strategies
🔎 Similar Papers
No similar papers found.
Chenhao Xu
Chenhao Xu
Victoria University
Deep LearningEdge ComputingBlockchain
C
Chunyu Chen
Simon Fraser University, Burnaby, Canada
J
Jinglin Peng
Huawei Cloud, Beijing, China
J
Jiannan Wang
Simon Fraser University, Burnaby, Canada; Huawei Cloud, Beijing, China
J
Jun Gao
Key Laboratory of High Confidence Software Technologies, CS, Peking University, Beijing, China