leveraging multicore systems for - home -...

25

Upload: others

Post on 30-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing
Page 2: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Leveraging Multicore Systems for

Hadoop and HPC Workloads

Jim Falgout | Pervasive Software | DataRush Chief

Technologist

Page 3: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Evolving Hadoop Stack

3

Page 4: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

MapReduce & HDFS Architecture

Job Tracker

Schedules and manages jobs

Splits input files

Manages shuffle of map output

Name Node

Manages HDFS name space

Manages data replication

Task Tracker

Manages tasks local to worker node

Data Node

Manages local space on worker node

Handles data transfers

4

Job Tracker

Name Node

Master Nodes

Slave Nodes

Task Tracker Data Node

Clients

Job API

HDFS API

Task Tracker Data Node

Task Tracker Data Node

Task Tracker Data Node

Page 5: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Map/Reduce Job Flow

5

Job Tracker

Job

Map

Map

Map

Map

ShuffleSort

Reduce

Reduce

HDFS

Splits

Page 6: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

MapReduce Parts Mapper

User provided map function: maps input key-value pairs into output key-value pairs

Reducer

User provided reduce function: aggregates input key-value sets into output key-value pairs

Input/Output Formats

Determines how to split input files; how to write output files

Partitioner

Partition function that determines how to distribute output of mapper to reducer(s)

Comparator

Compares key values for sorting

Serialize/Deserialize

Serialize key/value data for storage and network transfer

Deserialize for injection into reducer function

6

Page 7: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

The Need for Other Compute Paradigms

“… in addition, these data stores often expose a proprietary interface for

application programming (e.g. PL/SQL or TSQL), but not the full power of

procedural programming. More programmer-friendly parallel dataflow

languages await discovery, I think. MapReduce is one (small) step in that

direction.”

Engineer-to-Engineer Lectures

Jeff Hammerbacher

June 2010

7

Page 8: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Dataflow is:

Based on operators that provide a specific function (nodes)

Data queues (edges) connecting operators

Composition of directed, acyclic graphs (DAG)

Operators connected via queues

A graph instance represents a “program” or “application”

Flow control

Scheduling to prevent dead locks

Focused on data parallelism

Implemented by the Pervasive DataRush engine

8

Page 9: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

9

Page 10: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Dataflow and GPU’s

DataRush is 100% Java

No explicit GPU support other than Aparapi from AMD (alpha)

Under consideration for our roadmap

Usage Scenarios

Data mining algorithms • Many are floating point intensive

Next Generation Sequencing (NGS) • Smith-Waterman

• BFast

Is it a fit?

Seems to be: use DataRush for I/O and data preparation

Invoke GPU’s for computationally intensive functions

©2010 Advanced Micro Devices, Inc. All rights reserved. 10

Page 11: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Dataflow goodness:

Concepts are easy to grasp

Abstracts parallelism details

Simple to express Composition based

Shared nothing, message passing Simplified programming model

Immutability of flows

Limits side effects

Functional style

11

Page 12: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Code Snippet public final class StringLengthProcess extends DataflowProcess {

private final StringInput input;

private final IntOutput output;

public StringLengthProcess(CompositionContext ctx, ScalarFlow input) {

super(ctx);

this.input = newStringInput(input);

this.output = newIntOutput();

}

public ScalarFlow getOutput() {

return getFlow(output);

}

@Override

public void execute() {

while (input.stepNext()) {

output.push(input.asString().length());

}

output.pushEndOfData();

}

}

©2010 Advanced Micro Devices, Inc. All rights reserved. 12

Page 13: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Dataflow and big data

Pipelining Pipeline task based parallelism

Overlap I/O and computation

Can help optimize processor cache

Whole application approach

Data scalable Virtually unlimited data size capacity

Supports iterative data access

Exploits multicore Scalable

High data throughput

Extendible to multi-node

13

Page 14: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Malstone-B10 Scalability

370.0

192.4

90.3

51.6

31.5 0.0

50.0

100.0

150.0

200.0

250.0

300.0

350.0

400.0

2 cores 4 cores 8 cores 16 cores 32 cores

Tim

e in

Min

ute

s

Core Count

Run-time

3.2 hours using 4 cores

1.5 hours using 8 cores

Under 1 hour

using 16 cores

14

Page 15: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Multi-node DataRush

Extending dataflow to multi-node

Execute distributed graph fragments

Fragments linked via socket-based queues

Use distributed application graph

Specific patterns supported

Scatter

Gather

Scatter-gather combined

15

Page 16: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Multi-node DataRush Example

Uses gather pattern from HDFS files

Reads file(s) from HDFS

Initial aggregation in distributed phase

Final aggregation with data from all nodes

16

Reduce

HDFS

Read HDFS File

Group

Write File

Group

Read HDFS File

Group

Read HDFS File

Group

Read HDFS File

Group

Page 17: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Areas of Application

Bioinformatics

Next Generation Sequencing

Nearly 1 TCUP throughput using

Smith Waterman

Scalable BFAST implementation

Telecom

Analyzing Call Data Records

