hadoop + gpu

Post on 26-Jan-2015

125 Views

Category:

Education

6 Downloads

Preview:

Click to see full reader

DESCRIPTION

Brief intro into the problem and perspectives of OpenCL and distributed heterogeneous calculations with Hadoop. For Big Data Dive 2013 (Belarus Java User Group).

TRANSCRIPT

© 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”!

© 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.

© 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!

© ALTOROS Systems | CONFIDENTIAL

BreakingNews?

© ALTOROS Systems | CONFIDENTIAL

BreakingNews?

© ALTOROS Systems | CONFIDENTIAL

BreakingHadoop

© ALTOROS Systems | CONFIDENTIAL

BreakingHadoop

10 000x faster

© ALTOROS Systems | CONFIDENTIAL

BreakingHadoop

10 000x faster

© ALTOROS Systems | CONFIDENTIAL

Hadoop vs GPU

Hadoop & GPU

Hadoop + GPU

HPC

Big Data

GPGPU in JavaHeterogeneous systems

Horizontal and vertical scalability

© ALTOROS Systems | CONFIDENTIAL

Hadoop horizontal scalability

file01 file02 file03

© ALTOROS Systems | CONFIDENTIAL

Hadoop horizontal scalability

file01 file02 file03

© 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

© 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

© 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

© 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

© 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

© 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

© 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

© 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

© 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

© ALTOROS Systems | CONFIDENTIAL

How to use OpenCL?

© ALTOROS Systems | CONFIDENTIAL

How to use OpenCL?

© ALTOROS Systems | CONFIDENTIAL

How to use OpenCL?

Hadoop streaming

© 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

© 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?

© 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

© 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

© 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

© 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.

© 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.

© 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.

© 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

© 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

© ALTOROS Systems | CONFIDENTIAL

Aparapi

Characteristics of ideal data parallel workload

© 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)

© 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(?)

© ALTOROS Systems | CONFIDENTIAL

HadoopCL

Rice University, AMD

© ALTOROS Systems | CONFIDENTIAL

HadoopCL

© ALTOROS Systems | CONFIDENTIAL

HadoopCL

© ALTOROS Systems | CONFIDENTIAL

HadoopCL

© 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)

© 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?

© ALTOROS Systems | CONFIDENTIAL

HadoopCL

© ALTOROS Systems | CONFIDENTIAL

Back to OpenCL, Aparapi and heterogeneous computing

© 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

© ALTOROS Systems | CONFIDENTIAL

OpenCL future

© ALTOROS Systems | CONFIDENTIAL

OpenCL future

http://streamcomputing.eu/

© ALTOROS Systems | CONFIDENTIAL

Questions?

Big Data Experts FB group

top related