17
SparkOscope: Enabling Apache Spark Optimization Through Cross-Stack Monitoring and Visualization Yiannis Gkoufas IBM Research Dublin,Ireland High Performance Systems

Spark Summit EU talk by Yiannis Gkoufas

Embed Size (px)

Citation preview

Page 1: Spark Summit EU talk by Yiannis Gkoufas

SparkOscope: Enabling Apache Spark Optimization Through Cross-Stack Monitoring and Visualization

Yiannis GkoufasIBM Research Dublin,Ireland

High Performance Systems

Page 2: Spark Summit EU talk by Yiannis Gkoufas

whoami

• Research Software Engineer in IBM Research, Ireland since 2012

• Work on Analytics Foundations Middleware

– Distributed Frameworks, Anything Java/Scala based,

Web-based POCs

• High Performance Systems Group: Kostas,

Andrea, Khalid, Michael, Mustafa, Pier, Sri

Page 3: Spark Summit EU talk by Yiannis Gkoufas

Spark Experience

• We love developing in Spark our analytical

workloads and fully embraced it since the early

1.0.x versions

• Last few years, used it to run jobs on large

volume of energy-related sensor data

Page 4: Spark Summit EU talk by Yiannis Gkoufas

Jobs on Daily Basis

• Once we managed to develop the needed jobs,

they were executed in a recurring fashion

• We were receiving a new batch of data every day

Page 5: Spark Summit EU talk by Yiannis Gkoufas

Fighting Bugs

• When there was a bug on our code, it was very

easy to discover it the Spark Web UI

• We could easily retrieve information about the

job, stage and line number in our source code

Page 6: Spark Summit EU talk by Yiannis Gkoufas

Fighting bottlenecks

• However we couldn’t easily spot which jobs and stages were causing a slow down

• What was the part of our code that was the bottleneck?

Page 7: Spark Summit EU talk by Yiannis Gkoufas

Ganglia Extension

• We had the option to use the Ganglia Extension to export the metrics but:

– We need to maintain/configure yet another external system

– There is no association with the Spark

jobs/stages/source code

Page 8: Spark Summit EU talk by Yiannis Gkoufas

Spark Monitoring Framework

• We could use the built-in Spark Monitoring Framework but:

– Collecting CSVs from the worker nodes and

aggregating them seems cumbersome

– Again we couldn’t easily extract associations with our source code of the job

Page 9: Spark Summit EU talk by Yiannis Gkoufas

Current Monitoring Architecture

Spark Worker1 Spark Worker2

Executor1 Executor2 Executor3 Executor4 Executor5 Executor6

Executor

Source

Executor

Source

Executor

Source

Executor

Source

Executor

Source

Executor

Source

CSV CSV CSV CSV CSV CSV

Job Execution

Monitoring

Framework

Local

Filesystem

Page 10: Spark Summit EU talk by Yiannis Gkoufas

Enter SparkOscope

Page 11: Spark Summit EU talk by Yiannis Gkoufas

SparkOscope Overview

• Extension to enrich Spark’s Monitoring

Framework with OS-level Metrics

• Enhancement of the Web UI to plot all the available metrics + the newly developed OS-

level metrics

Page 12: Spark Summit EU talk by Yiannis Gkoufas

SparkOscope High-level Architecture

Spark Worker1 Spark Worker2

Executor1 Executor2 Executor3 Executor4 Executor5 Executor6

Executor

Sigar

Source

Executor

Sigar

Source

Executor

Sigar

Source

Executor

Sigar

Source

Executor

Sigar

Source

Executor

Sigar

Source

Job Execution

Monitoring

Framework

HDFS /custom-metrics/app-xxxxxxx

/executor1

/executor2

/executor3

/executor4

/executor5

/executor6

Spark Web UI

Page 13: Spark Summit EU talk by Yiannis Gkoufas

SparkOscope Basic Installation

• Clone the git repo: https://github.com/ibm-research-ireland/sparkoscope

• Build Spark

• Modify the configuration files:

metrics.properties spark-defaults.conf

Page 14: Spark Summit EU talk by Yiannis Gkoufas

SparkOscope OS-level Metrics

• Download the Hyperic Sigar library to all the slave nodes

• Extract it anywhere in the system

• Modify the configuration files

metrics.properties spark-env.sh

Page 15: Spark Summit EU talk by Yiannis Gkoufas

Demo!

Page 16: Spark Summit EU talk by Yiannis Gkoufas

Roadmap

• Pluggable storage mechanism (hbase,mongodb,

etc)

• Smart recommendations on infrastructure needs

derived from patterns of resource utilization of

jobs

• Work with the opensource ecosystem to improve

it and target more use cases

Page 17: Spark Summit EU talk by Yiannis Gkoufas

THANK YOU.Questions?

email: [email protected]