[Paper Review] Deterministic Sample Sort For GPUs
This paper presents GPU Bucket Sort, a deterministic sample sort algorithm for GPUs that achieves performance on par with the state-of-the-art randomized sample sort while eliminating input-dependent performance fluctuations. By deterministically selecting sample points to partition data into fixed-size buckets, the method ensures consistent runtime across all data distributions and enables sorting of larger datasets within limited GPU memory.
We present and evaluate GPU Bucket Sort, a parallel deterministic sample sort algorithm for many-core GPUs. Our method is considerably faster than Thrust Merge (Satish et.al., Proc. IPDPS 2009), the best comparison-based sorting algorithm for GPUs, and it is as fast as the new randomized sample sort for GPUs by Leischner et.al. (to appear in Proc. IPDPS 2010). Our deterministic sample sort has the advantage that bucket sizes are guaranteed and therefore its running time does not have the input data dependent fluctuations that can occur for randomized sample sort.
Motivation & Objective
- Address the performance instability of randomized sample sort on GPUs, which varies with input data distribution.
- Develop a deterministic alternative to randomized sample sort that maintains consistent performance across all data types.
- Achieve sorting performance comparable to the best-known GPU sorting methods, such as randomized sample sort and Thrust Merge.
- Improve memory efficiency to enable sorting of larger data sets within the same GPU memory constraints.
- Provide a scalable, predictable sorting solution suitable for general-purpose GPU computing workloads with irregular memory access patterns.
Proposed method
- Use deterministic sampling to select pivot elements from the input data to define bucket boundaries.
- Partition the input data into fixed-size buckets based on the deterministic pivot selection, ensuring predictable bucket sizes.
- Apply a comparison-based sorting algorithm (e.g., bitonic sort or odd-even sort) within each GPU thread block to sort elements in individual buckets.
- Leverage CUDA’s SIMT execution model, with thread blocks mapped to streaming multiprocessors (SMs), to efficiently parallelize bucket sorting.
- Optimize memory access patterns by coalescing global memory transactions and minimizing shared memory usage to reduce latency.
- Tune the sample size parameter $ s $ to balance sampling cost and bucket sorting cost, with $ s = 64 $ found optimal in experiments.
Experimental results
Research questions
- RQ1Can a deterministic sample sort algorithm match the performance of the best-known randomized sample sort on GPUs?
- RQ2Does deterministic bucketing eliminate performance fluctuations caused by input data distribution in GPU sorting?
- RQ3Can a deterministic approach achieve higher memory efficiency, enabling sorting of larger data sets on the same GPU hardware?
- RQ4How does the sorting rate of a deterministic method compare to randomized and comparison-based methods across varying data sizes?
- RQ5What is the optimal sample size $ s $ that minimizes total runtime for GPU-based sample sort?
Key findings
- GPU Bucket Sort achieves performance identical to the randomized sample sort of Leischner et al. (2010) on uniformly distributed data, the best-case scenario for randomized sorting.
- Unlike randomized sample sort, GPU Bucket Sort maintains a constant sorting rate across all data sizes tested, from $ n = 64M $ to $ n = 512M $, indicating stable performance.
- The method demonstrates a nearly linear growth in runtime with increasing data size, confirming its scalability and predictable performance.
- GPU Bucket Sort is more memory efficient than both Thrust Merge and randomized sample sort, enabling sorting of up to $ 256M $ data items on a GTX 285 (2GB) and $ 512M $ on a Tesla C1060.
- The implementation shows less than 1 ms variance over 100 runs, confirming high determinism and low runtime fluctuation.
- On a GTX 285 with 2GB memory, GPU Bucket Sort outperforms the randomized method by a few percent due to better memory bandwidth utilization, despite using a slightly slower memory configuration.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.