Themis: A GPU-accelerated Relational Query Execution Engine
Kijae Hong, Kyoungmin Kim, Young-Koo Lee, Yang-Sae Moon, Sourav S. Bhowmick, Wook-Shin Han
Abstract
GPU-accelerated relational query execution engines have parallelized the execution of a pipeline, a sequence of operators. For the parallelization, the engines evenly partition the tuples in a table that will be scanned by the pipeline's first operator (a scan), and each thread executes the pipeline for the tuples in a partition. However, this approach leads to load imbalances since an operator returns a varying number of output tuples per input tuple, particularly under non-uniform data distributions such as skewed join key values. The load imbalances are classified into intra- and inter-warp load imbalances (intra-WLIs and inter-WLIs) since 1) threads are grouped into warps and 2) every thread in a warp evaluates the same operator for an input tuple concurrently following a single-instruction-multiple-thread manner. In contrast, threads in different warps can evaluate different operators concurrently. Although load balancing techniques have been proposed, however, they fail to solve the load imbalances on various workloads. In this paper, we propose a query execution engine, Themis, named after the deity of fairness, which symbolizes balanced workloads within our context. Themis minimizes intra-WLIs and inter-WLIs across various workloads. First, Themis minimizes intra-WLIs by redistributing tuples between the threads in a warp and making the threads evaluate an operator only when all of them hold inputs. Second, Themis mitigates the inter-WLIs by redistributing the tuples of warps with heavy workloads to idle warps. To check whether a warp's workload is heavy, we propose a method to approximate the sizes of warps' workloads. Based on these approximations, Themis adaptively adjusts the threshold for determining a warp's workload as heavy. In a recent benchmark JCC-H, which introduces skewed join key distributions to TPC-H, Themis significantly alleviates the inter-WLIs and intra-WLIs, outperforming the runner-up by up to 379x.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext d351ec75-9a6f-4cd9-ad35-22108cbb1512Cited by top-tier papers3
- Terabyte-Scale Analytics in the Blink of an EyeBowen Wu, Wei Cui, Carlo Curino, Matteo Interlandi et al.VLDB 2026 · 10 citations
- GPU Acceleration of SQL Analytics on Compressed DataZezhou Huang, Krystian Sakowski, Hans Lehnert, Wei Cui et al.VLDB 2026 · 1 citation
- FaScalSQL: A Fast and Scalable GPU-Accelerated SQL Query Engine for Out-of-Memory TablesChaemin Lim, Suhyun Lee, Jinwoo Choi, Kwanghyun Park et al.ICDE 2026
Builds on8
- A Study of the Fundamental Performance Characteristics of GPUs and CPUs for Database AnalyticsAnil Shanbhag, Samuel Madden, Xiangyao YuSIGMOD 2020 · 112 citations
- GPU-Accelerated Subgraph Enumeration on Partitioned GraphsWentian Guo, Yuchen Li, Mo Sha, Bingsheng He et al.SIGMOD 2020 · 71 citations
- Realtime Top-k Personalized PageRank over Large Graphs on GPUsJieming Shi, Renchi Yang, Tianyuan Jin, Xiaokui Xiao et al.VLDB 2020 · 44 citations
- GPU Database Systems Characterization and OptimizationJiashen Cao, Rathijit Sen, Matteo Interlandi, Joy Arulraj et al.VLDB 2024 · 36 citations
- cuTS: scaling subgraph isomorphism on distributed multi-GPU systems using trie based data structureLizhi Xiang, Arif Khan, Edoardo Serra, Mahantesh Halappanavar et al.SC 2021 · 35 citations
Related papers
- Data-Parallel Query Processing on Non-Uniform DataHenning Funke, Jens TeubnerVLDB 2020 · 34 citations
- Themis: Fair and Efficient GPU Cluster SchedulingKshiteej Mahajan, Arjun Balasubramanian, Arjun Singhvi, Shivaram Venkataraman et al.NSDI 2020 · 22 citations
- Improving Execution Efficiency of Just-in-time Compilation based Query Processing on GPUsJohns Paul, Bingsheng He, Shengliang Lu, Chiew Tong LauVLDB 2021 · 28 citations
- A Case for Graphics-driven Query ProcessingHarish Doraiswamy, Vikas Kalagi, Karthik Ramachandra, Jayant R. HaritsaVLDB 2023 · 4 citations
- Scaling your Hybrid CPU-GPU DBMS to Multiple GPUsBobbi W. Yogatama, Weiwei Gong, Xiangyao YuVLDB 2024 · 9 citations
