• No results found

Performance Optimization Techniques and Tools for Data-Intensive Computation Platforms

N/A
N/A
Protected

Academic year: 2021

Share "Performance Optimization Techniques and Tools for Data-Intensive Computation Platforms"

Copied!
72
0
0

Loading.... (view fulltext now)

Full text

(1)

Performance Optimization

Techniques and Tools for

Data-Intensive Computation Platforms

Licentiate Seminar Presentation June 11, KTH Kista, Sweden

Vasiliki Kalavri [email protected]

(2)

Outline

1. Introduction & Research Objectives 2. Background

3. Contributions

3.1. State-of-the-Art Survey on MapReduce 3.2. Integration of Pig and Stratosphere 3.3. Approximate Results in MapReduce 3.4. Results Materialization and Reuse

3.5. Asymmetry in Large-Scale Graph Analysis

4. Conclusions & Future Work

(3)

Introduction

(4)

The “Big Data” Era

" information that can't be processed or analyzed using traditional processes or tools "

Understanding Big Data, Book by IBM Research, 2012

" data whose size forces us to look beyond the tried-and-true methods that are

prevalent at that time "

The Pathologies of Big Data, Adam Jacobs, Communications of the ACM

4

(5)

Big Data Use-Cases

(6)

The 3 Vs of Big Data

Volume:

Facebook reports 15TB of raw compressed data per day (in 2010!)

Variety:

Relational data, xml, json, clicks, social interactions, purchase logs, raw text etc.

Velocity:

100 hours of video are uploaded to YouTube every minute; 58 million tweets per day

6

(7)

Big Data processing is *slow*

● MapReduce-like batch

processing can be 10x

or more slower than

RDBMS

● Jobs may take several

hours before they

return a result

(8)

Research Objective

To make data-intensive computation

platforms faster, by reducing:

● the dataset sizes

● the amount of computation

Avoid redundancy in data and computation

8

(9)

Research Questions

Can we improve performance while:

maintaining application

transparency?

being system-independent?

keeping user involvement to the

minimum?

What are the trade-offs?

(10)

Background

(11)

Shared-nothing clusters of commodity

machines

Programming models that express data-

parallelism and abstract communication

Fault-tolerant distributed storage

Incentive to maximize data locality

Common design choices

(12)

Typical Big Data Architecture

12

(13)

MapReduce/Hadoop

A programming abstraction and open-source implementation that transparently handles

parallelization

data distribution

fault-tolerance

Inspired by the functional map and reduce primitives

● Operates on key-value pairs

(14)

MR Programming Model

14

(15)

Apache Pig

● A high-level dataflow

system

 A high-level language:

Pig Latin

 A set of compilers that generate MapReduce jobs

Pig Latin Program

Parser

Logical Optimizer

MR Compiler Hadoop Job Manager

(16)

● Simple language: Pig Latin

○ easy for users familiar with SQL/scripting

lower cost to write and maintain

● Common Operators already provided

○ JOIN, GROUP, FILTER, SORT

● Scalability and Fault-tolerance of Hadoop

Why Pig?

16

(17)

Plan Compilation

Logical Plan Physical Plan MapReduce Plan

(18)

MapReduce Online

mapper

reducer Local

Disk Input

Record map function

Output Record

HTTP request

In original MR, a reducer task cannot fetch the output of a map task which hasn't committed its output to disk

mapper

reducer Input

Record map function

Output

Record TCP- push/pull

18

(19)

MROnline Advantages

● Better performance through pipelining

○ avoid frequent materialization

○ improve reducers’ response times

● Supports online aggregation

○ return partial results

● Improves utilization

○ reduce tasks do not block waiting for mappers to finish (in the same job)

(20)

Stratosphere

● A distributed data

processing system

● Directed Acyclic Graphs

(DAGs) of sources, sinks

and operators

● Abstracts data

partitioning, parallelism,

communication

Input Source 1

Output Sink map

join

Input Source 2

filter

reduce

20

(21)

