Parallel Data Sorting via Iterative Workload Balancing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current data sorting methods, particularly in multi-threaded and multi-node environments, face challenges in achieving high-performance sorting for large data sets due to inefficiencies in parallelization, especially with non-uniform data distributions, leading to increased processing overhead and latency.
Innovation Solution
The method involves dividing unordered data into K lists, sorting them independently using algorithms like quicksort, determining balanced workloads by iteratively adjusting index splits, and then merging these workloads using a K-way merge sort to achieve efficient parallel sorting without requiring inter-process communication.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If radix-sort is used with parallelization, then sorting can be performed in parallel, but a lengthy pre-processing step is required to cope with non-uniform data distributions, imposing an unacceptable performance penalty
Solution Approach 1:
The patent performs preliminary partitioning of data into K lists based on fixed index ranges before sorting. This preliminary action distributes data evenly across threads without requiring expensive pre-processing scans, enabling parallel sorting to proceed directly on balanced workloads.
Solution Approach 2:
The patent segments the data into K distinct lists with non-overlapping index ranges, allowing each thread to sort its assigned segment independently. This segmentation eliminates the need for complex pre-processing to handle non-uniform distributions, as the fixed range assignment inherently balances the workload.
2Productivity
If a parallel data scan is conducted to determine balanced workload partitions, then workload balancing can be achieved, but significant processing overhead is imposed due to inter-process communication required to resolve write contention
Solution Approach 1:
Each thread independently determines its own workload by accessing the fixed index range assignments without requiring coordination or communication with other threads. The workload distribution is predetermined and self-evident from the index ranges, eliminating the need for inter-process communication to resolve write contention.
3Productivity
If serial sorting methods are used, then sufficient performance is provided for low to moderate data processing needs, but they break down when processing large numbers of elements or when distributing workload to a large number of parallel processing threads
Solution Approach 1:
The patent divides the sorting task into K independent segments, where each thread handles a specific segment of data identified by non-overlapping index ranges. This segmentation enables the system to scale efficiently to large numbers of threads and elements, as each thread operates independently on its assigned segment without coordination overhead.
Data Source
Figure 1
Figure 2A
Figure 2B
AI summary
A method, apparatus, and system for improved high-performance parallel data sorting is provided. In a first phase, a plurality of unordered data elements to be sorted is divided into K unordered lists each preferably having approximately M elements. Each of these K unordered lists can be independently sorted in parallel using any algorithm, such as quicksort, to generate K ordered lists. In a second phase, N balanced workloads are determined from the K ordered lists by using an iterative converging process capped by a maximum number of iterations. Thus, any non-uniform or skewed data distribution can be load balanced with minimal processing time. Once the N balanced workloads are determined, they can be independently sorted in parallel, for example by using a merge sort, and then combined with a fast concatenation to provide the final sorted result. Thus, sorting operations are fully parallelized while avoiding any expensive data scanning steps.