Benchmarking Analytical Query Processing in Intel SGXv2 (2403.11874v3)
Abstract: Trusted Execution Environments (TEEs), such as Intel's Software Guard Extensions (SGX), are increasingly being adopted to address trust and compliance issues in the public cloud. Intel SGX's second generation (SGXv2) addresses many limitations of its predecessor (SGXv1), offering the potential for secure and efficient analytical cloud DBMSs. We assess this potential and conduct the first in-depth evaluation study of analytical query processing algorithms inside SGXv2. Our study reveals that, unlike SGXv1, state-of-the-art algorithms like radix joins and SIMD-based scans are a good starting point for achieving high-performance query processing inside SGXv2. However, subtle hardware and software differences still influence code execution inside SGX enclaves and cause substantial overheads. We investigate these differences and propose new optimizations to bring the performance inside enclaves on par with native code execution outside enclaves.
- Azure SQL Database Always Encrypted. In Proceedings of the 2020 ACM SIGMOD International Conference on Management of Data (SIGMOD ’20). Association for Computing Machinery, New York, NY, USA, 1511–1525. https://doi.org/10.1145/3318464.3386141
- Main-Memory Hash Joins on Multi-Core CPUs: Tuning to the Underlying Hardware. In 2013 IEEE 29th International Conference on Data Engineering (ICDE). IEEE, Brisbane, QLD, Australia, 362–373. https://doi.org/10.1109/ICDE.2013.6544839
- Timo Bingmann. 2013. Pmbw - Parallel Memory Bandwidth Benchmark / Measurement. https://panthema.net/2013/pmbw/index.html
- Design and Evaluation of Main Memory Hash Join Algorithms for Multi-Core CPUs. In Proceedings of the 2011 ACM SIGMOD International Conference on Management of Data (SIGMOD ’11). Association for Computing Machinery, New York, NY, USA, 37–48. https://doi.org/10.1145/1989323.1989328
- Marion Bonnet. 2023. Cloud Assets the Biggest Targets for Cyberattacks, as Data Breaches Increase. https://www.thalesgroup.com/en/worldwide/security/press_release/cloud-assets-biggest-targets-cyberattacks-data-breaches-increase
- {}ÆPIC{} Leak: Architecturally Leaking Uninitialized Data from the Microarchitecture. In 31st USENIX Security Symposium (USENIX Security 22). USENIX Association, Boston, MA, 3917–3934. https://www.usenix.org/conference/usenixsecurity22/presentation/borrello
- Victor Costan and Srinivas Devadas. 2016. Intel SGX Explained. https://eprint.iacr.org/2016/086.pdf
- Benchmarking the Second Generation of Intel SGX Hardware. In Data Management on New Hardware (DaMoN’22). Association for Computing Machinery, New York, NY, USA, 1–8. https://doi.org/10.1145/3533737.3535098
- Main Memory Database Systems. Found. Trends Databases 8, 1-2 (2017), 1–130. https://doi.org/10.1561/1900000058
- Port or Shim? Stress Testing Application Performance on Intel SGX. In 2020 IEEE International Symposium on Workload Characterization (IISWC). IEEE, 123–133. https://doi.org/10.1109/IISWC50251.2020.00021
- Intel Corporation. 2023a. Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 2 (2A, 2B, 2C, & 2D): Instruction Set Reference, A-Z. Technical Report 325383-081US. Intel Corporation. 2522 pages. https://cdrdv2.intel.com/v1/dl/getContent/671110
- Intel Corporation. 2023b. Intel® Software Guard Extensions SDK for Linux OS Developer Reference. https://download.01.org/intel-sgx/sgx-linux/2.21/docs/Intel_SGX_Developer_Reference_Linux_2.21_Open_Source.pdf
- Intel Corporation. 2023c. Intel(R) Software Guard Extensions Developer Guide. https://download.01.org/intel-sgx/sgx-linux/2.21/docs/Intel_SGX_Developer_Guide.pdf
- Supporting Intel SGX on Multi-Socket Platforms. https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/supporting-intel-sgx-on-mulit-socket-platforms.pdf
- Everything You Always Wanted to Know about Compiled and Vectorized Queries but Were Afraid to Ask. Proceedings of the VLDB Endowment 11, 13 (Sept. 2018), 2209–2222. https://doi.org/10.14778/3275366.3284966
- Experimental Evaluation of NUMA Effects on Database Management Systems. In Datenbanksysteme Für Business, Technologie Und Web (BTW), 15. Fachtagung Des GI-Fachbereichs ”Datenbanken Und Informationssysteme” (DBIS), 11.-15.3.2013 in Magdeburg, Germany. Proceedings (LNI, Vol. P-214), Volker Markl, Gunter Saake, Kai-Uwe Sattler, Gregor Hackenbroich, Bernhard Mitschang, Theo Härder, and Veit Köppen (Eds.). GI, Magdeburg, Germany, 185–204. https://dl.gi.de/handle/20.500.12116/17321
- Sort vs. Hash Revisited: Fast Join Implementation on Modern Multi-Core CPUs. Proceedings of the VLDB Endowment 2, 2 (Aug. 2009), 1378–1389. https://doi.org/10.14778/1687553.1687564
- ShieldStore: Shielded In-memory Key-value Storage with SGX. In Proceedings of the Fourteenth EuroSys Conference 2019 (EuroSys ’19). Association for Computing Machinery, New York, NY, USA, 1–15. https://doi.org/10.1145/3302424.3303951
- TEEMon: A Continuous Performance Monitoring Framework for TEEs. In Proceedings of the 21st International Middleware Conference (Middleware ’20). Association for Computing Machinery, New York, NY, USA, 178–192. https://doi.org/10.1145/3423211.3425677
- SGXGauge: A Comprehensive Benchmark Suite for Intel SGX. In 2022 IEEE International Symposium on Performance Analysis of Systems and Software (ISPASS). IEEE, 135–137. https://doi.org/10.1109/ISPASS55109.2022.00014
- Benchmarking the Second Generation of Intel SGX for Machine Learning Workloads. In BTW 2023. Gesellschaft für Informatik e.V., Bonn, 711–717. https://doi.org/10.18420/BTW2023-44
- SGXoMeter: Open and Modular Benchmarking for Intel SGX. In Proceedings of the 14th European Workshop on Systems Security (EuroSec ’21). Association for Computing Machinery, New York, NY, USA, 55–61. https://doi.org/10.1145/3447852.3458722
- Cracking-Like Join for Trusted Execution Environments. Proceedings of the VLDB Endowment 16, 9 (May 2023), 2330–2343. https://doi.org/10.14778/3598581.3598602
- What Is the Price for Joining Securely? Benchmarking Equi-Joins in Trusted Execution Environments. Proceedings of the VLDB Endowment 15, 3 (Nov. 2021), 659–672. https://doi.org/10.14778/3494124.3494146
- Optimizing Main-Memory Join on Modern Hardware. IEEE Transactions on Knowledge and Data Engineering 14, 4 (July 2002), 709–730. https://doi.org/10.1109/TKDE.2002.1019210
- Innovative Instructions and Software Model for Isolated Execution. In Proceedings of the 2nd International Workshop on Hardware and Architectural Support for Security and Privacy (HASP ’13). Association for Computing Machinery, New York, NY, USA, 1. https://doi.org/10.1145/2487726.2488368
- Shinobu Miwa and Shin’Ichiro Matsuo. 2023. Analyzing the Performance Impact of HPC Workloads with Gramine+SGX on 3rd Generation Xeon Scalable Processors. In Proceedings of the SC ’23 Workshops of The International Conference on High Performance Computing, Network, Storage, and Analysis (SC-W ’23). Association for Computing Machinery, New York, NY, USA, 1850–1858. https://doi.org/10.1145/3624062.3624267
- Siani Pearson and Azzedine Benameur. 2010. Privacy, Security and Trust Issues Arising from Cloud Computing. In 2010 IEEE Second International Conference on Cloud Computing Technology and Science. IEEE, Indianapolis, IN, USA, 693–702. https://doi.org/10.1109/CloudCom.2010.66
- Rethinking SIMD Vectorization for In-Memory Databases. In Proceedings of the 2015 ACM SIGMOD International Conference on Management of Data (SIGMOD ’15). Association for Computing Machinery, New York, NY, USA, 1493–1508. https://doi.org/10.1145/2723372.2747645
- EnclaveDB: A Secure Database Using SGX. In 2018 IEEE Symposium on Security and Privacy (SP). IEEE, San Francisco, CA, USA, 264–278. https://doi.org/10.1109/SP.2018.00025
- An Experimental Comparison of Thirteen Relational Equi-Joins in Main Memory. In Proceedings of the 2016 International Conference on Management of Data (SIGMOD ’16). Association for Computing Machinery, New York, NY, USA, 1961–1976. https://doi.org/10.1145/2882903.2882917
- Building Enclave-Native Storage Engines for Practical Encrypted Databases. Proceedings of the VLDB Endowment 14, 6 (April 2021), 1019–1032. https://doi.org/10.14778/3447689.3447705
- TS-Perf: General Performance Measurement of Trusted Execution Environment and Rich Execution Environment on Intel SGX, Arm TrustZone, and RISC-V Keystone. IEEE Access 9 (2021), 133520–133530. https://doi.org/10.1109/ACCESS.2021.3112202
- Short Paper: Stress-SGX: Load and Stress Your Enclaves for Fun and Profit. In Networked Systems (Lecture Notes in Computer Science), Andreas Podelski and François Taïani (Eds.). Springer International Publishing, Cham, 358–363. https://doi.org/10.1007/978-3-030-05529-5_24
- StealthDB: A Scalable Encrypted Database with Full SQL Query Support. Proceedings on Privacy Enhancing Technologies 2019, 3 (July 2019), 370–388. https://doi.org/10.2478/popets-2019-0052
- Sgx-Perf: A Performance Analysis Tool for Intel SGX Enclaves. In Proceedings of the 19th International Middleware Conference (Middleware ’18). Association for Computing Machinery, New York, NY, USA, 201–213. https://doi.org/10.1145/3274808.3274824
- Zack Whittaker. 2023. Danish Cloud Host Says Customers ’lost All Data’ after Ransomware Attack. https://techcrunch.com/2023/08/23/cloudnordic-azero-cloud-host-ransomware/
- SIMD-scan: Ultra Fast in-Memory Table Scan Using on-Chip Vector Processing Units. Proceedings of the VLDB Endowment 2, 1 (Aug. 2009), 385–394. https://doi.org/10.14778/1687627.1687671