+ All Categories
Home > Technology > «Использование GPU для распределенных вычислений Map Reduce...

«Использование GPU для распределенных вычислений Map Reduce...

Date post: 26-Jan-2015
Category:
Upload: -
View: 113 times
Download: 1 times
Share this document with a friend
Description:
Владимир Старостенков (Senior Java Developer в Altoros)
48
© ALTOROS Systems | CONFIDENTIAL “The norm for data analytics is now to run them on commodity clusters with MapReduce-like abstractions. One only needs to read the popular blogs to see the evidence of this. We believe that we could now say that nobody ever got fired for using Hadoop on a cluster ”!
Transcript
Page 1: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

“The norm for data analytics is now to run them on commodity clusters with MapReduce-like abstractions. One only needs to read the popular blogs to see the evidence of this. We believe that we could now say that

“nobody ever got firedfor using Hadoop on a cluster”!

Page 2: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

BreakingNews

IBM Keynote at JavaOne 2013: Java Flies in Blue Skies and Open Clouds

Java and GPUs open up a world of new opportunities for GPU accelerators and Java programmers alike.

Page 3: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

BreakingNews

Duimovich showed an example of GPU acceleration of sorting using standard NVIDIA CUDA libraries

that are already available!

The speedups are phenomenal — ranging from 2x to 48x faster!

Page 4: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

BreakingNews?

Page 5: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

BreakingNews?

Page 6: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

BreakingHadoop

Page 7: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

BreakingHadoop

10 000x faster

Page 8: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

BreakingHadoop

10 000x faster

Page 9: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Hadoop vs GPU

Hadoop & GPU

Hadoop + GPU

HPC

Big Data

GPGPU in JavaHeterogeneous systems

Horizontal and vertical scalability

Page 10: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Hadoop horizontal scalability

file01 file02 file03

Page 11: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Hadoop horizontal scalability

file01 file02 file03

Page 12: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Hadoop horizontal scalability

file01 file02 file03

Node 1 Node 2 Node 3

01 02 03 04 05 06 07 08 09 10

01

02

03

04

05 0607 0809 10

Page 13: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Hadoop horizontal scalability

file01 file02 file03

Node 1 Node 2 Node 3

01 02 03 04 05 06 07 08 09 10

01

02

03

04

05 0607 0809 10

3 4 3

Page 14: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Hadoop horizontal scalability

file01 file02 file03

Node 1 Node 2 Node 3

01 02 03 04 05 06 07 08 09 10

01

02

03

04

05 0607 0809 10

3 4 3

Node 1 Node 2 Node 3

01 02

03 04

05 06

07 08

09 10

Node 4 Node 5 Node 6

01 02 03

04

05 06 07

08 09 10

Page 15: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Hadoop horizontal scalability

file01 file02 file03

Node 1 Node 2 Node 3

01 02 03 04 05 06 07 08 09 10

01

02

03

04

05 0607 0809 10

3 4 3

Node 1 Node 2 Node 3

01 02

03 04

05 06

07 08

09 10

Node 4 Node 5 Node 6

01 02 03

04

05 06 07

08 09 10

221 1 2 2

Page 16: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Hadoop horizontal scalability

Node 1 Node 2 Node 3

01 02

03 04

05 06

07 08

09 10

Node 4 Node 5 Node 6

01 02 03

04

05 06 07

08 09 10

221 1 2 2

Page 17: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Hadoop horizontal scalability

Node 1 Node 2 Node 3

01 02

03 04

05 06

07 08

09 10

Node 4 Node 5 Node 6

01 02 03

04

05 06 07

08 09 10

221 1 2 2

Page 18: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Use GPU to scale vertically

Node 1 Node 2 Node 3

01 02

03 04

05 06

07 08

09 10

Node 4 Node 5 Node 6

01 02 03

04

05 06 07

08 09 10

221 1 2 20.5 1 1 0.5 1 1

Page 19: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Profit estimation

“Debunking the 100X GPU vs. CPU myth: an evaluation of throughput computing on CPU and GPU” by Intel

NVidia GTX280vs

Intel Core i7-960

Page 20: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Profit estimation

“Debunking the 100X GPU vs. CPU myth: an evaluation of throughput computing on CPU and GPU” by Intel

“OpenCL: the advantages of heterogeneous approach” by Intel

NVidia GTX280vs

Intel Core i7-960

Page 21: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

