29
Performance Characterization of In-Memory Data Analytics on a Scale-up Server Ahsan Javed Awan KTH Royal Institute of Technology

Spark Summit EU talk by Ahsan Javed Awan

Embed Size (px)

Citation preview

Page 1: Spark Summit EU talk by Ahsan Javed Awan

Performance Characterization of In-Memory Data Analytics on a Scale-up ServerAhsan Javed AwanKTH Royal Institute of Technology

Page 2: Spark Summit EU talk by Ahsan Javed Awan

MotivationWhy should we care about architecture support?

Page 3: Spark Summit EU talk by Ahsan Javed Awan

MotivationCont..

*Source: SGI

● Exponential increase in core count.● A mismatch between the characteristics of emerging big data workloads and the

underlying hardware.● Newer promising technologies (Hybrid Memory Cubes, NVRAM etc)

● Clearing the clouds, ASPLOS' 12● Characterizing data analysis

workloads, IISWC' 13● Understanding the behavior of in-

memory computing workloads, IISWC' 14

Page 4: Spark Summit EU talk by Ahsan Javed Awan

MotivationCont...

Improve the node level performancethrough architecture support

*Source: http://navcode.info/2012/12/24/cloud-scaling-schemes/

Phoenix ++,Metis, Ostrich, etc..

Hadoop, Spark,Flink, etc.. Our Focus

Page 5: Spark Summit EU talk by Ahsan Javed Awan

Our ApproachOur Contribution

Problems Identified

Solutions Proposed

Work Time Inflation

Poor Multi-core Scalability of data analytics with Spark

Thread Level Load Imbalance

Wait Time in I/O

GC overhead

DRAM Bound NUMA AwarenessHyper Threaded

Cores

No next-lineprefetchers

Lower DRAM speed

Future node based onHybrid ISP + 2D PIM

PS over G1 GCMultiple Small

executors

Page 6: Spark Summit EU talk by Ahsan Javed Awan

Which Scale-out Framework ?

[Picture Courtesy: Amir H. Payberah]

● Tuning of Spark internal Parameters● Tuning of JVM Parameters (Heap size etc..)● Micro-architecture Level Analysis using Hardware Performance Counters.

Page 7: Spark Summit EU talk by Ahsan Javed Awan

Progress Meeting 12-12-14Which Benchmarks ?

Page 8: Spark Summit EU talk by Ahsan Javed Awan

Our Hardware Configuration

Which Machine ?

Intel's Ivy Bridge Server

Page 9: Spark Summit EU talk by Ahsan Javed Awan

Multicore Scalability of SparkDo Spark workloads have good multi-core scalability?

Spark scales poorly in Scale-up configuration

Page 10: Spark Summit EU talk by Ahsan Javed Awan

Is there a thread level load imbalance ?

Page 11: Spark Summit EU talk by Ahsan Javed Awan

MotivationIs GC detrimental to scalability of Spark applications?

GC time does not scale linearly at larger datasets

Page 12: Spark Summit EU talk by Ahsan Javed Awan

MotivationIs File I/O detrimental to performance ?

Fraction of file I/O increases by 25x in Sort respectively when input data is increased by 4x

Page 13: Spark Summit EU talk by Ahsan Javed Awan

Is there work time inflation ?

Page 14: Spark Summit EU talk by Ahsan Javed Awan

Are workloads DRAM Bound?

Poor instruction retirement due to frequent DRAM accesses

Page 15: Spark Summit EU talk by Ahsan Javed Awan

Do Dataframes perform better than RDDs at micro-architectural level?

DataFrame exhibit 25% less back-end bound stalls 64% less DRAM bound stalled cycles

25% less BW consumption10% less starvation of execution resources

Dataframes have better micro-architectural performance than RDDs

Page 16: Spark Summit EU talk by Ahsan Javed Awan

MotivationThe choice of Garbage Collector impact the data processing

capability of the system

Improvement in DPS ranges from 1.4x to 3.7x on average in Parallel Scavenge as compared to G1

Page 17: Spark Summit EU talk by Ahsan Javed Awan

Our ApproachMultiple Small executors instead of single large executor

Multiple small executors can provide up-to 36% performance gain

Page 18: Spark Summit EU talk by Ahsan Javed Awan

Our ApproachNUMA Awareness

NUMA Awareness results in 10% speed up on average

Page 19: Spark Summit EU talk by Ahsan Javed Awan

Our ApproachHyper Threading is effective

Hyper threading reduces the DRAM bound stalls by 50%

Page 20: Spark Summit EU talk by Ahsan Javed Awan

Our ApproachDisable next-line prefetchers

Disabling next-line prefetchers can improve the performance by 15%

Page 21: Spark Summit EU talk by Ahsan Javed Awan

Our ApproachUse Near Data Computing Architecture

Page 22: Spark Summit EU talk by Ahsan Javed Awan

Our ApproachDisable next-line prefetchers

Disabling next-line prefetchers can improve the performance by 15%

Page 23: Spark Summit EU talk by Ahsan Javed Awan

Our Approach2D PIM vs 3D Stacked PIM

High Bandwidth Memories are not required for Spark

Page 24: Spark Summit EU talk by Ahsan Javed Awan

Our ApproachSub-setting the workloads for ISP

Page 25: Spark Summit EU talk by Ahsan Javed Awan

Our ApproachCont..

Sql_Join Grep

K-Means Windowed Word Count

Page 26: Spark Summit EU talk by Ahsan Javed Awan

Our ApproachCont..

● In-storage processing (ISP) is more suitable for Spark SQL queries.● Implications of 2D processing in memory (PIM) better match the characteristics of

Graph-X and Spark Streaming workloads. ● A hybrid ISP plus 2D PIM architecture is required for Spark MLlib workloads.

Page 27: Spark Summit EU talk by Ahsan Javed Awan

Our ApproachSummary of our work

Problems Identified

Solutions Proposed

Work Time Inflation

Poor Multi-core Scalability of data analytics with Spark

Thread Level Load Imbalance

Wait Time in I/O

GC overhead

DRAM Bound NUMA AwarenessHyper Threaded

Cores

No next-lineprefetchers

Lower DRAM speed

Future node based onHybrid ISP + 2D PIM

PS over G1 GCMultiple Small

executors

Page 28: Spark Summit EU talk by Ahsan Javed Awan

Our ApproachFurther Reading

● Performance characterization of in-memory data analytics on a modern cloud server, in 5th IEEE Conference on Big Data and Cloud Computing, 2015 (Best Paper Award).

● How Data Volume Affects Spark Based Data Analytics on a Scale-up Server in 6th Workshop on Big Data Benchmarks, Performance Optimization and Emerging Hardware (BpoE), held in conjunction with VLDB 2015, Hawaii, USA .

● Micro-architectural Characterization of Apache Spark on Batch and Stream Processing Workloads, in 6th IEEE Conference on Big Data and Cloud Computing, 2016.

● Node Architecture Implications for In-Memory Data Analytics in Scale-in Clusters in 3rd IEEE/ACM Conference in Big Data Computing, Applications and Technologies, 2016.

● Implications of In-Memory Data Analytics with Apache Spark on Near Data Computing Architectures (under submission).

Page 29: Spark Summit EU talk by Ahsan Javed Awan

THANK YOU.Email: [email protected]: www.kth.se/profile/ajawan/

Acknowledgements: Mats Brorsson(KTH)Vladimir Vlassov(KTH)Eduard Ayguade(UPC/BSC)