DuckDB-SGX2: The Good, The Bad and The Ugly within Confidential Analytical Query Processing

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Battiston, Ilaria, Felius, Lotte, Ansmink, Sam, Kuiper, Laurens, Boncz, Peter
Format: Preprint
Published: 2024
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866929365464383488
author Battiston, Ilaria
Felius, Lotte
Ansmink, Sam
Kuiper, Laurens
Boncz, Peter
author_facet Battiston, Ilaria
Felius, Lotte
Ansmink, Sam
Kuiper, Laurens
Boncz, Peter
contents We provide an evaluation of an analytical workload in a confidential computing environment, combining DuckDB with two technologies: modular columnar encryption in Parquet files (data at rest) and the newest version of the Intel SGX Trusted Execution Environment (TEE), providing a hardware enclave where data in flight can be (more) securely decrypted and processed. One finding is that the "performance tax" for such confidential analytical processing is acceptable compared to not using these technologies. We eventually manage to run TPC-H SF30 with under 2x overhead compared to non-encrypted, non-enclave execution; we show that, specifically, columnar compression and encryption are a good combination. Our second finding consists of dos and don'ts to tune DuckDB to work effectively in this environment. There are various performance hazards: potentially 5x higher cache miss costs due to memory encryption inside the enclave, NUMA penalties, and highly elevated cost of swapping pages in and out of the enclave -- which is also triggered indirectly by using a non-SGX-aware malloc library.
format Preprint
id arxiv_https___arxiv_org_abs_2405_11988
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle DuckDB-SGX2: The Good, The Bad and The Ugly within Confidential Analytical Query Processing
Battiston, Ilaria
Felius, Lotte
Ansmink, Sam
Kuiper, Laurens
Boncz, Peter
Databases
We provide an evaluation of an analytical workload in a confidential computing environment, combining DuckDB with two technologies: modular columnar encryption in Parquet files (data at rest) and the newest version of the Intel SGX Trusted Execution Environment (TEE), providing a hardware enclave where data in flight can be (more) securely decrypted and processed. One finding is that the "performance tax" for such confidential analytical processing is acceptable compared to not using these technologies. We eventually manage to run TPC-H SF30 with under 2x overhead compared to non-encrypted, non-enclave execution; we show that, specifically, columnar compression and encryption are a good combination. Our second finding consists of dos and don'ts to tune DuckDB to work effectively in this environment. There are various performance hazards: potentially 5x higher cache miss costs due to memory encryption inside the enclave, NUMA penalties, and highly elevated cost of swapping pages in and out of the enclave -- which is also triggered indirectly by using a non-SGX-aware malloc library.
title DuckDB-SGX2: The Good, The Bad and The Ugly within Confidential Analytical Query Processing
topic Databases
url https://arxiv.org/abs/2405.11988