一种基于GPU的内存带宽有效的混合基排序算法
A Memory Bandwidth-Efficient Hybrid Radix Sort on GPUs
摘要:
排序是许多数据库操作的核心,如索引创建、排序合并联接和用户请求的输出排序。随着GPU逐渐成为加速各种操作的有前途的平台,在GPU上进行排序成为一项可行的工作。在过去的几年里,已经提出了几项改进,用于GPU上的排序,导致第一个基数排序实现,实现了每秒超过10亿个32位键的排序速率。然而,最先进的方法是严重的内存带宽的限制,因为它们需要更多的内存传输比他们的基于CPU的同行。我们的工作提出了一种新的方法,几乎一半的内存传输量,因此,大大提高了内存带宽的限制。能够排序两个千兆字节的8字节的记录在短短的50毫秒,我们的方法实现了2.32倍的改进,比最先进的基于GPU的基数排序的均匀分布,维持最低的速度不低于1.66的因素,为偏斜分布。为了解决不驻留在GPU上或超过可用设备内存的输入,我们构建了高效的GPU排序方法,采用流水线异构排序算法,减轻了与PCIe数据传输相关的开销。将端到端排序性能与运行16个线程的最先进的基于CPU的基数排序进行比较,我们的异构方法分别对具有偏斜分布和均匀分布的64 GB键值对进行排序,实现了2.06倍和1.53倍的改进。
英文摘要:
Sorting is at the core of many database operations, such as index creation, sort-merge joins, and user-requested output sorting. As GPUs are emerging as a promising platform to accelerate various operations, sorting on GPUs becomes a viable endeavour. Over the past few years, several improvements have been proposed for sorting on GPUs, leading to the first radix sort implementations that achieve a sorting rate of over one billion 32-bit keys per second. Yet, state-of-the-art approaches are heavily memory bandwidth-bound, as they require substantially more memory transfers than their CPU-based counterparts. Our work proposes a novel approach that almost halves the amount of memory transfers and, therefore, considerably lifts the memory bandwidth limitation. Being able to sort two gigabytes of eight-byte records in as little as 50 milliseconds, our approach achieves a 2.32-fold improvement over the state-of-the-art GPU-based radix sort for uniform distributions, sustaining a minimum speed-up of no less than a factor of 1.66 for skewed distributions. To address inputs that either do not reside on the GPU or exceed the available device memory, we build on our efficient GPU sorting approach with a pipelined heterogeneous sorting algorithm that mitigates the overhead associated with PCIe data transfers. Comparing the end-to-end sorting performance to the state-of-the-art CPU-based radix sort running 16 threads, our heterogeneous approach achieves a 2.06-fold and a 1.53-fold improvement for sorting 64 GB key-value pairs with a skewed and a uniform distribution, respectively.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。