slide1
Download
Skip this Video
Download Presentation
Parallel Sorting

Loading in 2 Seconds...

play fullscreen
1 / 17

Parallel Sorting - PowerPoint PPT Presentation


  • 129 Views
  • Uploaded on

Parallel Sorting. Sort. Sorting operation is frequently used for database processing. For example sorting may be requested by users through the use of Distinct, Order By and Group By clauses in SQL.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' Parallel Sorting' - zelig


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
slide1

Parallel Sorting

Parallel Sorting

slide2
Sort
  • Sorting operation is frequently used for database processing.
  • For example sorting may be requested by users through the use of Distinct, Order By and Group By clauses in SQL.
  • In general, parallel database sorting consists of multiple rounds of local sort, performed in each PN in parallel, followed by movement of tuples among PNs.
  • A dynamic load balancing approach has been proposed, recently.

Parallel Sorting

parallel sorting
Parallel Sorting
  • Traditional Technologies
    • Parallel Merge-All Sort
    • Parallel Binary-Merge Sort
    • Parallel Partitioned Sort
  • Dynamic Load Balancing Approaches
    • Partitioned with Redistribution Sort (PRS)
    • Load Balancing Optimization Sort (LBOS)
    • Load Balancing Optimization Sort with Fragment Feature (LBOS-F)

Parallel Sorting

parallel merge all sort
Parallel Merge-All Sort

Parallel Sorting

partitioned with redistribution sort prs
Partitioned with Redistribution Sort(PRS)
  • Partition Phase: each PN first scans its local tuples and distributes them as buckets according to range partitioning.
  • Optimization Phase: a coordinator PN is used to monitor the load for every PN. If every PN has the similar amount of data to process, Go to Sorting Phase. Otherwise, the imbalanced work load is detected, thus, a redistributed partitioning is needed.
  • Redistribution Phase: data redistribution.
  • Sorting Phase: local sort is carried out in each PN.

Parallel Sorting

slide8
PRS

Parallel Sorting

load balancing optimization sort lbos
Load Balancing Optimization Sort (LBOS)
  • Phase 1. Bucket Sizes Counting : Each PN reads its local data and computes each bucket size according to range distribution. Thereafter, each PN transfers the bucket information to a coordinator.
  • Phase 2. Load Balancing Optimization: coordinator decides the distribution strategy for assigning each bucket to PNs according to their bucket IDs sequentially. Whether coordinator assigns one more next bucket (size B) to current PNi will be decided on: if (Pi+B)-Pavg< d, it will assign next bucket to PNi. Otherwise, the bucket will be assigned to next PNi+1. This phase only decides the distribution strategy without any data transferred.

Parallel Sorting

slide10
Phase 3. Data Partitioning :Each PN transfers and receives data by using the distribution strategy decided in Phase 2.
  • Phase 4. Sorting :Each PN performs local sort.

Parallel Sorting

slide11
LBOS

Parallel Sorting

effect of bucket skew

25.23 (秒)

15.93 (秒)

9.87 (秒)

Bucket skew=1

PPS:PRS → 37.1%

PPS:LOBS → 60.9%

Effect of Bucket Skew

Parallel Sorting

effect of no of processing nodes

24.72 (秒)

19.32 (秒)

14.9 (秒)

4.41 (秒)

3.45 (秒)

1.77 (秒)

Effect of No. of Processing Nodes

PNs=16

PNs=256

PRS: PPS → 21.8%

PRS : PPS → 21.8%

LOBS : PPS → 59.9%

LOBS :PPS → 39.7%

Parallel Sorting

load balancing optimization sort with fragment feature lbos f
Load Balancing Optimization Sort with Fragment Feature (LBOS-F)
  • When the skew condition is severe, LBOS performs not very well.
  • LBSO-F is used to address this drawback and it also consists of four phases.
  • Its Phase 1, 3, and 4 are exactly the same as in LBOS except the Phase 2 in which LBOS-F can fragment oversize buckets and distribute them to different PNs.

Parallel Sorting

phase 2 for lbos f
Phase 2 for LBOS-F
  • Phase 2. Load Balancing Optimization with Fragment Feature : coordinator decides the distribution strategy for assigning each bucket to PNs according to their bucket IDs sequentially. Suppose that the next bucket (size B andPi+B>Pavg), with the interval of data values from rs to re ( rs < re ), is being considered for the assignment. The coordinator will fragment this bucket into two portions. Suppose that PNi already has total size Piof tuples which is d tuples less than Pavg (Pi+d=Pavg). The first portion which consists of those data values within the range of rs to rs+(re-rs)d/B of the bucket will be assigned to current PNi. The second portion which consists of the remaining data of the bucket will be assigned to next PNi+1. Again, this phase is without any data transferred.

Parallel Sorting

effect of bucket skew1
Effect of Bucket Skew

Parallel Sorting

effect of number of pns
Effect of Number of PNs

Parallel Sorting

ad