SlideShare a Scribd company logo
1 of 72
Download to read offline
© 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Jonathan Fritz, Sr. Product Manager – Amazon EMR
Manjeet Chayel, Specialist Solutions Architect
October 2015
BDT309
Data Science & Best Practices for
Apache Spark on Amazon EMR
What to Expect from the Session
• Data science with Apache Spark
• Running Spark on Amazon EMR
• Customer use cases and architectures
• Best practices for running Spark
• Demo: Using Apache Zeppelin to analyze US domestic
flights dataset
Spark is fast
join
filter
groupBy
Stage 3
Stage 1
Stage 2
A: B:
C: D: E:
F:
= cached partition= RDD
map
• Massively parallel
• Uses DAGs instead of map-
reduce for execution
• Minimizes I/O by storing data
in RDDs in memory
• Partitioning-aware to avoid
network-intensive shuffle
Spark components to match your use case
Spark speaks your language
And more!
Apache Zeppelin notebook to develop queries
Now available on
Amazon EMR 4.1.0!
Use DataFrames to easily interact with data
• Distributed
collection of data
organized in
columns
• An extension of the
existing RDD API
• Optimized for query
execution
Easily create DataFrames from many formats
RDD
Load data with the Spark SQL Data Sources API
Additional libraries at spark-packages.org
Sample DataFrame manipulations
Use DataFrames for machine learning
• Spark ML libraries
(replacing MLlib) use
DataFrames as
input/output for
models
• Create ML pipelines
with a variety of
distributed algorithms
Create DataFrames on streaming data
• Access data in Spark Streaming DStream
• Create SQLContext on the SparkContext used for Spark
Streaming application for ad hoc queries
• Incorporate DataFrame in Spark Streaming application
Use R to interact with DataFrames
• SparkR package for using R to manipulate DataFrames
• Create SparkR applications or interactively use the SparkR
shell (no Zeppelin support yet - ZEPPELIN-156)
• Comparable performance to Python and Scala
DataFrames
Spark SQL
• Seamlessly mix SQL with Spark programs
• Uniform data access
• Hive compatibility – run Hive queries without
modifications using HiveContext
• Connect through JDBC/ODBC
Running Spark on
Amazon EMR
Focus on deriving insights from your data
instead of manually configuring clusters
Easy to install and
configure Spark
Secured
Spark submit or use
Zeppelin UI
Quickly add
and remove capacity
Hourly, reserved, or
EC2 Spot pricing
Use S3 to decouple
compute and storage
Launch the latest Spark version
July 15 – Spark 1.4.1 GA release
July 24 – Spark 1.4.1 available on Amazon EMR
September 9 – Spark 1.5.0 GA release
September 30 – Spark 1.5.0 available on Amazon EMR
< 3 week cadence with latest open source release
Amazon EMR runs Spark on YARN
• Dynamically share and centrally configure
the same pool of cluster resources across
engines
• Schedulers for categorizing, isolating, and
prioritizing workloads
• Choose the number of executors to use, or
allow YARN to choose (dynamic allocation)
• Kerberos authentication
Storage
S3, HDFS
YARN
Cluster Resource Management
Batch
MapReduce
In Memory
Spark
Applications
Pig, Hive, Cascading, Spark Streaming, Spark SQL
Create a fully configured cluster in minutes
AWS Management
Console
AWS Command Line
Interface (CLI)
Or use an AWS SDK directly with the Amazon EMR API
Or easily change your settings
Many storage layers to choose from
Amazon DynamoDB
EMR-DynamoDB
connector
Amazon RDS
Amazon
Kinesis
Streaming data
connectorsJDBC Data Source
w/ Spark SQL
Elasticsearch
connector
Amazon Redshift
Amazon Redshift Copy
From HDFS
EMR File System
(EMRFS)
Amazon S3
Amazon EMR
Decouple compute and storage by using S3
as your data layer
HDFS
S3 is designed for 11
9’s of durability and is
massively scalable
EC2 Instance
Memory
Amazon S3
Amazon EMR
Amazon EMR
Amazon EMR
Easy to run your Spark workloads
Amazon EMR Step API
SSH to master node
(Spark Shell)
Submit a Spark
application
Amazon EMR
Secure Spark clusters – encryption at rest
On-Cluster
HDFS transparent encryption (AES 256)
[new on release emr-4.1.0]
Local disk encryption for temporary files
using LUKS encryption via bootstrap action
Amazon S3
Amazon S3
EMRFS support for Amazon S3 client-side
and server-side encryption (AES 256)
Secure Spark clusters – encryption in flight
Internode communication on-cluster
Blocks are encrypted in-transit in HDFS
when using transparent encryption
Spark’s Broadcast and FileServer services
can use SSL. BlockTransferService (for
shuffle) can’t use SSL (SPARK-5682).
Amazon S3
S3 to Amazon EMR cluster
Secure communication with SSL
Objects encrypted over the wire if using
client-side encryption
Secure Spark clusters – additional features
Permissions:
• Cluster level: IAM roles for the Amazon
EMR service and the cluster
• Application level: Kerberos (Spark on
YARN only)
• Amazon EMR service level: IAM users
Access: VPC, security groups
Auditing: AWS CloudTrail
Customer use cases
Some of our customers running Spark on Amazon EMR
Best Practices for
Spark on Amazon EMR
• Using correct instance
• Understanding Executors
• Sizing your executors
• Dynamic allocation on YARN
• Understanding storage layers
• File formats and compression
• Boost your performance
• Data serialization
• Avoiding shuffle
• Managing partitions
• RDD Persistence
• Using Zeppelin notebook
What does Spark need?
• Memory – lots of it!!
• Network
• CPU
• Horizontal Scaling
Workflow Resource
Machine learning CPU
ETL I/O
Instance
Try different configurations to find your optimal architecture.
CPU
c1 family
c3 family
cc1.4xlarge
cc2.8xlarge
Memory
m2 family
r3 family
cr1.8xlarge
Disk/IO
d2 family
i2 family
General
m1 family
m3 family
Choose your instance types
Batch Machine Interactive Large
process learning Analysis HDFS
• Using correct instance
• Understanding Executors
• Sizing your executors
• Dynamic allocation on YARN
• Understanding storage layers
• File formats and compression
• Caching tables
• Boost your performance
• Data serialization
• Avoiding shuffle
• Managing partitions
• RDD Persistence
How Spark executes
• Spark Driver
• Executor
Spark Driver
Executor
Spark Executor on YARN
This is where all the action happens
- How to select number of executors?
- How many cores per executor?
- Example
Sample Amazon EMR cluster
Model vCPU Mem (GB) SSD
Storage
(GB)
Networking
r3.large 2 15.25 1 x 32 Moderate
r3.xlarge 4 30.5 1 x 80 Moderate
r3.2xlarge 8 61 1 x 160 High
r3.4xlarge 16 122 1 x 320 High
r3.8xlarge 32 244 2 x 320 10 Gigabit
Create Amazon EMR cluster
$ aws emr create-cluster --name ”Spark cluster” 
--release-label emr-4.1.0 
--applications Name=Hive Name=Spark 
--use-default-roles 
--ec2-attributes KeyName=myKey --instance-type r3.4xlarge 
--instance-count 6 
--no-auto-terminate
Selecting number of executor cores:
• Leave 1 core for OS and other activities
• 4-5 cores per executor gives a good performance
• Each executor can run up to 4-5 tasks
• i.e. 4-5 threads for read/write operations to HDFS
Inside Spark Executor on YARN
Selecting number of executor cores:
--num-executors or spark.executor.instances
• 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑒𝑥𝑒𝑐𝑢𝑡𝑜𝑟𝑠 𝑝𝑒𝑟 𝑛𝑜𝑑𝑒 =
(𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑐𝑜𝑟𝑒𝑠 𝑜𝑛 𝑛𝑜𝑑𝑒 −1 𝑓𝑜𝑟 𝑂𝑆 )
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑡𝑎𝑠𝑘 𝑝𝑒𝑟 𝑒𝑥𝑒𝑐𝑢𝑡𝑜𝑟
•
16 −1
5
= 3 𝑒𝑥𝑒𝑐𝑢𝑡𝑜𝑟𝑠 𝑝𝑒𝑟 𝑛𝑜𝑑𝑒
Inside Spark Executor on YARN
Model vCPU Mem (GB) SSD
Storage
(GB)
Networking
r3.4xlarge 16 122 1 x 320 High
Selecting number of executor cores:
--num-executors or spark.executor.instances
•
16 −1
5
= 3 𝑒𝑥𝑒𝑐𝑢𝑡𝑜𝑟𝑠 𝑝𝑒𝑟 𝑛𝑜𝑑𝑒
• 6 instances
• 𝑛𝑢𝑚 𝑜𝑓 𝑒𝑥𝑒𝑐𝑢𝑡𝑜𝑟𝑠 = 3 ∗ 6 − 1 = 𝟏𝟕
Inside Spark Executor on YARN
Inside Spark Executor on YARN
Max Container size on node
YARN Container Controls the max sum of memory used by the container
yarn.nodemanager.resource.memory-mb
→
Default: 116 GConfig File: yarn-site.xml
Inside Spark Executor on YARN
Max Container size on node
Executor space Where Spark executor Runs
Executor Container
→
Inside Spark Executor on YARN
Max Container size on node
Executor Memory Overhead - Off heap memory (VM overheads, interned strings etc.)
𝑠𝑝𝑎𝑟𝑘. 𝑦𝑎𝑟𝑛. 𝑒𝑥𝑒𝑐𝑢𝑡𝑜𝑟. 𝑚𝑒𝑚𝑜𝑟𝑦𝑂𝑣𝑒𝑟ℎ𝑒𝑎𝑑 = 𝑒𝑥𝑒𝑐𝑢𝑡𝑜𝑟𝑀𝑒𝑚𝑜𝑟𝑦 ∗ 0.10
Executor Container
Memory
Overhead
Config File: spark-default.conf
Inside Spark Executor on YARN
Max Container size on node
Spark executor memory - Amount of memory to use per executor process
spark.executor.memory
Executor Container
Memory
Overhead
Spark Executor Memory
Config File: spark-default.conf
Inside Spark Executor on YARN
Max Container size on node
Shuffle Memory Fraction- Fraction of Java heap to use for aggregation and cogroups
during shuffles
spark.shuffle.memoryFraction
Executor Container
Memory
Overhead
Spark Executor Memory
Shuffle
memoryFraction
Default: 0.2
Inside Spark Executor on YARN
Max Container size on node
Storage storage Fraction - Fraction of Java heap to use for Spark's memory cache
spark.storage.memoryFraction
Executor Container
Memory
Overhead
Spark Executor Memory
Shuffle
memoryFraction
Storage
memoryFraction
Default: 0.6
Inside Spark Executor on YARN
Max Container size on node
--executor-memory or spark.executor.memory
𝐸𝑥𝑒𝑐𝑢𝑡𝑜𝑟 𝑚𝑒𝑚𝑜𝑟𝑦 =
𝑀𝑎𝑥 𝑐𝑜𝑛𝑡𝑎𝑖𝑛𝑒𝑟 𝑠𝑖𝑧𝑒
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑒𝑥𝑒𝑐𝑢𝑡𝑜𝑟 𝑝𝑒𝑟 𝑛𝑜𝑑𝑒
Config File: spark-default.conf
Inside Spark Executor on YARN
Max Container size on node
--executor-memory or spark.executor.memory
𝐸𝑥𝑒𝑐𝑢𝑡𝑜𝑟 𝑚𝑒𝑚𝑜𝑟𝑦 =
116 𝐺
3
~=38 G
Config File: spark-default.conf
Inside Spark Executor on YARN
Max Container size on node
--executor-memory or spark.executor.memory
𝑀𝑒𝑚𝑜𝑟𝑦 𝑂𝑣𝑒𝑟ℎ𝑒𝑎𝑑 => 38 ∗ 0.10 => 3.8 𝐺
Config File: spark-default.conf
Inside Spark Executor on YARN
Max Container size on node
--executor-memory or spark.executor.memory
𝐸𝑥𝑒𝑐𝑢𝑡𝑜𝑟 𝑀𝑒𝑚𝑜𝑟𝑦 => 38 − 3.8 => ~34 𝐺𝐵
Config File: spark-default.conf
Optimal setting:
--num-executors 17
--executor-cores 5
--executor-memory 34G
Inside Spark Executor on YARN
Optimal setting:
--num-executors 17
--executor-cores 5
--executor-memory 34G
Inside Spark Executor on YARN
• Using correct instance
• Understanding Executors
• Sizing your executors
• Dynamic allocation on YARN
• Understanding storage layers
• File formats and compression
• Boost your performance
• Data serialization
• Avoiding shuffle
• Managing partitions
• RDD Persistence
• Using Zeppelin Notebook
Dynamic Allocation on YARN
… allows your Spark applications to scale up based on
demand and scale down when not required.
Remove Idle executors,
Request more on demand
Dynamic Allocation on YARN
Scaling up on executors
- Request when you want the job to complete faster
- Idle resources on cluster
- Exponential increase in executors over time
Dynamic allocation setup
Property Value
Spark.dynamicAllocation.enabled true
Spark.shuffle.service.enabled true
spark.dynamicAllocation.minExecutors 5
spark.dynamicAllocation.maxExecutors 17
spark.dynamicAllocation.initalExecutors 0
sparkdynamicAllocation.executorIdleTime 60s
spark.dynamicAllocation.schedulerBacklogTimeout 5s
spark.dynamicAllocation.sustainedSchedulerBackl
ogTimeout
5s
Optional
• Using correct instance
• Understanding Executors
• Sizing your executors
• Dynamic allocation on YARN
• Understanding storage layers
• File formats and compression
• Boost your performance
• Data serialization
• Avoiding shuffle
• Managing partitions
• RDD Persistence
• Using Zeppelin notebook
Compressions
• Always compress data files on Amazon S3
• Reduces storage cost
• Reduces bandwidth between Amazon S3 and
Amazon EMR
• Speeds up your job
Compressions
Compression types:
– Some are fast BUT offer less space reduction
– Some are space efficient BUT slower
– Some are split able and some are not
Algorithm % Space
Remaining
Encoding
Speed
Decoding
Speed
GZIP 13% 21MB/s 118MB/s
LZO 20% 135MB/s 410MB/s
Snappy 22% 172MB/s 409MB/s
Compressions
• If you are time-sensitive, faster compressions are a
better choice
• If you have large amount of data, use space-efficient
compressions
• If you don’t care, pick GZIP
• Using correct instance
• Understanding Executors
• Sizing your executors
• Dynamic allocation on YARN
• Understanding storage layers
• File formats and compression
• Boost your performance
• Data serialization
• Avoiding shuffle
• Managing partitions
• RDD Persistence
• Using Zeppelin notebook
Data Serialization
• Data is serialized when cached or shuffled
Default: Java serializer
Memory
Disk
Memory
Disk
Spark executor
Data Serialization
• Data is serialized when cached or shuffled
Default: Java serializer
• Kyro serialization (10x faster than Java serialization)
• Does not support all Serializable types
• Register the class in advance
Usage: Set in SparkConf
conf.set("spark.serializer”,"org.apache.spark.serializer.KryoSerializer")
Spark doesn’t like to Shuffle
• Shuffling is expensive
• Disk I/O
• Data Serialization
• Network I/O
• Spill to disk
• Increased Garbage collection
• Use aggregateByKey() instead of your own aggregator
Usage:
myRDD.aggregateByKey(0)((k,v) => v.toInt+k, (v,k) => k+v).collect
• Apply filter earlier on data
Parallelism & Partitions
𝑠𝑝𝑎𝑟𝑘. 𝑑𝑒𝑓𝑎𝑢𝑙𝑡. 𝑝𝑎𝑟𝑎𝑙𝑙𝑒𝑙𝑖𝑠𝑚
• getNumPartitions()
• If you have >10K tasks, then its good to coalesce
• If you are not using all the slots on cluster, repartition can
increase parallelism
• 2-3 tasks per CPU core in your cluster
Config File: spark-default.conf
RDD Persistence
• Caching or persisting dataset in memory
• Methods
• cache()
• persist()
• Small RDD  MEMORY_ONLY
• Big RDD  MEMORY_ONLY_SER (CPU intensive)
• Don’t spill to disk
• Use replicated storage for faster recovery
Zeppelin and Spark
on Amazon EMR
Remember to complete
your evaluations!
Thank you!

More Related Content

What's hot

Building a Modern Data Architecture on AWS - Webinar
Building a Modern Data Architecture on AWS - WebinarBuilding a Modern Data Architecture on AWS - Webinar
Building a Modern Data Architecture on AWS - WebinarAmazon Web Services
 
Deep Dive on the Amazon Aurora PostgreSQL-compatible Edition - DAT402 - re:In...
Deep Dive on the Amazon Aurora PostgreSQL-compatible Edition - DAT402 - re:In...Deep Dive on the Amazon Aurora PostgreSQL-compatible Edition - DAT402 - re:In...
Deep Dive on the Amazon Aurora PostgreSQL-compatible Edition - DAT402 - re:In...Amazon Web Services
 
Loading Data into Amazon Redshift
Loading Data into Amazon RedshiftLoading Data into Amazon Redshift
Loading Data into Amazon RedshiftAmazon Web Services
 
開発者におくるサーバーレスモニタリング
開発者におくるサーバーレスモニタリング開発者におくるサーバーレスモニタリング
開発者におくるサーバーレスモニタリングAmazon Web Services Japan
 
Apache Camel v3, Camel K and Camel Quarkus
Apache Camel v3, Camel K and Camel QuarkusApache Camel v3, Camel K and Camel Quarkus
Apache Camel v3, Camel K and Camel QuarkusClaus Ibsen
 
Amazon SageMaker 모델 배포 방법 소개::김대근, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나
Amazon SageMaker 모델 배포 방법 소개::김대근, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나Amazon SageMaker 모델 배포 방법 소개::김대근, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나
Amazon SageMaker 모델 배포 방법 소개::김대근, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나Amazon Web Services Korea
 
Amazon Redshift 아키텍처 및 모범사례::김민성::AWS Summit Seoul 2018
Amazon Redshift 아키텍처 및 모범사례::김민성::AWS Summit Seoul 2018Amazon Redshift 아키텍처 및 모범사례::김민성::AWS Summit Seoul 2018
Amazon Redshift 아키텍처 및 모범사례::김민성::AWS Summit Seoul 2018Amazon Web Services Korea
 
Aurora Serverless: Scalable, Cost-Effective Application Deployment (DAT336) -...
Aurora Serverless: Scalable, Cost-Effective Application Deployment (DAT336) -...Aurora Serverless: Scalable, Cost-Effective Application Deployment (DAT336) -...
Aurora Serverless: Scalable, Cost-Effective Application Deployment (DAT336) -...Amazon Web Services
 
Programming in Spark using PySpark
Programming in Spark using PySpark      Programming in Spark using PySpark
Programming in Spark using PySpark Mostafa
 
Aurora MySQL Backtrack을 이용한 빠른 복구 방법 - 진교선 :: AWS Database Modernization Day 온라인
Aurora MySQL Backtrack을 이용한 빠른 복구 방법 - 진교선 :: AWS Database Modernization Day 온라인Aurora MySQL Backtrack을 이용한 빠른 복구 방법 - 진교선 :: AWS Database Modernization Day 온라인
Aurora MySQL Backtrack을 이용한 빠른 복구 방법 - 진교선 :: AWS Database Modernization Day 온라인Amazon Web Services Korea
 
Delta lake and the delta architecture
Delta lake and the delta architectureDelta lake and the delta architecture
Delta lake and the delta architectureAdam Doyle
 
Diving into Delta Lake: Unpacking the Transaction Log
Diving into Delta Lake: Unpacking the Transaction LogDiving into Delta Lake: Unpacking the Transaction Log
Diving into Delta Lake: Unpacking the Transaction LogDatabricks
 
AWS Black Belt Online Seminar 2016 AWS上でのサーバーレスアーキテクチャ入門
AWS Black Belt Online Seminar 2016 AWS上でのサーバーレスアーキテクチャ入門AWS Black Belt Online Seminar 2016 AWS上でのサーバーレスアーキテクチャ入門
AWS Black Belt Online Seminar 2016 AWS上でのサーバーレスアーキテクチャ入門Amazon Web Services Japan
 
AWS Storage - S3 Fundamentals
AWS Storage - S3 FundamentalsAWS Storage - S3 Fundamentals
AWS Storage - S3 FundamentalsPiyush Agrawal
 
KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...
KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...
KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...Amazon Web Services Korea
 
AWS Application Migration Service-Hands-On Guide
AWS Application Migration Service-Hands-On GuideAWS Application Migration Service-Hands-On Guide
AWS Application Migration Service-Hands-On GuideManas Mondal
 
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
5 Critical Steps to Clean Your Data Swamp When Migrating Off of HadoopDatabricks
 
AWS Black Belt Online Seminar 2017 Docker on AWS
AWS Black Belt Online Seminar 2017 Docker on AWSAWS Black Belt Online Seminar 2017 Docker on AWS
AWS Black Belt Online Seminar 2017 Docker on AWSAmazon Web Services Japan
 
RDS Postgres and Aurora Postgres | AWS Public Sector Summit 2017
RDS Postgres and Aurora Postgres | AWS Public Sector Summit 2017RDS Postgres and Aurora Postgres | AWS Public Sector Summit 2017
RDS Postgres and Aurora Postgres | AWS Public Sector Summit 2017Amazon Web Services
 

What's hot (20)

Building a Modern Data Architecture on AWS - Webinar
Building a Modern Data Architecture on AWS - WebinarBuilding a Modern Data Architecture on AWS - Webinar
Building a Modern Data Architecture on AWS - Webinar
 
Deep Dive on the Amazon Aurora PostgreSQL-compatible Edition - DAT402 - re:In...
Deep Dive on the Amazon Aurora PostgreSQL-compatible Edition - DAT402 - re:In...Deep Dive on the Amazon Aurora PostgreSQL-compatible Edition - DAT402 - re:In...
Deep Dive on the Amazon Aurora PostgreSQL-compatible Edition - DAT402 - re:In...
 
Loading Data into Amazon Redshift
Loading Data into Amazon RedshiftLoading Data into Amazon Redshift
Loading Data into Amazon Redshift
 
開発者におくるサーバーレスモニタリング
開発者におくるサーバーレスモニタリング開発者におくるサーバーレスモニタリング
開発者におくるサーバーレスモニタリング
 
Apache Camel v3, Camel K and Camel Quarkus
Apache Camel v3, Camel K and Camel QuarkusApache Camel v3, Camel K and Camel Quarkus
Apache Camel v3, Camel K and Camel Quarkus
 
Amazon SageMaker 모델 배포 방법 소개::김대근, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나
Amazon SageMaker 모델 배포 방법 소개::김대근, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나Amazon SageMaker 모델 배포 방법 소개::김대근, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나
Amazon SageMaker 모델 배포 방법 소개::김대근, AI/ML 스페셜리스트 솔루션즈 아키텍트, AWS::AWS AIML 스페셜 웨비나
 
Amazon Redshift 아키텍처 및 모범사례::김민성::AWS Summit Seoul 2018
Amazon Redshift 아키텍처 및 모범사례::김민성::AWS Summit Seoul 2018Amazon Redshift 아키텍처 및 모범사례::김민성::AWS Summit Seoul 2018
Amazon Redshift 아키텍처 및 모범사례::김민성::AWS Summit Seoul 2018
 
Aurora Serverless: Scalable, Cost-Effective Application Deployment (DAT336) -...
Aurora Serverless: Scalable, Cost-Effective Application Deployment (DAT336) -...Aurora Serverless: Scalable, Cost-Effective Application Deployment (DAT336) -...
Aurora Serverless: Scalable, Cost-Effective Application Deployment (DAT336) -...
 
Programming in Spark using PySpark
Programming in Spark using PySpark      Programming in Spark using PySpark
Programming in Spark using PySpark
 
Aurora MySQL Backtrack을 이용한 빠른 복구 방법 - 진교선 :: AWS Database Modernization Day 온라인
Aurora MySQL Backtrack을 이용한 빠른 복구 방법 - 진교선 :: AWS Database Modernization Day 온라인Aurora MySQL Backtrack을 이용한 빠른 복구 방법 - 진교선 :: AWS Database Modernization Day 온라인
Aurora MySQL Backtrack을 이용한 빠른 복구 방법 - 진교선 :: AWS Database Modernization Day 온라인
 
Delta lake and the delta architecture
Delta lake and the delta architectureDelta lake and the delta architecture
Delta lake and the delta architecture
 
Amazon Aurora
Amazon AuroraAmazon Aurora
Amazon Aurora
 
Diving into Delta Lake: Unpacking the Transaction Log
Diving into Delta Lake: Unpacking the Transaction LogDiving into Delta Lake: Unpacking the Transaction Log
Diving into Delta Lake: Unpacking the Transaction Log
 
AWS Black Belt Online Seminar 2016 AWS上でのサーバーレスアーキテクチャ入門
AWS Black Belt Online Seminar 2016 AWS上でのサーバーレスアーキテクチャ入門AWS Black Belt Online Seminar 2016 AWS上でのサーバーレスアーキテクチャ入門
AWS Black Belt Online Seminar 2016 AWS上でのサーバーレスアーキテクチャ入門
 
AWS Storage - S3 Fundamentals
AWS Storage - S3 FundamentalsAWS Storage - S3 Fundamentals
AWS Storage - S3 Fundamentals
 
KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...
KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...
KB국민카드 - 클라우드 기반 분석 플랫폼 혁신 여정 - 발표자: 박창용 과장, 데이터전략본부, AI혁신부, KB카드│강병억, Soluti...
 
AWS Application Migration Service-Hands-On Guide
AWS Application Migration Service-Hands-On GuideAWS Application Migration Service-Hands-On Guide
AWS Application Migration Service-Hands-On Guide
 
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
5 Critical Steps to Clean Your Data Swamp When Migrating Off of Hadoop
 
AWS Black Belt Online Seminar 2017 Docker on AWS
AWS Black Belt Online Seminar 2017 Docker on AWSAWS Black Belt Online Seminar 2017 Docker on AWS
AWS Black Belt Online Seminar 2017 Docker on AWS
 
RDS Postgres and Aurora Postgres | AWS Public Sector Summit 2017
RDS Postgres and Aurora Postgres | AWS Public Sector Summit 2017RDS Postgres and Aurora Postgres | AWS Public Sector Summit 2017
RDS Postgres and Aurora Postgres | AWS Public Sector Summit 2017
 

Viewers also liked

Best Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWSBest Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWSAmazon Web Services
 
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...Amazon Web Services
 
[Gaming on AWS] 모바일 게임 데이터의 특성과 100% 활용법 - 5Rocks
[Gaming on AWS] 모바일 게임 데이터의 특성과 100% 활용법 - 5Rocks[Gaming on AWS] 모바일 게임 데이터의 특성과 100% 활용법 - 5Rocks
[Gaming on AWS] 모바일 게임 데이터의 특성과 100% 활용법 - 5RocksAmazon Web Services Korea
 
AWS April 2016 Webinar Series - Best Practices for Apache Spark on AWS
AWS April 2016 Webinar Series - Best Practices for Apache Spark on AWSAWS April 2016 Webinar Series - Best Practices for Apache Spark on AWS
AWS April 2016 Webinar Series - Best Practices for Apache Spark on AWSAmazon Web Services
 
Best Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWSBest Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWSAmazon Web Services
 
[NDC 2011] 게임 개발자를 위한 데이터분석의 도입
[NDC 2011] 게임 개발자를 위한 데이터분석의 도입[NDC 2011] 게임 개발자를 위한 데이터분석의 도입
[NDC 2011] 게임 개발자를 위한 데이터분석의 도입Hoon Park
 
쿠키런 1년, 서버개발 분투기
쿠키런 1년, 서버개발 분투기쿠키런 1년, 서버개발 분투기
쿠키런 1년, 서버개발 분투기Brian Hong
 

Viewers also liked (7)

Best Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWSBest Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWS
 
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...
Apache Hadoop and Spark on AWS: Getting started with Amazon EMR - Pop-up Loft...
 
[Gaming on AWS] 모바일 게임 데이터의 특성과 100% 활용법 - 5Rocks
[Gaming on AWS] 모바일 게임 데이터의 특성과 100% 활용법 - 5Rocks[Gaming on AWS] 모바일 게임 데이터의 특성과 100% 활용법 - 5Rocks
[Gaming on AWS] 모바일 게임 데이터의 특성과 100% 활용법 - 5Rocks
 
AWS April 2016 Webinar Series - Best Practices for Apache Spark on AWS
AWS April 2016 Webinar Series - Best Practices for Apache Spark on AWSAWS April 2016 Webinar Series - Best Practices for Apache Spark on AWS
AWS April 2016 Webinar Series - Best Practices for Apache Spark on AWS
 
Best Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWSBest Practices for Using Apache Spark on AWS
Best Practices for Using Apache Spark on AWS
 
[NDC 2011] 게임 개발자를 위한 데이터분석의 도입
[NDC 2011] 게임 개발자를 위한 데이터분석의 도입[NDC 2011] 게임 개발자를 위한 데이터분석의 도입
[NDC 2011] 게임 개발자를 위한 데이터분석의 도입
 
쿠키런 1년, 서버개발 분투기
쿠키런 1년, 서버개발 분투기쿠키런 1년, 서버개발 분투기
쿠키런 1년, 서버개발 분투기
 

Similar to (BDT309) Data Science & Best Practices for Apache Spark on Amazon EMR

Data Science & Best Practices for Apache Spark on Amazon EMR
Data Science & Best Practices for Apache Spark on Amazon EMRData Science & Best Practices for Apache Spark on Amazon EMR
Data Science & Best Practices for Apache Spark on Amazon EMRAmazon Web Services
 
Data science with spark on amazon EMR - Pop-up Loft Tel Aviv
Data science with spark on amazon EMR - Pop-up Loft Tel AvivData science with spark on amazon EMR - Pop-up Loft Tel Aviv
Data science with spark on amazon EMR - Pop-up Loft Tel AvivAmazon Web Services
 
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMR
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMRSpark and the Hadoop Ecosystem: Best Practices for Amazon EMR
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMRAmazon Web Services
 
Apache Spark and the Hadoop Ecosystem on AWS
Apache Spark and the Hadoop Ecosystem on AWSApache Spark and the Hadoop Ecosystem on AWS
Apache Spark and the Hadoop Ecosystem on AWSAmazon Web Services
 
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMR
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMRSpark and the Hadoop Ecosystem: Best Practices for Amazon EMR
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMRAmazon Web Services
 
Apache Spark and the Hadoop Ecosystem on AWS
Apache Spark and the Hadoop Ecosystem on AWSApache Spark and the Hadoop Ecosystem on AWS
Apache Spark and the Hadoop Ecosystem on AWSAmazon Web Services
 
Lighting your Big Data Fire with Apache Spark
Lighting your Big Data Fire with Apache SparkLighting your Big Data Fire with Apache Spark
Lighting your Big Data Fire with Apache SparkAmazon Web Services
 
Amazon Elastic Map Reduce: the concepts
Amazon Elastic Map Reduce: the conceptsAmazon Elastic Map Reduce: the concepts
Amazon Elastic Map Reduce: the concepts Julien SIMON
 
(BDT208) A Technical Introduction to Amazon Elastic MapReduce
(BDT208) A Technical Introduction to Amazon Elastic MapReduce(BDT208) A Technical Introduction to Amazon Elastic MapReduce
(BDT208) A Technical Introduction to Amazon Elastic MapReduceAmazon Web Services
 
Amazon EMR Deep Dive & Best Practices
Amazon EMR Deep Dive & Best PracticesAmazon EMR Deep Dive & Best Practices
Amazon EMR Deep Dive & Best PracticesAmazon Web Services
 
Scaling your analytics with Amazon EMR
Scaling your analytics with Amazon EMRScaling your analytics with Amazon EMR
Scaling your analytics with Amazon EMRIsrael AWS User Group
 
Spark 101 - First steps to distributed computing
Spark 101 - First steps to distributed computingSpark 101 - First steps to distributed computing
Spark 101 - First steps to distributed computingDemi Ben-Ari
 
(BDT303) Running Spark and Presto on the Netflix Big Data Platform
(BDT303) Running Spark and Presto on the Netflix Big Data Platform(BDT303) Running Spark and Presto on the Netflix Big Data Platform
(BDT303) Running Spark and Presto on the Netflix Big Data PlatformAmazon Web Services
 
AWS re:Invent 2016: Workshop: Stretching Scalability: Doing more with Amazon ...
AWS re:Invent 2016: Workshop: Stretching Scalability: Doing more with Amazon ...AWS re:Invent 2016: Workshop: Stretching Scalability: Doing more with Amazon ...
AWS re:Invent 2016: Workshop: Stretching Scalability: Doing more with Amazon ...Amazon Web Services
 
Running Presto and Spark on the Netflix Big Data Platform
Running Presto and Spark on the Netflix Big Data PlatformRunning Presto and Spark on the Netflix Big Data Platform
Running Presto and Spark on the Netflix Big Data PlatformEva Tse
 
Spark & Yarn better together 1.2
Spark & Yarn better together 1.2Spark & Yarn better together 1.2
Spark & Yarn better together 1.2Jianfeng Zhang
 
Spark to Production @Windward
Spark to Production @WindwardSpark to Production @Windward
Spark to Production @WindwardDemi Ben-Ari
 

Similar to (BDT309) Data Science & Best Practices for Apache Spark on Amazon EMR (20)

Data Science & Best Practices for Apache Spark on Amazon EMR
Data Science & Best Practices for Apache Spark on Amazon EMRData Science & Best Practices for Apache Spark on Amazon EMR
Data Science & Best Practices for Apache Spark on Amazon EMR
 
Data science with spark on amazon EMR - Pop-up Loft Tel Aviv
Data science with spark on amazon EMR - Pop-up Loft Tel AvivData science with spark on amazon EMR - Pop-up Loft Tel Aviv
Data science with spark on amazon EMR - Pop-up Loft Tel Aviv
 
Masterclass Live: Amazon EMR
Masterclass Live: Amazon EMRMasterclass Live: Amazon EMR
Masterclass Live: Amazon EMR
 
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMR
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMRSpark and the Hadoop Ecosystem: Best Practices for Amazon EMR
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMR
 
Apache Spark and the Hadoop Ecosystem on AWS
Apache Spark and the Hadoop Ecosystem on AWSApache Spark and the Hadoop Ecosystem on AWS
Apache Spark and the Hadoop Ecosystem on AWS
 
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMR
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMRSpark and the Hadoop Ecosystem: Best Practices for Amazon EMR
Spark and the Hadoop Ecosystem: Best Practices for Amazon EMR
 
Apache Spark and the Hadoop Ecosystem on AWS
Apache Spark and the Hadoop Ecosystem on AWSApache Spark and the Hadoop Ecosystem on AWS
Apache Spark and the Hadoop Ecosystem on AWS
 
Spark on YARN
Spark on YARNSpark on YARN
Spark on YARN
 
Lighting your Big Data Fire with Apache Spark
Lighting your Big Data Fire with Apache SparkLighting your Big Data Fire with Apache Spark
Lighting your Big Data Fire with Apache Spark
 
Amazon Elastic Map Reduce: the concepts
Amazon Elastic Map Reduce: the conceptsAmazon Elastic Map Reduce: the concepts
Amazon Elastic Map Reduce: the concepts
 
(BDT208) A Technical Introduction to Amazon Elastic MapReduce
(BDT208) A Technical Introduction to Amazon Elastic MapReduce(BDT208) A Technical Introduction to Amazon Elastic MapReduce
(BDT208) A Technical Introduction to Amazon Elastic MapReduce
 
Amazon EMR Deep Dive & Best Practices
Amazon EMR Deep Dive & Best PracticesAmazon EMR Deep Dive & Best Practices
Amazon EMR Deep Dive & Best Practices
 
EMR Training
EMR TrainingEMR Training
EMR Training
 
Scaling your analytics with Amazon EMR
Scaling your analytics with Amazon EMRScaling your analytics with Amazon EMR
Scaling your analytics with Amazon EMR
 
Spark 101 - First steps to distributed computing
Spark 101 - First steps to distributed computingSpark 101 - First steps to distributed computing
Spark 101 - First steps to distributed computing
 
(BDT303) Running Spark and Presto on the Netflix Big Data Platform
(BDT303) Running Spark and Presto on the Netflix Big Data Platform(BDT303) Running Spark and Presto on the Netflix Big Data Platform
(BDT303) Running Spark and Presto on the Netflix Big Data Platform
 
AWS re:Invent 2016: Workshop: Stretching Scalability: Doing more with Amazon ...
AWS re:Invent 2016: Workshop: Stretching Scalability: Doing more with Amazon ...AWS re:Invent 2016: Workshop: Stretching Scalability: Doing more with Amazon ...
AWS re:Invent 2016: Workshop: Stretching Scalability: Doing more with Amazon ...
 
Running Presto and Spark on the Netflix Big Data Platform
Running Presto and Spark on the Netflix Big Data PlatformRunning Presto and Spark on the Netflix Big Data Platform
Running Presto and Spark on the Netflix Big Data Platform
 
Spark & Yarn better together 1.2
Spark & Yarn better together 1.2Spark & Yarn better together 1.2
Spark & Yarn better together 1.2
 
Spark to Production @Windward
Spark to Production @WindwardSpark to Production @Windward
Spark to Production @Windward
 

More from Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Recently uploaded

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 

Recently uploaded (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

(BDT309) Data Science & Best Practices for Apache Spark on Amazon EMR

  • 1. © 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Jonathan Fritz, Sr. Product Manager – Amazon EMR Manjeet Chayel, Specialist Solutions Architect October 2015 BDT309 Data Science & Best Practices for Apache Spark on Amazon EMR
  • 2. What to Expect from the Session • Data science with Apache Spark • Running Spark on Amazon EMR • Customer use cases and architectures • Best practices for running Spark • Demo: Using Apache Zeppelin to analyze US domestic flights dataset
  • 3.
  • 4. Spark is fast join filter groupBy Stage 3 Stage 1 Stage 2 A: B: C: D: E: F: = cached partition= RDD map • Massively parallel • Uses DAGs instead of map- reduce for execution • Minimizes I/O by storing data in RDDs in memory • Partitioning-aware to avoid network-intensive shuffle
  • 5. Spark components to match your use case
  • 6. Spark speaks your language And more!
  • 7. Apache Zeppelin notebook to develop queries Now available on Amazon EMR 4.1.0!
  • 8. Use DataFrames to easily interact with data • Distributed collection of data organized in columns • An extension of the existing RDD API • Optimized for query execution
  • 9. Easily create DataFrames from many formats RDD
  • 10. Load data with the Spark SQL Data Sources API Additional libraries at spark-packages.org
  • 12. Use DataFrames for machine learning • Spark ML libraries (replacing MLlib) use DataFrames as input/output for models • Create ML pipelines with a variety of distributed algorithms
  • 13. Create DataFrames on streaming data • Access data in Spark Streaming DStream • Create SQLContext on the SparkContext used for Spark Streaming application for ad hoc queries • Incorporate DataFrame in Spark Streaming application
  • 14. Use R to interact with DataFrames • SparkR package for using R to manipulate DataFrames • Create SparkR applications or interactively use the SparkR shell (no Zeppelin support yet - ZEPPELIN-156) • Comparable performance to Python and Scala DataFrames
  • 15. Spark SQL • Seamlessly mix SQL with Spark programs • Uniform data access • Hive compatibility – run Hive queries without modifications using HiveContext • Connect through JDBC/ODBC
  • 17. Focus on deriving insights from your data instead of manually configuring clusters Easy to install and configure Spark Secured Spark submit or use Zeppelin UI Quickly add and remove capacity Hourly, reserved, or EC2 Spot pricing Use S3 to decouple compute and storage
  • 18. Launch the latest Spark version July 15 – Spark 1.4.1 GA release July 24 – Spark 1.4.1 available on Amazon EMR September 9 – Spark 1.5.0 GA release September 30 – Spark 1.5.0 available on Amazon EMR < 3 week cadence with latest open source release
  • 19. Amazon EMR runs Spark on YARN • Dynamically share and centrally configure the same pool of cluster resources across engines • Schedulers for categorizing, isolating, and prioritizing workloads • Choose the number of executors to use, or allow YARN to choose (dynamic allocation) • Kerberos authentication Storage S3, HDFS YARN Cluster Resource Management Batch MapReduce In Memory Spark Applications Pig, Hive, Cascading, Spark Streaming, Spark SQL
  • 20. Create a fully configured cluster in minutes AWS Management Console AWS Command Line Interface (CLI) Or use an AWS SDK directly with the Amazon EMR API
  • 21. Or easily change your settings
  • 22. Many storage layers to choose from Amazon DynamoDB EMR-DynamoDB connector Amazon RDS Amazon Kinesis Streaming data connectorsJDBC Data Source w/ Spark SQL Elasticsearch connector Amazon Redshift Amazon Redshift Copy From HDFS EMR File System (EMRFS) Amazon S3 Amazon EMR
  • 23. Decouple compute and storage by using S3 as your data layer HDFS S3 is designed for 11 9’s of durability and is massively scalable EC2 Instance Memory Amazon S3 Amazon EMR Amazon EMR Amazon EMR
  • 24. Easy to run your Spark workloads Amazon EMR Step API SSH to master node (Spark Shell) Submit a Spark application Amazon EMR
  • 25. Secure Spark clusters – encryption at rest On-Cluster HDFS transparent encryption (AES 256) [new on release emr-4.1.0] Local disk encryption for temporary files using LUKS encryption via bootstrap action Amazon S3 Amazon S3 EMRFS support for Amazon S3 client-side and server-side encryption (AES 256)
  • 26. Secure Spark clusters – encryption in flight Internode communication on-cluster Blocks are encrypted in-transit in HDFS when using transparent encryption Spark’s Broadcast and FileServer services can use SSL. BlockTransferService (for shuffle) can’t use SSL (SPARK-5682). Amazon S3 S3 to Amazon EMR cluster Secure communication with SSL Objects encrypted over the wire if using client-side encryption
  • 27. Secure Spark clusters – additional features Permissions: • Cluster level: IAM roles for the Amazon EMR service and the cluster • Application level: Kerberos (Spark on YARN only) • Amazon EMR service level: IAM users Access: VPC, security groups Auditing: AWS CloudTrail
  • 29. Some of our customers running Spark on Amazon EMR
  • 30.
  • 31.
  • 32. Best Practices for Spark on Amazon EMR
  • 33. • Using correct instance • Understanding Executors • Sizing your executors • Dynamic allocation on YARN • Understanding storage layers • File formats and compression • Boost your performance • Data serialization • Avoiding shuffle • Managing partitions • RDD Persistence • Using Zeppelin notebook
  • 34. What does Spark need? • Memory – lots of it!! • Network • CPU • Horizontal Scaling Workflow Resource Machine learning CPU ETL I/O Instance
  • 35. Try different configurations to find your optimal architecture. CPU c1 family c3 family cc1.4xlarge cc2.8xlarge Memory m2 family r3 family cr1.8xlarge Disk/IO d2 family i2 family General m1 family m3 family Choose your instance types Batch Machine Interactive Large process learning Analysis HDFS
  • 36. • Using correct instance • Understanding Executors • Sizing your executors • Dynamic allocation on YARN • Understanding storage layers • File formats and compression • Caching tables • Boost your performance • Data serialization • Avoiding shuffle • Managing partitions • RDD Persistence
  • 37. How Spark executes • Spark Driver • Executor Spark Driver Executor
  • 38. Spark Executor on YARN This is where all the action happens - How to select number of executors? - How many cores per executor? - Example
  • 39. Sample Amazon EMR cluster Model vCPU Mem (GB) SSD Storage (GB) Networking r3.large 2 15.25 1 x 32 Moderate r3.xlarge 4 30.5 1 x 80 Moderate r3.2xlarge 8 61 1 x 160 High r3.4xlarge 16 122 1 x 320 High r3.8xlarge 32 244 2 x 320 10 Gigabit
  • 40. Create Amazon EMR cluster $ aws emr create-cluster --name ”Spark cluster” --release-label emr-4.1.0 --applications Name=Hive Name=Spark --use-default-roles --ec2-attributes KeyName=myKey --instance-type r3.4xlarge --instance-count 6 --no-auto-terminate
  • 41. Selecting number of executor cores: • Leave 1 core for OS and other activities • 4-5 cores per executor gives a good performance • Each executor can run up to 4-5 tasks • i.e. 4-5 threads for read/write operations to HDFS Inside Spark Executor on YARN
  • 42. Selecting number of executor cores: --num-executors or spark.executor.instances • 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑒𝑥𝑒𝑐𝑢𝑡𝑜𝑟𝑠 𝑝𝑒𝑟 𝑛𝑜𝑑𝑒 = (𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑐𝑜𝑟𝑒𝑠 𝑜𝑛 𝑛𝑜𝑑𝑒 −1 𝑓𝑜𝑟 𝑂𝑆 ) 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑡𝑎𝑠𝑘 𝑝𝑒𝑟 𝑒𝑥𝑒𝑐𝑢𝑡𝑜𝑟 • 16 −1 5 = 3 𝑒𝑥𝑒𝑐𝑢𝑡𝑜𝑟𝑠 𝑝𝑒𝑟 𝑛𝑜𝑑𝑒 Inside Spark Executor on YARN Model vCPU Mem (GB) SSD Storage (GB) Networking r3.4xlarge 16 122 1 x 320 High
  • 43. Selecting number of executor cores: --num-executors or spark.executor.instances • 16 −1 5 = 3 𝑒𝑥𝑒𝑐𝑢𝑡𝑜𝑟𝑠 𝑝𝑒𝑟 𝑛𝑜𝑑𝑒 • 6 instances • 𝑛𝑢𝑚 𝑜𝑓 𝑒𝑥𝑒𝑐𝑢𝑡𝑜𝑟𝑠 = 3 ∗ 6 − 1 = 𝟏𝟕 Inside Spark Executor on YARN
  • 44. Inside Spark Executor on YARN Max Container size on node YARN Container Controls the max sum of memory used by the container yarn.nodemanager.resource.memory-mb → Default: 116 GConfig File: yarn-site.xml
  • 45. Inside Spark Executor on YARN Max Container size on node Executor space Where Spark executor Runs Executor Container →
  • 46. Inside Spark Executor on YARN Max Container size on node Executor Memory Overhead - Off heap memory (VM overheads, interned strings etc.) 𝑠𝑝𝑎𝑟𝑘. 𝑦𝑎𝑟𝑛. 𝑒𝑥𝑒𝑐𝑢𝑡𝑜𝑟. 𝑚𝑒𝑚𝑜𝑟𝑦𝑂𝑣𝑒𝑟ℎ𝑒𝑎𝑑 = 𝑒𝑥𝑒𝑐𝑢𝑡𝑜𝑟𝑀𝑒𝑚𝑜𝑟𝑦 ∗ 0.10 Executor Container Memory Overhead Config File: spark-default.conf
  • 47. Inside Spark Executor on YARN Max Container size on node Spark executor memory - Amount of memory to use per executor process spark.executor.memory Executor Container Memory Overhead Spark Executor Memory Config File: spark-default.conf
  • 48. Inside Spark Executor on YARN Max Container size on node Shuffle Memory Fraction- Fraction of Java heap to use for aggregation and cogroups during shuffles spark.shuffle.memoryFraction Executor Container Memory Overhead Spark Executor Memory Shuffle memoryFraction Default: 0.2
  • 49. Inside Spark Executor on YARN Max Container size on node Storage storage Fraction - Fraction of Java heap to use for Spark's memory cache spark.storage.memoryFraction Executor Container Memory Overhead Spark Executor Memory Shuffle memoryFraction Storage memoryFraction Default: 0.6
  • 50. Inside Spark Executor on YARN Max Container size on node --executor-memory or spark.executor.memory 𝐸𝑥𝑒𝑐𝑢𝑡𝑜𝑟 𝑚𝑒𝑚𝑜𝑟𝑦 = 𝑀𝑎𝑥 𝑐𝑜𝑛𝑡𝑎𝑖𝑛𝑒𝑟 𝑠𝑖𝑧𝑒 𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑒𝑥𝑒𝑐𝑢𝑡𝑜𝑟 𝑝𝑒𝑟 𝑛𝑜𝑑𝑒 Config File: spark-default.conf
  • 51. Inside Spark Executor on YARN Max Container size on node --executor-memory or spark.executor.memory 𝐸𝑥𝑒𝑐𝑢𝑡𝑜𝑟 𝑚𝑒𝑚𝑜𝑟𝑦 = 116 𝐺 3 ~=38 G Config File: spark-default.conf
  • 52. Inside Spark Executor on YARN Max Container size on node --executor-memory or spark.executor.memory 𝑀𝑒𝑚𝑜𝑟𝑦 𝑂𝑣𝑒𝑟ℎ𝑒𝑎𝑑 => 38 ∗ 0.10 => 3.8 𝐺 Config File: spark-default.conf
  • 53. Inside Spark Executor on YARN Max Container size on node --executor-memory or spark.executor.memory 𝐸𝑥𝑒𝑐𝑢𝑡𝑜𝑟 𝑀𝑒𝑚𝑜𝑟𝑦 => 38 − 3.8 => ~34 𝐺𝐵 Config File: spark-default.conf
  • 54. Optimal setting: --num-executors 17 --executor-cores 5 --executor-memory 34G Inside Spark Executor on YARN
  • 55. Optimal setting: --num-executors 17 --executor-cores 5 --executor-memory 34G Inside Spark Executor on YARN
  • 56. • Using correct instance • Understanding Executors • Sizing your executors • Dynamic allocation on YARN • Understanding storage layers • File formats and compression • Boost your performance • Data serialization • Avoiding shuffle • Managing partitions • RDD Persistence • Using Zeppelin Notebook
  • 57. Dynamic Allocation on YARN … allows your Spark applications to scale up based on demand and scale down when not required. Remove Idle executors, Request more on demand
  • 58. Dynamic Allocation on YARN Scaling up on executors - Request when you want the job to complete faster - Idle resources on cluster - Exponential increase in executors over time
  • 59. Dynamic allocation setup Property Value Spark.dynamicAllocation.enabled true Spark.shuffle.service.enabled true spark.dynamicAllocation.minExecutors 5 spark.dynamicAllocation.maxExecutors 17 spark.dynamicAllocation.initalExecutors 0 sparkdynamicAllocation.executorIdleTime 60s spark.dynamicAllocation.schedulerBacklogTimeout 5s spark.dynamicAllocation.sustainedSchedulerBackl ogTimeout 5s Optional
  • 60. • Using correct instance • Understanding Executors • Sizing your executors • Dynamic allocation on YARN • Understanding storage layers • File formats and compression • Boost your performance • Data serialization • Avoiding shuffle • Managing partitions • RDD Persistence • Using Zeppelin notebook
  • 61. Compressions • Always compress data files on Amazon S3 • Reduces storage cost • Reduces bandwidth between Amazon S3 and Amazon EMR • Speeds up your job
  • 62. Compressions Compression types: – Some are fast BUT offer less space reduction – Some are space efficient BUT slower – Some are split able and some are not Algorithm % Space Remaining Encoding Speed Decoding Speed GZIP 13% 21MB/s 118MB/s LZO 20% 135MB/s 410MB/s Snappy 22% 172MB/s 409MB/s
  • 63. Compressions • If you are time-sensitive, faster compressions are a better choice • If you have large amount of data, use space-efficient compressions • If you don’t care, pick GZIP
  • 64. • Using correct instance • Understanding Executors • Sizing your executors • Dynamic allocation on YARN • Understanding storage layers • File formats and compression • Boost your performance • Data serialization • Avoiding shuffle • Managing partitions • RDD Persistence • Using Zeppelin notebook
  • 65. Data Serialization • Data is serialized when cached or shuffled Default: Java serializer Memory Disk Memory Disk Spark executor
  • 66. Data Serialization • Data is serialized when cached or shuffled Default: Java serializer • Kyro serialization (10x faster than Java serialization) • Does not support all Serializable types • Register the class in advance Usage: Set in SparkConf conf.set("spark.serializer”,"org.apache.spark.serializer.KryoSerializer")
  • 67. Spark doesn’t like to Shuffle • Shuffling is expensive • Disk I/O • Data Serialization • Network I/O • Spill to disk • Increased Garbage collection • Use aggregateByKey() instead of your own aggregator Usage: myRDD.aggregateByKey(0)((k,v) => v.toInt+k, (v,k) => k+v).collect • Apply filter earlier on data
  • 68. Parallelism & Partitions 𝑠𝑝𝑎𝑟𝑘. 𝑑𝑒𝑓𝑎𝑢𝑙𝑡. 𝑝𝑎𝑟𝑎𝑙𝑙𝑒𝑙𝑖𝑠𝑚 • getNumPartitions() • If you have >10K tasks, then its good to coalesce • If you are not using all the slots on cluster, repartition can increase parallelism • 2-3 tasks per CPU core in your cluster Config File: spark-default.conf
  • 69. RDD Persistence • Caching or persisting dataset in memory • Methods • cache() • persist() • Small RDD  MEMORY_ONLY • Big RDD  MEMORY_ONLY_SER (CPU intensive) • Don’t spill to disk • Use replicated storage for faster recovery
  • 70. Zeppelin and Spark on Amazon EMR