How to use OpenCL?

Page 22: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

How to use OpenCL?

Page 23: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

How to use OpenCL?

Hadoop streaming

Page 24: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Aparapi

Expands Java's “Write Once Run Anywhere” to include APU and GPU devices by expressing data parallel algorithm through extending Kernel base class.

MyKernel.class

Page 25: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Aparapi

Expands Java's “Write Once Run Anywhere” to include APU and GPU devices by expressing data parallel algorithm through extending Kernel base class.

MyKernel.classPlatformSupportsOpenCL?

Page 26: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Aparapi

Expands Java's “Write Once Run Anywhere” to include APU and GPU devices by expressing data parallel algorithm through extending Kernel base class.

MyKernel.classPlatformSupportsOpenCL?

Execute usingJava Thread Pool

Page 27: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Aparapi

Expands Java's “Write Once Run Anywhere” to include APU and GPU devices by expressing data parallel algorithm through extending Kernel base class.

MyKernel.classPlatformSupportsOpenCL?

Bytecode canbe convertedto OpenCL?

Execute usingJava Thread Pool

Page 28: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Aparapi

Expands Java's “Write Once Run Anywhere” to include APU and GPU devices by expressing data parallel algorithm through extending Kernel base class.

MyKernel.classPlatformSupportsOpenCL?

Bytecode canbe convertedto OpenCL?

Convert it

Execute OpenCLKernel on DeviceExecute using

Java Thread Pool

Page 29: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Aparapi

Expands Java's “Write Once Run Anywhere” to include APU and GPU devices by expressing data parallel algorithm through extending Kernel base class.

Page 30: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Aparapi

Expands Java's “Write Once Run Anywhere” to include APU and GPU devices by expressing data parallel algorithm through extending Kernel base class.

Page 31: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Aparapi

Expands Java's “Write Once Run Anywhere” to include APU and GPU devices by expressing data parallel algorithm through extending Kernel base class.

Page 32: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Aparapi

Expands Java's “Write Once Run Anywhere” to include APU and GPU devices by expressing data parallel algorithm through extending Kernel base class.

lambda

Page 33: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Aparapi

Expands Java's “Write Once Run Anywhere” to include APU and GPU devices by expressing data parallel algorithm through extending Kernel base class.

lambda

HSA

Page 34: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Aparapi

Characteristics of ideal data parallel workload

Page 35: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Aparapi

Characteristics of ideal data parallel workload

Code which iterates over large arrays of primitives

- 32/64 bit data types preferred

- where the order of iterations is not critical

avoid data dependencies between iterations

- each iteration contains sequential code (few branches)

Page 36: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Aparapi

Characteristics of ideal data parallel workload

Code which iterates over large arrays of primitives

- 32/64 bit data types preferred

- where the order of iterations is not critical

avoid data dependencies between iterations

- each iteration contains sequential code (few branches)

Balance between data size (low) and compute (high)

- data transfer to/from the GPU can be costly

- trivial compute not worth the transfer cost

- may still benefit by freeing up CPU for other work(?)

Page 37: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

HadoopCL

Rice University, AMD

Page 38: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

HadoopCL

Page 39: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

HadoopCL

Page 40: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

HadoopCL

Page 41: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

HadoopCL

2 six-core Intel X5660(48 GB mem)

2 NVidia Tesla M2050(2*2.5 GB mem)

AMD A10-5800K APU(16 GB mem)

Page 42: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

HadoopCL

2 six-core Intel X5660(48 GB mem)

2 NVidia Tesla M2050(2*2.5 GB mem)

AMD A10-5800K APU(16 GB mem)

WHY?

Page 43: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

HadoopCL

Page 44: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Back to OpenCL, Aparapi and heterogeneous computing

Page 45: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

OpenCL, Aparapi and heterogeneous computing

GPU cache

GPU GDDR5

CPU cache

SATA 3.0 (HDD)

SATA 2.0 (SSD)

1 GBit networkFormula in terms of time:

(CPU calc1) + disk read + disk write>

(CPU calc2 + GPU calc + GPU-write + GPU-read) + disk read + disk write

Page 46: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

OpenCL future

Page 47: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

OpenCL future

http://streamcomputing.eu/

Page 48: «Использование GPU для распределенных вычислений Map Reduce (Hadoop)»

© ALTOROS Systems | CONFIDENTIAL

Questions?

Big Data Experts FB group


Recommended