Communication-Efficient String Sorting Timo Bingmann, Peter Sanders, - - PowerPoint PPT Presentation

communication efficient string sorting
SMART_READER_LITE
LIVE PREVIEW

Communication-Efficient String Sorting Timo Bingmann, Peter Sanders, - - PowerPoint PPT Presentation

Communication-Efficient String Sorting Timo Bingmann, Peter Sanders, Matthias Schimek 2020-05-18 @ IPDPS20 I NSTITUTE OF T HEORETICAL I NFORMATICS A LGORITHMICS A n t i d i s e s t a b l i s h m e n t a r i a n i


slide-1
SLIDE 1

INSTITUTE OF THEORETICAL INFORMATICS – ALGORITHMICS

Communication-Efficient String Sorting

Timo Bingmann, Peter Sanders, Matthias Schimek · 2020-05-18 @ IPDPS’20

s0 s1 s2 A n t i d i s e s t a b l i s h m e n t a r i a n i s m F l

  • c

c i n a u c i n i h i l i p i l i f i c a t i

  • n

H

  • n
  • r

i f i c a b i l i t u d i n i t a t i b u s

KIT – The Research University in the Helmholtz Association

www.kit.edu

Video and More Information:

https://panthema.net/2020/0518-distributed-string-sorting/

slide-2
SLIDE 2

Why String Sorting?

string: array of characters over

s t r i n g

alphabet Σ sorted string set: sorted lexicographically

⇒ like in a dictionary

characteristics of string sets

s0 s1 s2 s3

a l g o r i t h m 0 c

  • m p a

r e c

  • m p a

r i s

  • n 0

p r e f i x 0

#strings n, #characters N sum distinguishing prefix lengths D

⇒ multidimensional data

  • nly published distributed string sorting algorithm:
  • ne paragraph in [Fischer and Kurpicz, ALENEX’19]

Timo Bingmann, Peter Sanders, Matthias Schimek – Communication-Efficient String Sorting Institute of Theoretical Informatics – Algorithmics May 18th, 2020

2 / 10

slide-3
SLIDE 3

String Sorting Toolbox

Sequential Sorting: String Radix Sort, Multikey Quicksort, . . .

[Kärkkäinen et al., SPIRE’08], [Bentley and Sedgewick, SODA’97]

evaluation of many sequential

⊥ 2 5 1 4 6 2 a l g o r i t h m 0 c

  • m p u

t e r a l p h a b e t c

  • p y 0

c

  • m p u

t i n g c

  • m p

l e t e a l p h a c h a r a c t e r

algorithms in [Bingmann ’18] needed: string sorting + Longest Common Prefix (LCP) array computation Multiway Merging: LCP Losertree

[Bingmann et. al, Algorithmica’17]

exploit LCP values to

(2, aab) (1, acb) (2, aac) (0, bca) (2, aab) (2, aac) (0, bca) (1, acb) LCP- Merge

save character-comparisons

Timo Bingmann, Peter Sanders, Matthias Schimek – Communication-Efficient String Sorting Institute of Theoretical Informatics – Algorithmics May 18th, 2020

3 / 10

slide-4
SLIDE 4

String Sorting Toolbox

LCP Compression

2 5 1 4 6 2

a l g o r i t h m 0 p h a b e t c h a r a c t e r

  • m p

l e t e u t e r i n g p y 0 ⊥

2 5 1 4 6 2

a l g o r i t h m 0 c

  • m p u

t e r a l p h a b e t c

  • p y 0

c

  • m p u

t i n g c

  • m p

l e t e a l p h a c h a r a c t e r

compress

each longest common prefix is sent only once compression: iterate over strings + LCP array decompression: iterate over compressed strings + LCP array

Timo Bingmann, Peter Sanders, Matthias Schimek – Communication-Efficient String Sorting Institute of Theoretical Informatics – Algorithmics May 18th, 2020

4 / 10

slide-5
SLIDE 5

Distributed Merge String Sort (MS)

Distributed Partitioning Algorithm String Exchange local sorting local sorting local sorting

y y

merging merging merging

Local Sorting String Radix Sort new: String Radix Sort + LCP array String Exchange no compression new: LCP compression Merging plain losertree new: LCP losertree

Timo Bingmann, Peter Sanders, Matthias Schimek – Communication-Efficient String Sorting Institute of Theoretical Informatics – Algorithmics May 18th, 2020

5 / 10

slide-6
SLIDE 6

Distributed Merge String Sort (MS)

sample sets Sorting of Sample Sets + Final Splitter Selection p − 1 final splitters regular sampling regular sampling regular sampling partitioning partitioning partitioning

Partitioning equidistant sampling gather + seq. sort new: hypercube quicksort

[Axtmann and Sanders, ALENEX’17]

broadcast final splitters partitioning

Timo Bingmann, Peter Sanders, Matthias Schimek – Communication-Efficient String Sorting Institute of Theoretical Informatics – Algorithmics May 18th, 2020

6 / 10

slide-7
SLIDE 7

Prefix Doubling String Merge Sort (PDMS)

PE1: PE2: PE3:

A n t i d i s e s t a b l i s h m e n t a r i a n i s m 0 F l

  • c

c i n a u c i n i h i l i p i l i f i c a t i

  • n 0

H o n o r i f i c a b i l i t u d i n i t a t i b u s

same main structure as before use distributed Single-Shot Bloom Filter (dSBF)

[Sanders et al., IEEE BigData’13]

to approximate distinguishing prefixes with distributed duplicate detection

  • nly operate on those characters

calculate only the permutation for sorting (exchanging further characters is optional).

Timo Bingmann, Peter Sanders, Matthias Schimek – Communication-Efficient String Sorting Institute of Theoretical Informatics – Algorithmics May 18th, 2020

7 / 10

slide-8
SLIDE 8

Experimental Evaluation – Setup

Input Data D/N-Generator (n=9, ℓ=6, D/N=0.5)

s0 s1 s2 s3 s4 s5 s6 s7 s8

a a a a a 0 a a b a a 0 a a c a a 0 a b a a a 0 a b b a a 0 a b c a a 0 a c a a a 0 a c b a a 0 a c c a a 0

weak scaling with D/N-Generator Hardware (ForHLR I at KIT) 2 Deca-core Intel Xeon E5-2670 v2 (2.5 GHz) and 64 GB RAM per compute node InfiniBand 4X FDR interconnect Algorithms FKmerge: from Fischer and Kurpicz [ALENEX’19] hQuick: distributed quicksort

  • ur merge sort: MS-simple (no LCP-comp), MS (LCP-comp)
  • ur prefix doubling merge sort: PDMS-Golomb, PDMS
slide-9
SLIDE 9

D/N-Generator(n=p·500K, ℓ=500, D/N=?)

5 10 15 time (s)

0.0 0.25 0.5 0.75 1.0

20 40 80 160 320 640 1,280 200 400 600 # of PEs bytes sent per string 20 40 80 160 320 640 1,280 # of PEs 20 40 80 160 320 640 1,280 # of PEs 20 40 80 160 320 640 1,280 # of PEs 20 40 80 160 320 640 1,280 # of PEs FKmerge hQuick MS-simple MS PDMS-Golomb PDMS

slide-10
SLIDE 10

Conclusion

Summary two new communication-efficient string sorting algorithms: distributed string merge sort (MS) distributed prefix-doubling string merge sort (PDMS) theory and experimental evaluation different strategies best for low and high D/N-ratios Source code and recording of talk: https://panthema.net/2020/0518-distributed-string-sorting Future Work improve balancing by considering strings and characters can one show lower bounds? Questions via email to bingmann@kit.edu