The Stratosphere Stack

(22)

Contributions

(23)

Thesis Contributions

1.

State-of-the-Art Survey on MapReduce

2.

Integration of Pig and Stratosphere

3.

Approximate Results in MapReduce

4.

Results Materialization and Reuse

5.

Asymmetry in Large-Scale Graph

Analysis

(24)

MapReduce:

Limitations, Optimizations

and Open Issues

The 11th IEEE International Symposium on Parallel and Distributed Processing with Applications (ISPA ’13)

Vasiliki Kalavri, Vladimir Vlassov

17 July 2013, Melbourne, Australia

(25)

Motivation

● Numerous Hadoop variations and

enhancements over the past few years

○ each branching out from vanilla Hadoop

○ hard to choose the appropriate tool

○ no categorization / classification exists

● In our survey

○ overview existing variations

○ classify the optimizations

(26)

MapReduce Limitations

● Performance

initialization, scheduling, coordination

data materialization - intensive disk I/O

● Programming Model

single-input operators

fixed processing pipeline - job chaining

no support for iterations

● Configuration and Automation

sensitive to configuration parameters

complicated tuning

26

(27)

System Major Contribution Open-Source,

Available? Transparent

MR Online Pipelining, Online aggregation yes yes

EARL Fast approximate results yes no

Hadoop++, HAIL Improve relational operations no yes / no

MRShare Concurrent work sharing no no

ReStore Reuse of previous computations no yes

SkewTune Automatic skew mitigation no yes

CoHadoop Data colocation no no

HaLoop Iterations support yes no

Incoop Incremental processing no no

Starfish Dynamic self-tuning no yes

Systems Summary

(28)

Open Issues

● No standard benchmark

● No "typical" MapReduce workload

● Each system is evaluated using different

datasets

applications

deployments

impossible to compare or only compare with vanilla Hadoop

● Application transparency

28

(29)

PonIC:

Using Stratosphere to Speed Up

Pig Analytics

19th International European Conference on Parallel and Distributed Computing (Euro-Par 2013)

Vasiliki Kalavri

1

, Vladimir Vlassov

1

, Per Brand

2

1KTH, 2SICS

30 August 2013, Aachen, Germany

(30)

The limitations and inflexibility of Hadoop are still present

in the backend...

Motivation

materialization

fixed pipeline

single input operators

Replace the execution engine !

30

(31)

PonIC: Pig on Input Contracts

● Pig Latin on Stratosphere

○ translates Pig Logical Plans to Stratosphere DAGs

○ benefits from Stratosphere’s flexibility and efficiency

○ benefits from the optimizer and the automatic physical selection strategies

application transparent

(32)

Plan Optimization in PonIC

Simpler translation process

Simpler final plans

No need for load-store “glue” between jobs

2 levels of plan optimization

32

(33)

PonIC vs. Pig/MapReduce

(34)

Conclusions

● Hadoop’s 2-stage fixed pipeline and

frequent materialization harm Pig’s

performance

● Pig can run on another execution engine

○ without loss of expressiveness

○ with possible performance gains

● Integration with a different backend is

possible after the Logical Plan layer

34

(35)

Block Sampling:

Efficient Accurate Online

Aggregation in MapReduce

5th IEEE International Conference on Cloud Computing Technology and Science (CloudCom 2013)

Vasiliki Kalavri, Vaidas Brundza, Vladimir Vlassov

3 December 2013, Bristol, UK

(36)

Problem and Motivation

Luckily, in many cases results can be useful even before job completion

tolerate some inaccuracy

benefit from faster answers

Big data processing is usually very time- consuming...

… but many applications require results really fast or can only use results for a limited window of time

36

(37)

Online Aggregation

● Apply the reduce function to the data seen so far

● Use % of input processed to estimate accuracy

(38)

Sampling Challenges

Data in HDFS

Disk access is terribly slow

Random disk access for sampling is even slower

Unstructured Data

Sample based on what?

We don’t know the query, we don’t know the key or the value!

