arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2403.02286cs.DB
收藏

Stage:Amazon Redshift 中的查询执行时间预测

Stage: Query Execution Time Prediction in Amazon Redshift

Ziniu Wu, Ryan Marcus, Zhengchun Liu, Parimarjan Negi, Vikram Nathan, Pascal Pfeil, Gaurav Saxena, Mohammad Rahman, Balakrishnan Narayanaswamy, Tim Kraska

AI总结:

针对 Amazon Redshift 查询执行时间预测的冷启动与鲁棒性问题,提出融合缓存、本地模型和全局模型的分层 Stage 预测器,显著提升准确性并降低平均执行延迟 20%。

摘要:

查询性能(例如执行时间)预测是现代 DBMS 的关键组成部分。作为开创性的云数据仓库,Amazon Redshift 依赖准确的执行时间预测来完成许多下游任务,范围从高层优化(例如自动创建物化视图)到查询执行关键路径上的低层任务(例如准入、调度和执行资源控制)。遗憾的是,许多现有的执行时间预测技术(包括 Redshift 中使用的技术)都受到冷启动问题和估计不准确的困扰,并且对工作负载/数据变化不够稳健。在本文中,我们提出了一种新颖的分层执行时间预测器:Stage 预测器。Stage 预测器旨在利用 Redshift 所面临的独特特征和挑战。Stage 预测器由三种模型状态组成:执行时间缓存、针对特定 DB 实例优化并带有不确定性度量的轻量级本地模型,以及可在 Redshift 中所有实例之间迁移的复杂全局模型。我们设计了一种系统化方法来使用这些模型,以最佳方式利用最优性(缓存)、实例优化(本地模型)以及关于 Redshift 的可迁移知识(全局模型)。实验表明,Stage 预测器能够作出更准确、更稳健的预测,同时保持实用的推理延迟和内存开销。总体而言,与 Redshift 中先前的查询性能预测器相比,Stage 预测器可在这些实例上将平均查询执行延迟改善 20%。

英文摘要:

Query performance (e.g., execution time) prediction is a critical component of modern DBMSes. As a pioneering cloud data warehouse, Amazon Redshift relies on an accurate execution time prediction for many downstream tasks, ranging from high-level optimizations, such as automatically creating materialized views, to low-level tasks on the critical path of query execution, such as admission, scheduling, and execution resource control. Unfortunately, many existing execution time prediction techniques, including those used in Redshift, suffer from cold start issues, inaccurate estimation, and are not robust against workload/data changes. In this paper, we propose a novel hierarchical execution time predictor: the Stage predictor. The Stage predictor is designed to leverage the unique characteristics and challenges faced by Redshift. The Stage predictor consists of three model states: an execution time cache, a lightweight local model optimized for a specific DB instance with uncertainty measurement, and a complex global model that is transferable across all instances in Redshift. We design a systematic approach to use these models that best leverages optimality (cache), instance-optimization (local model), and transferable knowledge about Redshift (global model). Experimentally, we show that the Stage predictor makes more accurate and robust predictions while maintaining a practical inference latency and memory overhead. Overall, the Stage predictor can improve the average query execution latency by $20\%$ on these instances compared to the prior query performance predictor in Redshift.

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

↑