Data management on GPUs has become increasingly relevant due to a tremendous rise in processing power and available GPU memory. Just like in the CPU world, there is a need for performant GPU-resident index structures to speed up query processing. Unfortunately, mapping indexes efficiently to the highly parallel and hard-to-program hardware is challenging and often fails to yield the desired performance and flexibility. Therefore, we advocate to take a different route. Instead of proposing yet another hand-tailored index, we investigate whether we can exploit an indexing mechanism that is already built into modern GPUs: The raytracing hardware accelerator provided by NVIDIA RTX cards. To do so, we re-phrase database indexing as a raytracing problem, where we express the dataset to be indexed as primitives in a scene, and queries as rays. In this combination, coined RX in the following, lookups are performed as intersection tests in hardware by dedicated raytracing cores. To analyze the pros, cons, and usefulness of the raytracing pipeline for database indexing, we carefully evaluate RX along twelve dimensions: We first identify the optimal setup of the pipeline by evaluating different options regarding (1) how to express keys, (2) which primitives to use for that, (3) how to formulate point/range queries against these, and (4) how to update the index. Continuing with the best setup, we compare RX against a set of software-implemented GPU-resident index structures while varying (5) the number of inserts and queries, (6) the order of the data, (7) the batch size, (8) the hit/miss ratio, (9) the selectivity of range queries, (10) the key size, and (11) the distribution of inserts and queries. Finally, we evaluate (12) the impact of three different GPU generations on the performance. Our results show that RX is competitive against traditional counterparts in a variety of situations.
翻译:在GPU上管理数据已因处理能力和可用显存的巨大提升而日益重要。与CPU领域类似,需要高性能的GPU驻留索引结构来加速查询处理。然而,将索引高效映射到高度并行且难以编程的硬件上颇具挑战,且往往难以达到期望的性能和灵活性。为此,我们主张另辟蹊径。我们不提出另一种手工定制的索引,而是探究能否利用现代GPU中已内置的索引机制:NVIDIA RTX显卡提供的光线追踪硬件加速器。具体而言,我们将数据库索引重新表述为光线追踪问题,将待索引的数据集表示为场景中的基元,将查询表示为光线。在这种被命名为RX的组合中,查找操作由专用光线追踪核心在硬件中执行相交测试。为分析光线追踪管线在数据库索引中的利弊与实用性,我们从十二个维度对RX进行系统评估:首先,通过评估不同选项确定管线的最佳配置,包括(1)键的表示方式,(2)所用的基元类型,(3)针对这些基元制定点查询/范围查询的方法,以及(4)索引更新策略。在确定最佳配置后,我们将RX与一组基于软件实现的GPU驻留索引结构进行对比,同时改变(5)插入与查询数量,(6)数据顺序,(7)批处理大小,(8)命中/未命中比率,(9)范围查询的选择性,(10)键大小,以及(11)插入与查询的分布。最后,我们评估(12)三代不同GPU对性能的影响。结果表明,在多种场景下RX与传统方案相比具有竞争力。