5

38

(39)

The Block Sampling Technique

● Sample on the

block-level, before

the data reach the

mapper tasks

● In-memory

shuffling for

better

(40)

Performance - Overhead

snapshot freq = 10%

40

(41)

MapReduce Online vs. Block Sampling

Average Temperature Estimation on Weather Data

Each dot corresponds to one year (10 in total) MapReduce Online

has 100% error (no

estimation at all) for some years

provides an estimate for all 10 years, after

processing 40% of the data

(42)

Conclusions

● Useful results even before job completion

● Disk random access is prohibitively

expensive → efficiently emulate sampling

using in-memory shuffling

Higher sampling rate improves accuracy

but also increases communication costs

42

(43)

m2r2: A Framework for Results

Materialization and Reuse in High-Level

Dataflow Systems for Big Data

2nd International Conference on Big Data Science and Engineering (BDSE 2013)

Vasiliki Kalavri, Hui Shang, Vladimir Vlassov

4 December 2013, Sydney, Australia

(44)

Avoid computational redundancies

○ filter out bad records, spam e-mail

○ data representation transformations

Microsoft has found a 30%-60% similarity

in queries submitted for execution

● A Berkeley MapReduce workload

characterization study shows a big need

for caching job results

Motivation

44

(45)

m2r2: materialize - match - rewrite - reuse

A language-independent framework for

storing

managing and

using

previous job and sub-job results

Operates on the logical plan level, in

order to support different languages and

backend execution engines

(46)

m2r2 Implementation

● Prototype on top of Pig/Hadoop

● Results Cache: HDFS

● Repository: MySQL Cluster

in-memory, highly-available and fault- tolerant

● Garbage Collection: separate module

policy on reuse frequency and last access time

46

(47)

Performance

Materialization Overhead

Execution time without reuse Speedup re-using sub-jobs

(48)

Conclusions

● The logical plan is the proper layer to build a language-independent reuse framework

● When there exists reuse opportunity, query execution time can be immensely reduced

65% on average in our experiments

● The materialization overhead is rather small and I/O dominant

48

(49)

Asymmetry in Large-Scale

Graph Analysis, Explained

2nd International Workshop on Graph Data Management Experiences and Systems (GRADES 2014)

Vasiliki Kalavri1, Stephan Ewen2, Kostas Tzoumas2, Vladimir Vlassov1, Volker Markl2, Seif Haridi1

1KTH, 2TU Berlin

(50)

Motivation

Many of large-scale data processing

applications include fixed point iterations

social network analysis

web graph analysis

machine learning

50

(51)

Asymmetrical Convergence

● Often, in fixed point

iterations, some

elements converge

faster than others

● Not all elements

require an update in

every iteration

(52)

Can we detect the elements that

require recomputation and avoid

redundant computations?

52

(53)

Contributions

● A categorization of optimizations for fixed point iterative graph processing

● Necessary conditions under which, it is safe to apply optimizations

● A mapping of existing techniques to graph processing abstractions

● An implementation of template execution plans

Optimized algorithms yield order of

magnitude gains!

(54)

Asymmetry in Connected Components

54

(55)

Iterative Plans - Bulk

In each iteration,

all elements are

computed

(56)

Iterative Plans - Dependency

In each iteration, only elements whose - at least one - neighbor has changed, are recomputed

in each iteration, only changed elements are emitted in W

before executing the update

function, we need to gather the rest of the dependencies (neighbors

values) of the candidates

56

(57)

Iterative Plans - Incremental

In each iteration, only

changed elements are

recomputed, using

only the changed

neighbors

(58)

Iterative Plans - Delta

In each iteration, only

changed elements are

recomputed, using only

the deltas of changed

neighbors

58

(59)

Iteration Techniques Equivalence

Iteration Technique Equivalent to Bulk? Vertex Activation Vertex Update

Bulk n/a always using values of all in-

neighbors Dependency

always if any in-neighbor is updated

using values of all in- neighbors

