Parallel Data Sorting via Iterative Workload Balancing

Resolve Bottlenecks,
Find Innovative Solutions
Generate 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

VSEngineering 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

Engineering Contradiction:
Improveparallel sorting performanceVSAvoidpre-processing time
Core Design Contradiction:
ProductivityVSLoss of time

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.

Inventive Principle:
Principle #10Preliminary action

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.

Inventive Principle:
Principle #1Segmentation

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

Engineering Contradiction:
Improveworkload balancingVSAvoidinter-process communication overhead
Core Design Contradiction:
ProductivityVSDevice complexity

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.

Inventive Principle:
Principle #25Self-service

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

Engineering Contradiction:
Improvesorting performanceVSAvoidscalability to large data sets and threads
Core Design Contradiction:
ProductivityVSAdaptability or versatility

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.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentEP3204846B1Parallel merging
Publication Date: 2021.08.18 ORACLE INT CORP
  • EP3204846B1 patent drawingFigure 1
  • EP3204846B1 patent drawingFigure 2A
  • EP3204846B1 patent drawingFigure 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.