arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2501.16256cs.DBcs.LG
收藏

通过并发查询的细粒度性能预测改进DBMS调度决策——扩展版

Improving DBMS Scheduling Decisions with Fine-grained Performance Prediction on Concurrent Queries -- Extended

MIT CSAIL(麻省理工学院计算机科学与人工智能实验室);Amazon Web Services(亚马逊网络服务)

Ziniu Wu, Markos Markakis, Chunwei Liu, Peter Baile Chen, Balakrishnan Narayanaswamy, Tim Kraska, Samuel Madden

AI总结:

本文提出非侵入式调度器IconqSched,通过黑盒细粒度预测器Iconq准确估计并发查询的系统运行时间,并利用贪心算法优化查询执行顺序与时机,在Postgres和Redshift上显著降低端到端运行时间。

摘要:

查询调度是直接影响数据库管理系统(DBMS)中查询性能的关键任务。深度集成的调度器需要修改DBMS内部机制,通常针对特定引擎定制,且可能需要数月才能实现。相比之下,非侵入式调度器无需修改DBMS内部即可做出粗粒度决策,例如控制查询准入和重新排序查询执行。它们所需的工程量少得多,可应用于多种DBMS引擎,为最终用户提供即时收益。然而,大多数现有的非侵入式调度系统依赖简化的成本模型和启发式方法,无法准确建模并发和不同系统状态下的查询交互,可能导致次优的调度决策。本文引入了IconqSched,一种新的、有原则的非侵入式调度器,它优化查询的执行顺序和时机,以增强用户经历的端到端总运行时间(即查询排队时间加上系统运行时间)。与以往方法不同,IconqSched具有一个新颖的细粒度预测器Iconq,它将DBMS视为黑盒,准确估计不同系统状态下并发执行查询的系统运行时间。利用这些预测,IconqSched能够捕捉不同查询组合和系统负载下的系统运行时间变化。然后,它采用贪心调度算法有效决定提交哪些查询以及何时提交。我们使用真实工作负载追踪将IconqSched与其他调度器在端到端运行时间方面进行了比较。在Postgres上,IconqSched平均减少端到端运行时间16.2%-28.2%,尾部减少33.6%-38.9%。类似地,在Redshift上,它平均减少端到端运行时间10.3%-14.1%,尾部减少14.9%-22.2%。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