Incremental step function idempotent and weakly monotonic

if any in-neighbor is updated

using values of changed in-neighbors

Delta step function linear over composition

operator

if any in-neighbor is updated

using values of changed in-neighbors

(60)

Iteration Techniques Support in

Graph Processing Systems

X : provided by default

X : can be easily implemented X : possible, but non-intuitive

System Bulk Dependency Incremental Delta

Pregel X X X X

GraphLab X X X X

GraphX X X X X

Powergraph X X X X

Stratosphere X X X X

60

(61)

Performance - Connected Components

(62)

Performance - PageRank

62

(63)

Conclusions

● Graph-processing algorithms can be

efficiently implemented using common

relational operators

● Asymmetrical convergence can be

detected and if exploited, can lead to

order of magnitude performance gains

● A cost model is needed to choose the most

(64)

Conclusions & Future Work

(65)

In a data-intensive computation framework

the amount of data and computation can

be reduced by

○ using more efficient backends

○ sampling

○ caching and reuse

○ detecting “inactive” parts of the computation flow

Conclusions

(66)

Can we improve performance while:

maintaining application

transparency?

yes, when re-using the upper layers of the frameworks

○ challenging because most systems are tightly coupled with their backend engines

Revisiting Research Questions (1)

66

(67)

Can we improve performance while:

being system-independent?

most of the time yes, as systems are very frequently designed based on similar

primitives

○ challenging to find the correct level of abstraction

Revisiting Research Questions (2)

(68)

Can we improve performance while:

keeping user involvement to the

minimum?

yes, especially when working with high-level systems

○ challenging to automate configuration

parameters depending on specific workloads

Revisiting Research Questions (3)

68

(69)

What are the trade-offs?

● when using an alternative backend

translation and compilation overheads, data transformations

● when sampling

results accuracy vs. response time

● when caching

materialization, storage and garbage collection overheads

matching and query re-writing

● when detecting inactive parts

tracking dependencies

Revisiting Research Questions (4)

(70)

● Extend m2r2 to other high-level systems, such as Hive and Shark

● Design and implement a cost model for fixed point iterative algorithms

choose the most efficient plan at runtime

● Explore optimization opportunities in other frameworks and application domains

asynchronous execution, real-time graph processing

Future Work

70

(71)

Erasmus Mundus Joint Doctorate in Distributed Computing (emjd-dc) http://emjd-dc.eu/

E2E Clouds Research Project http://e2e-clouds.org/

My advisor, Vladimir Vlassov

My secondary advisors, Christian Schulte and Peter Van Roy (UCL)

Anne Hakansson

My co-authors

My colleagues at KTH and UCL

Anonymous reviwers

Acknowledgement

(72)

Performance Optimization

Techniques and Tools for

Data-Intensive Computation Platforms

Licentiate Seminar Presentation June 11, KTH Kista, Sweden

Vasiliki Kalavri [email protected]

References

Related documents

Conceptualizing advanced nursing practice: Curriculum issues to consider in the educational preparation of advanced practice nurses in

In conclusion, for the studied Taiwanese population of diabetic patients undergoing hemodialysis, increased mortality rates are associated with higher average FPG levels at 1 and

Central government organizations are defined according to the 2008 System of National Accounts (EC et al , 2009), which describes the central government subsector as

Results from the case application are summarized as follows; (1) By applying the pull system to the phase of raw material inventory management, the amount of inflow and

These cavities spent the least amount of time above 35˚C and 40˚C (Fig 9A-F) and thus a model cannot be run because there are so few non- diapausing individuals spending

RNG and k – ω turbulence models, including corrections of these compressibility effects, were applied and results obtained were consistent with experiments: in the three

We propose that hydrodynamic escape of hydrogen rich protoatmospheres, accreted by forming planets, explains the limit in rocky planet size.. Following the hydrodynamic

Someone who holds each type of card will, as the first two columns of Table 4 show, have approximately 5.6 percentage points lower checking account balances (measured relative to