机密虚拟机中的查询代价模型校准 Query Cost Model Calibration in Confidential Virtual Machines 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-06-24
⬇️ 3 次下载
👁️ 预览文献
💡 AI 中文简介
在AMD SEV-SNP等机密虚拟机(CVM)中运行数据库能保护云端敏感数据,但分析查询性能明显下降。作者发现根本原因是查询优化器仍沿用普通KVM虚拟机的代价假设,与CVM的硬件特性不匹配。为此提出一种轻量级的CVM感知代价校准方法,用优化器已有的物理指标(如访问页数、元组量、内存占用)来建模数据搬移和RMP地址转换两类主要开销。在PostgreSQL上实现并在JOB、CEB、Stack、TPC-DS等基准测试,最多恢复48%的性能,部分负载甚至超过KVM基线。
领域数据库系统 / 机密计算与查询优化
适合谁读需要一定专业背景(数据库系统、机密计算、查询优化方向)
核心贡献1) 揭示CVM中查询性能下降源于优化器代价假设与硬件不匹配,并指出RMP地址转换与数据搬移是两类主要优化器相关开销;2) 提出一种轻量级CVM感知代价模型校准方法,仅调整优化器代价估算逻辑,不改变执行引擎,即可显著缩小KVM/CVM性能差距。
关键数据在PostgreSQL上实现,基于JOB、CEB、Stack、TPC-DS等OLAP基准测试,最多恢复48%的执行时间,部分工作负载甚至超过KVM基线;校准本身引入的开销几乎可忽略。
推荐理由如果你关心机密计算下数据库为什么变慢、以及如何用极低成本让优化器'重新学会'为加密虚拟机选对执行计划,这篇短文给出了清晰答案。
关键词["机密计算", "机密虚拟机", "查询优化器", "代价模型校准", "AMD SEV-SNP", "数据库性能"]

原文摘要

查看英文原文摘要

With the growing adoption of Confidential Computing, running databases in confidential virtual machines (CVMs) such as AMD SEV-SNP has become an attractive way to protect sensitive cloud data with minimal changes to legacy DBMSs. However, analytical queries in such CVMs often suffer substantial overhead, and prior database work has largely stopped at benchmarking these slowdowns rather than optimizing them. We show that this problem stems from a hardware-software mismatch: query optimizers still rely on KVM-oriented (non-encrypted VM) cost assumptions that no longer hold in CVMs. To address this, we propose a lightweight CVM-aware cost calibration. It models two dominant sources of optimizer-facing overhead: data movement and RMP-related translation using simple physical proxies already available to the optimizer. Experiments show that the calibration significantly narrows the KVM/CVM performance gap, recovering up to 48 percent performance and even outperforming the KVM baseline on some workloads.