(network telemetry)

Operational intelligence

Fraud and waste detection

©2010 Advanced Micro Devices, Inc. All rights reserved. 17

Public Sector

State income tax revenue recovery

Cyber security

Financial Services

Mortgage analysis

Healthcare

Claims processing and analysis

Fraud detection

Network

Analyzing network log data

Cyber security

Page 18: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Adding Dataflow to Hive

Extension to Hive allows

executing queries using

the dataflow based

DataRush framework

Queries source data from

HDFS

Testing with TPC-H data and

queries has show a

significant performance

boost

18

HDFS

DataRush DataRush DataRush DataRush

Query

Hive

TurboRush for Hive

Page 19: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Adding DataRush to MapReduce

DataRush embedded within Hadoop

Reduce complexities of MapReduce experience

Increased efficiencies can lead to significantly faster run times

19

Mapper Mapper Mapper Mapper

Reducer Reducer

Hadoop

Distributed

File System

DataRush DataRush DataRush DataRush

DataRush DataRush

33 mins

135 mins

Malstone B

0.5 TB

DataRush in Hadoop

Hadoop

Page 20: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Distributed Dataflow With HDFS

Access existing files in Hadoop file system (HDFS) using dataflow

readers/writers

Utilize existing data with fewer resources

Distributed or single-node

20

HDFS DataRush DataRush DataRush DataRush

DataRush

33 mins

135 mins

Malstone B

0.5 TB

10 mins

Distributed DataRush

DataRush in Hadoop

Hadoop

Page 21: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Malstone-B10 Benchmark Summary

Web log file analysis

10 node cluster 8 cores per node

baseline

76% less

93% less

0%

20%

40%

60%

80%

100%

120%

MapReduce MapReduce + DataRush Distributed DataRush

Reduce Time, Cost, Power Consumption

21

Page 22: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Scalable Event Archiving

22

Event queue

Socket Subscribe

Event queue

Socket Subscribe

“RushScale”

Syslog file

12.5 GBytes

100M rows

125 bytes/row

Secure +

message

types

Event

generator

Syslog reader/

converter

Converts data to

Esper event type

and distributes to

sockets

Event queue

Socket Subscribe HBase or other NoSQL

Hadoop/HDFS

DataRush-based components

Archivers Listeners

Esper event engines

N threads, with N engines and listeners. Esper

statement default = capture all messages

Page 23: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Summary

Hadoop

Set of open source projects from Apache for big data handling & processing

Complex to learn (MapReduce)

Not optimal for small (Terabytes) work loads

Scales out to enormous workloads; thousands of nodes, Petabytes of data

Dataflow

Scalable, data focused architecture

Easy to grasp and simple to express

Simple programming model

Enables full utilization of multicore and multi-node resources

Integrated into MapReduce and Hive

23

Page 24: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

24

Disclaimer & Attribution The information presented in this document is for informational purposes only and may contain technical inaccuracies, omissions

and typographical errors.

The information contained herein is subject to change and may be rendered inaccurate for many reasons, including but not

limited to product and roadmap changes, component and motherboard version changes, new model and/or product releases,

product differences between differing manufacturers, software changes, BIOS flashes, firmware upgrades, or the like. There is no

obligation to update or otherwise correct or revise this information. However, we reserve the right to revise this information and to

make changes from time to time to the content hereof without obligation to notify any person of such revisions or changes.

NO REPRESENTATIONS OR WARRANTIES ARE MADE WITH RESPECT TO THE CONTENTS HEREOF AND NO

RESPONSIBILITY IS ASSUMED FOR ANY INACCURACIES, ERRORS OR OMISSIONS THAT MAY APPEAR IN THIS

INFORMATION.

ALL IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE ARE EXPRESSLY

DISCLAIMED. IN NO EVENT WILL ANY LIABILITY TO ANY PERSON BE INCURRED FOR ANY DIRECT, INDIRECT,

SPECIAL OR OTHER CONSEQUENTIAL DAMAGES ARISING FROM THE USE OF ANY INFORMATION CONTAINED

HEREIN, EVEN IF EXPRESSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

AMD, the AMD arrow logo, and combinations thereof are trademarks of Advanced Micro Devices, Inc. All other names used in

this presentation are for informational purposes only and may be trademarks of their respective owners.

© 2011 Pervasive Software, Inc.

The contents of this presentation were provided by individual(s) and/or company listed on the title page. The information and

opinions presented in this presentation may not represent AMD’s positions, strategies or opinions. Unless explicitly stated, AMD

is not responsible for the content herein and no endorsements are implied.

Page 25: Leveraging Multicore Systems for - Home - AMDdeveloper.amd.com/wordpress/media/2013/06/1421_final.pdf · 2013. 10. 24. · Financial Services Mortgage analysis Healthcare Claims processing

Jim Falgout [email protected]

Joe Dubin [email protected]

http://www.pervasivedatarush.com

Stop by the Pervasive DataRush demo pod in the

Experience Zone.

We’re hiring!

25 ©2010 Advanced Micro Devices, Inc. All rights reserved.