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

在Intel SGX2内核中使用Polars:对保密分析查询处理的实证研究

Polars inside Intel SGX2 Enclaves: An Empirical Study of Confidential Analytical Query Processing

Mozilla

Wei Wang, Burns Smith, Kenny Leftin

AI总结:

本文研究了在Intel SGX2内核中通过Gramine运行Arrow原生DataFrame引擎Polars的性能,分析了查询和数据加载的开销,并比较了Polars的惰性与主动API性能。

摘要:

可信执行环境(TEEs)重新激发了保密分析的兴趣,但大多数先前评估集中在SQL数据库引擎或早期SGX版本上。本文研究了通过Gramine在TPC-H SF30上使用Azure Blob存储运行的Arrow原生DataFrame引擎Polars。我们报告了标准TPC-H功率分数以及一个仅查询变体,以分离计算开销与数据摄入开销。在四个数据集宽度配置(约22-73 GB)中,端到端开销保持几乎恒定,为1.49-1.56倍,但此综合指标掩盖了两种不同的行为:仅查询开销从1.51-1.52倍降至1.43-1.44倍,而数据加载开销从2.27倍升至4.07倍。我们进一步表明,开销并非在所有查询中都相同:对于len130配置,中位数每个查询SGX减速为1.45倍,最大为2.57倍,且一小部分查询表现出与状态ful EPC压力一致的运行到运行峰值。最后,我们比较了Polars的惰性与主动API在同一TEE设置下的性能。惰性执行总体快2.25-2.27倍,而主动执行在41 GB及以上时因内存不足而失败。与最近的DuckDB-SGX2研究相比,我们的结果表明,SGX2可以支持Arrow原生分析处理,其安全开销的顺序与之相似,但加载路径放大和API级别优化是端到端性能的第一顺序决定因素。

英文摘要:

Trusted Execution Environments (TEEs) have renewed interest in confidential analytics, but most prior evaluations focus on SQL database engines or earlier SGX generations. This paper studies an Arrow-native DataFrame engine, Polars, running inside Intel SGX2 enclaves via Gramine on TPC-H SF30 with Azure Blob Storage. We report both the standard TPC-H power score and a query-only variant that removes table-loading time in order to separate compute overhead from data-ingestion overhead. Across four dataset-width configurations (approximately 22-73 GB), end-to-end overhead remains nearly constant at 1.49-1.56$\times$, but this composite metric obscures two distinct behaviors: query-only overhead declines from 1.51-1.52$\times$ to 1.43-1.44$\times$, whereas table-loading overhead rises from 2.27$\times$ to 4.07$\times$. We further show that overhead is not uniform across queries: for the len130 configuration, the median per-query SGX slowdown is 1.45$\times$ with a maximum of 2.57$\times$, and a small set of queries exhibits pronounced run-to-run spikes consistent with stateful EPC pressure. Finally, we compare Polars' lazy and eager APIs under the same TEE setting. Lazy execution is 2.25-2.27$\times$ faster overall, while eager execution fails with out-of-memory errors at 41 GB and above. Relative to the recent DuckDB-SGX2 study, our results suggest that SGX2 can support Arrow-native analytical processing with a similar order of security overhead, but that load-path amplification and API-level optimization are first-order determinants of end-to-end performance.

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

↑