SlideShare ist ein Scribd-Unternehmen logo
1 von 29
Downloaden Sie, um offline zu lesen
Copyright ©2015 Treasure Data. All Rights Reserved.
Presto  as  a  Service
Tips  for  operation  and  monitoring
Dongmin Yu
Treasure  Data,  Inc.
min@treasure-­data.com
JeroMQ /  ZeroMQ committer  &  maintainer
Mar  19,  2015
Presto  Meetup @  Facebook
Copyright ©2015 Treasure Data. All Rights Reserved.
Topics  
• Presto  as  a  Service  in  Treasure  Data
– Error  Recovery
– Presto  Deployment
• Tips  for  Monitoring  Presto
– JSON  API
– Presto  +  Fluentd
• Custom  changes
2
Copyright ©2015 Treasure Data. All Rights Reserved.
Treasure  Data:  Presto  as  a  Service
3
Presto Public
Release
Hive
TD  API  /  
Web  ConsoleInteractive  query
batch  query
Presto
Treasure  Data
PlazmaDB:
MessagePack Columnar  Storage
td-­presto  connector
Copyright ©2015 Treasure Data. All Rights Reserved.
Deployment
• Building  Presto  takes  more  than  20  minutes.
• Facebook  frequently  releases  new  versions
• Let  CircleCI build  Presto  
– Deploy  jar  files  to  private  Maven  repository
– We  sometime  use  non-­release  versions
• for  fixing  serious  bugs
• hot-­fix  patches
• Integration  Test
– td-­presto  connector
• PlazmaDB,  Multi-­tenant  query  scheduler
• Query  optimizer
– Run  test  queries  on  staging  cluster
– Presto  Verifier
5
Copyright ©2015 Treasure Data. All Rights Reserved.
Production:  Blue-­Green  Deployment
• http://martinfowler.com/bliki/BlueGreenDeployment.html
• 2  Presto  Coordinators  (Blue/Green)
– Route  Presto  queries  to  the  active  cluster
– No  down-­time  upon  deployment
• Launch  Presto  worker  instances  with  chef      <-­ less  than  5  min.  in  AWS
• Inactive  clusters  is  used  for  pre-­production  testing  and  customer  support
– Investigation  and  tuning  of  customer  query  performance
– Trouble  shooting
6
Copyright ©2015 Treasure Data. All Rights Reserved.
Error  Recovery
• Presto  has  no  fault  tolerance
• Error  types
– User  error
• Syntax  errors
– SQL  syntax,  missing  function
• Semantic  errors
– missing  tables/columns
– Insufficient  resource  
• Exceeded  task  memory  size
– Internal  failure
• I/O  error
– S3/Riak CS
• worker  failure
• etc.
7
Worth A Retry!
Copyright ©2015 Treasure Data. All Rights Reserved.
Failed  Query  Rate
8
Copyright ©2015 Treasure Data. All Rights Reserved. 9
Copyright ©2015 Treasure Data. All Rights Reserved.
Query  Retry  Patterns  used  in  TD
• Error  code  +  message  pattern
10
Copyright ©2015 Treasure Data. All Rights Reserved.
Monitoring  Presto  with  Fluentd
11
Copyright ©2015 Treasure Data. All Rights Reserved.
Monitoring  Presto
• REST  API  for  monitoring  Presto  state
– JSON  format
• (presto  server  IP):8080/v1/query
– List  of  recent  queries    (BasicQueryInfo class)
• (presto  server  IP):8080/v1/query/(query  id)
– Detailed  query  state  information
– Query  plan,  tasks  and  running  worker  IDs  
– Processed  rows/data  size
12
Copyright ©2015 Treasure Data. All Rights Reserved.
Query  List      /v1/query
13
Copyright ©2015 Treasure Data. All Rights Reserved.
Detailed  query  Info  /v1/query/(query  id)
14
Copyright ©2015 Treasure Data. All Rights Reserved.
/ui/query-­execution/(query  id)
15
Copyright ©2015 Treasure Data. All Rights Reserved.
Complex  Queries
16
Copyright ©2015 Treasure Data. All Rights Reserved. 17
Copyright ©2015 Treasure Data. All Rights Reserved.
Presto  Coordinator
• Organizes  query  execution  pipelines
– Coordinates  presto  workers
• Retrieves  table  partition  and  split  location  from  connectors
– Creates  distributed  query  plans
• Full  GC
– Stalls  coordinator
• When  memory  is  insufficient
– Use  memory-­rich  machine
– GC  Tuning
• UseG1GC
18
Copyright ©2015 Treasure Data. All Rights Reserved.
presto-­metrics  (Ruby)
• https://github.com/xerial/presto-­metrics
19
Copyright ©2015 Treasure Data. All Rights Reserved. 20
Copyright ©2015 Treasure Data. All Rights Reserved.
Query  Collection  in  TD
• SQL  query  logs
– query,  detailed  query  plan,  elapsed  time,  processed  rows,  etc.
– newSetBinder(binder,EventClient.class).addBinding()
.to(FluentEventClient.class)
• Presto  is  used  for  analyzing  the  query  history
21
Copyright ©2015 Treasure Data. All Rights Reserved.
Daily/Hourly  Query  Usage
22
Copyright ©2015 Treasure Data. All Rights Reserved.
Query  Running  Time
• More  than  90%  of  queries  finishes  within  2  min.
≒ expected  response  time  for  interactive  queries
23
Copyright ©2015 Treasure Data. All Rights Reserved.
Detecting  Anomaly
• Started  Query  Rate  (in  5min/15min)
– If  no  query  has  started,  cluster  may  be  down  (or  not  started  properly)
• Processed  rows  in  a  query
– Sum  up  the  number  of  the  processed  rows  from  all  of  the  sub  stages
– Simple,  but  the  most  reliable  measure  
• Send  an  alert
– Slack  notification
– PagerDuty call
• JP/US  team  rotation
24
Copyright ©2015 Treasure Data. All Rights Reserved.
Benchmarking
• Query  performance  comparison
– between  two  versions  of  Presto
• Benchmark
– Run  query  set  multiple  times
– Store  the  results  to  TD
– Report  the  result  with  Presto
• Aggregation  query
25
Copyright ©2015 Treasure Data. All Rights Reserved.
Presto  Operation  Tool
• Prestop
– Our  internal  tool  for  managing  multiple  presto  
clusters
• written  in  Scala
– Query  monitoring
– Benchmarking
– Workload  simulation
• stress  testing
• Monitoring
– Datadog
– PageDuty
– ChartIO (query  stats)
26
Copyright ©2015 Treasure Data. All Rights Reserved.
buffer
Optimizing  Scan  Performance  – Storage  Manager
• Fully  utilize  the  network  bandwidth  from  S3
• TD  Presto  becomes  CPU  bottleneck
27
TableScanOperators
• s3  file  list
• table  schema
header  
request
S3 / RiakCS
• release(Buffer)
Buffer size limit
Reuse allocated buffers
Request Queue
• priority queue
• max connections limit
Header
Column Block 0
(column names)
Column Block 1
Column Block i
Column Block m
MPC1 file
HeaderReader
• callback  to  HeaderParser
ColumnBlockReader
header
HeaderParser
• parse  MPC  file  header
• column  block  offsets
• column  names
column block request
Column  block  requests
column
block
prepare
buffer
MessageUnpacker
MessageUnpacker
S3 read
S3 read
pull records
Retry  GET  request  on
-­ 500  (internal  error)
-­ 503  (slow  down)
-­ 404  (not  found)
-­ eventual  consistency
S3 read• decompression
• msgpack-­java  v07
• On-­demand  de-­ser
S3 read
S3 read
S3 read
Copyright ©2015 Treasure Data. All Rights Reserved.
Multi-­tenancy:  Resource  Allocation
• Price-­plan  based  resource  allocation
• Parameters
– The  number  of  worker  nodes  to  use  (min-­candidates)
– The  number  of  hash  partitions  (initial-­hash-­partitions)
– The  maximum  number  of  running  tasks  per  account
• If  running  queries  exceeds  allowed  number  of  tasks,  the  next  queries  need  to  wait  
(queued)
• Presto:  SqlQueryExecution class
– Controls  query  execution  state:  planning  -­>  running  -­>  finished
• No  resource  allocation  policy
– Extended  TDSqlQueryExection class  monitors  running  tasks  and  limits  resource  
usage
• Rewriting  SqlQueryExecutionFactory at  run-­time  by  using  ASM  library
28
Copyright ©2015 Treasure Data. All Rights Reserved.
WE  ARE  HIRING!
29
Check: www.treasuredata.com

Weitere ähnliche Inhalte

Was ist angesagt?

Presto @ Treasure Data - Presto Meetup Boston 2015
Presto @ Treasure Data - Presto Meetup Boston 2015Presto @ Treasure Data - Presto Meetup Boston 2015
Presto @ Treasure Data - Presto Meetup Boston 2015Taro L. Saito
 
Bullet: A Real Time Data Query Engine
Bullet: A Real Time Data Query EngineBullet: A Real Time Data Query Engine
Bullet: A Real Time Data Query EngineDataWorks Summit
 
20140120 presto meetup_en
20140120 presto meetup_en20140120 presto meetup_en
20140120 presto meetup_enOgibayashi
 
Presto @ Facebook: Past, Present and Future
Presto @ Facebook: Past, Present and FuturePresto @ Facebook: Past, Present and Future
Presto @ Facebook: Past, Present and FutureDataWorks Summit
 
Presto in my_use_case
Presto in my_use_casePresto in my_use_case
Presto in my_use_casewyukawa
 
Presto updates to 0.178
Presto updates to 0.178Presto updates to 0.178
Presto updates to 0.178Kai Sasaki
 
Presto for the Enterprise @ Hadoop Meetup
Presto for the Enterprise @ Hadoop MeetupPresto for the Enterprise @ Hadoop Meetup
Presto for the Enterprise @ Hadoop MeetupWojciech Biela
 
Prestogres, ODBC & JDBC connectivity for Presto
Prestogres, ODBC & JDBC connectivity for PrestoPrestogres, ODBC & JDBC connectivity for Presto
Prestogres, ODBC & JDBC connectivity for PrestoSadayuki Furuhashi
 
How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case Kai Sasaki
 
Speed up Interactive Analytic Queries over Existing Big Data on Hadoop with P...
Speed up Interactive Analytic Queries over Existing Big Data on Hadoop with P...Speed up Interactive Analytic Queries over Existing Big Data on Hadoop with P...
Speed up Interactive Analytic Queries over Existing Big Data on Hadoop with P...viirya
 
Technologies, Data Analytics Service and Enterprise Business
Technologies, Data Analytics Service and Enterprise BusinessTechnologies, Data Analytics Service and Enterprise Business
Technologies, Data Analytics Service and Enterprise BusinessSATOSHI TAGOMORI
 
Hoodie: How (And Why) We built an analytical datastore on Spark
Hoodie: How (And Why) We built an analytical datastore on SparkHoodie: How (And Why) We built an analytical datastore on Spark
Hoodie: How (And Why) We built an analytical datastore on SparkVinoth Chandar
 
presto-at-netflix-hadoop-summit-15
presto-at-netflix-hadoop-summit-15presto-at-netflix-hadoop-summit-15
presto-at-netflix-hadoop-summit-15Zhenxiao Luo
 
Presto Meetup (2015-03-19)
Presto Meetup (2015-03-19)Presto Meetup (2015-03-19)
Presto Meetup (2015-03-19)Dain Sundstrom
 
Presto Meetup 2016 Small Start
Presto Meetup 2016 Small StartPresto Meetup 2016 Small Start
Presto Meetup 2016 Small StartHiroshi Toyama
 
From Batch to Streaming ET(L) with Apache Apex
From Batch to Streaming ET(L) with Apache ApexFrom Batch to Streaming ET(L) with Apache Apex
From Batch to Streaming ET(L) with Apache ApexDataWorks Summit
 

Was ist angesagt? (20)

Presto @ Treasure Data - Presto Meetup Boston 2015
Presto @ Treasure Data - Presto Meetup Boston 2015Presto @ Treasure Data - Presto Meetup Boston 2015
Presto @ Treasure Data - Presto Meetup Boston 2015
 
Presto - SQL on anything
Presto  - SQL on anythingPresto  - SQL on anything
Presto - SQL on anything
 
Bullet: A Real Time Data Query Engine
Bullet: A Real Time Data Query EngineBullet: A Real Time Data Query Engine
Bullet: A Real Time Data Query Engine
 
20140120 presto meetup_en
20140120 presto meetup_en20140120 presto meetup_en
20140120 presto meetup_en
 
Presto @ Facebook: Past, Present and Future
Presto @ Facebook: Past, Present and FuturePresto @ Facebook: Past, Present and Future
Presto @ Facebook: Past, Present and Future
 
Presto in my_use_case
Presto in my_use_casePresto in my_use_case
Presto in my_use_case
 
Presto
PrestoPresto
Presto
 
Presto updates to 0.178
Presto updates to 0.178Presto updates to 0.178
Presto updates to 0.178
 
Presto for the Enterprise @ Hadoop Meetup
Presto for the Enterprise @ Hadoop MeetupPresto for the Enterprise @ Hadoop Meetup
Presto for the Enterprise @ Hadoop Meetup
 
Prestogres, ODBC & JDBC connectivity for Presto
Prestogres, ODBC & JDBC connectivity for PrestoPrestogres, ODBC & JDBC connectivity for Presto
Prestogres, ODBC & JDBC connectivity for Presto
 
How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case How to ensure Presto scalability 
in multi use case
How to ensure Presto scalability 
in multi use case
 
Speed up Interactive Analytic Queries over Existing Big Data on Hadoop with P...
Speed up Interactive Analytic Queries over Existing Big Data on Hadoop with P...Speed up Interactive Analytic Queries over Existing Big Data on Hadoop with P...
Speed up Interactive Analytic Queries over Existing Big Data on Hadoop with P...
 
Technologies, Data Analytics Service and Enterprise Business
Technologies, Data Analytics Service and Enterprise BusinessTechnologies, Data Analytics Service and Enterprise Business
Technologies, Data Analytics Service and Enterprise Business
 
Hoodie: How (And Why) We built an analytical datastore on Spark
Hoodie: How (And Why) We built an analytical datastore on SparkHoodie: How (And Why) We built an analytical datastore on Spark
Hoodie: How (And Why) We built an analytical datastore on Spark
 
presto-at-netflix-hadoop-summit-15
presto-at-netflix-hadoop-summit-15presto-at-netflix-hadoop-summit-15
presto-at-netflix-hadoop-summit-15
 
Presto Meetup (2015-03-19)
Presto Meetup (2015-03-19)Presto Meetup (2015-03-19)
Presto Meetup (2015-03-19)
 
Presto+MySQLで分散SQL
Presto+MySQLで分散SQLPresto+MySQLで分散SQL
Presto+MySQLで分散SQL
 
Presto@Uber
Presto@UberPresto@Uber
Presto@Uber
 
Presto Meetup 2016 Small Start
Presto Meetup 2016 Small StartPresto Meetup 2016 Small Start
Presto Meetup 2016 Small Start
 
From Batch to Streaming ET(L) with Apache Apex
From Batch to Streaming ET(L) with Apache ApexFrom Batch to Streaming ET(L) with Apache Apex
From Batch to Streaming ET(L) with Apache Apex
 

Ähnlich wie Presto meetup 2015-03-19 @Facebook

Presto At Treasure Data
Presto At Treasure DataPresto At Treasure Data
Presto At Treasure DataTaro L. Saito
 
Presto as a Service - Tips for operation and monitoring
Presto as a Service - Tips for operation and monitoringPresto as a Service - Tips for operation and monitoring
Presto as a Service - Tips for operation and monitoringTaro L. Saito
 
Overview of data analytics service: Treasure Data Service
Overview of data analytics service: Treasure Data ServiceOverview of data analytics service: Treasure Data Service
Overview of data analytics service: Treasure Data ServiceSATOSHI TAGOMORI
 
Oracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data Streaming
Oracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data StreamingOracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data Streaming
Oracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data StreamingMichael Rainey
 
Measuring CDN performance and why you're doing it wrong
Measuring CDN performance and why you're doing it wrongMeasuring CDN performance and why you're doing it wrong
Measuring CDN performance and why you're doing it wrongFastly
 
SharePoint Saturday The Conference 2011 - SP2010 Performance
SharePoint Saturday The Conference 2011 - SP2010 PerformanceSharePoint Saturday The Conference 2011 - SP2010 Performance
SharePoint Saturday The Conference 2011 - SP2010 PerformanceBrian Culver
 
SharePoint Saturday San Antonio: SharePoint 2010 Performance
SharePoint Saturday San Antonio: SharePoint 2010 PerformanceSharePoint Saturday San Antonio: SharePoint 2010 Performance
SharePoint Saturday San Antonio: SharePoint 2010 PerformanceBrian Culver
 
Presto Summit 2018 - 07 - Lyft
Presto Summit 2018 - 07 - LyftPresto Summit 2018 - 07 - Lyft
Presto Summit 2018 - 07 - Lyftkbajda
 
Oracle GoldenGate and Apache Kafka: A Deep Dive Into Real-Time Data Streaming
Oracle GoldenGate and Apache Kafka: A Deep Dive Into Real-Time Data StreamingOracle GoldenGate and Apache Kafka: A Deep Dive Into Real-Time Data Streaming
Oracle GoldenGate and Apache Kafka: A Deep Dive Into Real-Time Data StreamingMichael Rainey
 
Planet-scale Data Ingestion Pipeline: Bigdam
Planet-scale Data Ingestion Pipeline: BigdamPlanet-scale Data Ingestion Pipeline: Bigdam
Planet-scale Data Ingestion Pipeline: BigdamSATOSHI TAGOMORI
 
Enterprise Presto PaaS offering in Google Cloud
Enterprise Presto PaaS offering in Google Cloud Enterprise Presto PaaS offering in Google Cloud
Enterprise Presto PaaS offering in Google Cloud Ashish Tadose
 
Day 7 - Make it Fast
Day 7 - Make it FastDay 7 - Make it Fast
Day 7 - Make it FastBarry Jones
 
(ATS6-PLAT06) Maximizing AEP Performance
(ATS6-PLAT06) Maximizing AEP Performance(ATS6-PLAT06) Maximizing AEP Performance
(ATS6-PLAT06) Maximizing AEP PerformanceBIOVIA
 
NoSQL em Windows Azure Table Storage - Vitor Tomaz
NoSQL em Windows Azure Table Storage - Vitor TomazNoSQL em Windows Azure Table Storage - Vitor Tomaz
NoSQL em Windows Azure Table Storage - Vitor TomazComunidade NetPonto
 
Oracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data Streaming
Oracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data StreamingOracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data Streaming
Oracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data StreamingMichael Rainey
 
Monitoring and Scaling Redis at DataDog - Ilan Rabinovitch, DataDog
 Monitoring and Scaling Redis at DataDog - Ilan Rabinovitch, DataDog Monitoring and Scaling Redis at DataDog - Ilan Rabinovitch, DataDog
Monitoring and Scaling Redis at DataDog - Ilan Rabinovitch, DataDogRedis Labs
 
(ATS4-PLAT08) Server Pool Management
(ATS4-PLAT08) Server Pool Management(ATS4-PLAT08) Server Pool Management
(ATS4-PLAT08) Server Pool ManagementBIOVIA
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudyJohn Adams
 
Cloud Security Monitoring and Spark Analytics
Cloud Security Monitoring and Spark AnalyticsCloud Security Monitoring and Spark Analytics
Cloud Security Monitoring and Spark Analyticsamesar0
 

Ähnlich wie Presto meetup 2015-03-19 @Facebook (20)

Presto At Treasure Data
Presto At Treasure DataPresto At Treasure Data
Presto At Treasure Data
 
Internals of Presto Service
Internals of Presto ServiceInternals of Presto Service
Internals of Presto Service
 
Presto as a Service - Tips for operation and monitoring
Presto as a Service - Tips for operation and monitoringPresto as a Service - Tips for operation and monitoring
Presto as a Service - Tips for operation and monitoring
 
Overview of data analytics service: Treasure Data Service
Overview of data analytics service: Treasure Data ServiceOverview of data analytics service: Treasure Data Service
Overview of data analytics service: Treasure Data Service
 
Oracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data Streaming
Oracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data StreamingOracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data Streaming
Oracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data Streaming
 
Measuring CDN performance and why you're doing it wrong
Measuring CDN performance and why you're doing it wrongMeasuring CDN performance and why you're doing it wrong
Measuring CDN performance and why you're doing it wrong
 
SharePoint Saturday The Conference 2011 - SP2010 Performance
SharePoint Saturday The Conference 2011 - SP2010 PerformanceSharePoint Saturday The Conference 2011 - SP2010 Performance
SharePoint Saturday The Conference 2011 - SP2010 Performance
 
SharePoint Saturday San Antonio: SharePoint 2010 Performance
SharePoint Saturday San Antonio: SharePoint 2010 PerformanceSharePoint Saturday San Antonio: SharePoint 2010 Performance
SharePoint Saturday San Antonio: SharePoint 2010 Performance
 
Presto Summit 2018 - 07 - Lyft
Presto Summit 2018 - 07 - LyftPresto Summit 2018 - 07 - Lyft
Presto Summit 2018 - 07 - Lyft
 
Oracle GoldenGate and Apache Kafka: A Deep Dive Into Real-Time Data Streaming
Oracle GoldenGate and Apache Kafka: A Deep Dive Into Real-Time Data StreamingOracle GoldenGate and Apache Kafka: A Deep Dive Into Real-Time Data Streaming
Oracle GoldenGate and Apache Kafka: A Deep Dive Into Real-Time Data Streaming
 
Planet-scale Data Ingestion Pipeline: Bigdam
Planet-scale Data Ingestion Pipeline: BigdamPlanet-scale Data Ingestion Pipeline: Bigdam
Planet-scale Data Ingestion Pipeline: Bigdam
 
Enterprise Presto PaaS offering in Google Cloud
Enterprise Presto PaaS offering in Google Cloud Enterprise Presto PaaS offering in Google Cloud
Enterprise Presto PaaS offering in Google Cloud
 
Day 7 - Make it Fast
Day 7 - Make it FastDay 7 - Make it Fast
Day 7 - Make it Fast
 
(ATS6-PLAT06) Maximizing AEP Performance
(ATS6-PLAT06) Maximizing AEP Performance(ATS6-PLAT06) Maximizing AEP Performance
(ATS6-PLAT06) Maximizing AEP Performance
 
NoSQL em Windows Azure Table Storage - Vitor Tomaz
NoSQL em Windows Azure Table Storage - Vitor TomazNoSQL em Windows Azure Table Storage - Vitor Tomaz
NoSQL em Windows Azure Table Storage - Vitor Tomaz
 
Oracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data Streaming
Oracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data StreamingOracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data Streaming
Oracle GoldenGate and Apache Kafka A Deep Dive Into Real-Time Data Streaming
 
Monitoring and Scaling Redis at DataDog - Ilan Rabinovitch, DataDog
 Monitoring and Scaling Redis at DataDog - Ilan Rabinovitch, DataDog Monitoring and Scaling Redis at DataDog - Ilan Rabinovitch, DataDog
Monitoring and Scaling Redis at DataDog - Ilan Rabinovitch, DataDog
 
(ATS4-PLAT08) Server Pool Management
(ATS4-PLAT08) Server Pool Management(ATS4-PLAT08) Server Pool Management
(ATS4-PLAT08) Server Pool Management
 
John adams talk cloudy
John adams   talk cloudyJohn adams   talk cloudy
John adams talk cloudy
 
Cloud Security Monitoring and Spark Analytics
Cloud Security Monitoring and Spark AnalyticsCloud Security Monitoring and Spark Analytics
Cloud Security Monitoring and Spark Analytics
 

Mehr von Treasure Data, Inc.

GDPR: A Practical Guide for Marketers
GDPR: A Practical Guide for MarketersGDPR: A Practical Guide for Marketers
GDPR: A Practical Guide for MarketersTreasure Data, Inc.
 
AR and VR by the Numbers: A Data First Approach to the Technology and Market
AR and VR by the Numbers: A Data First Approach to the Technology and MarketAR and VR by the Numbers: A Data First Approach to the Technology and Market
AR and VR by the Numbers: A Data First Approach to the Technology and MarketTreasure Data, Inc.
 
Introduction to Customer Data Platforms
Introduction to Customer Data PlatformsIntroduction to Customer Data Platforms
Introduction to Customer Data PlatformsTreasure Data, Inc.
 
Hands-On: Managing Slowly Changing Dimensions Using TD Workflow
Hands-On: Managing Slowly Changing Dimensions Using TD WorkflowHands-On: Managing Slowly Changing Dimensions Using TD Workflow
Hands-On: Managing Slowly Changing Dimensions Using TD WorkflowTreasure Data, Inc.
 
Brand Analytics Management: Measuring CLV Across Platforms, Devices and Apps
Brand Analytics Management: Measuring CLV Across Platforms, Devices and AppsBrand Analytics Management: Measuring CLV Across Platforms, Devices and Apps
Brand Analytics Management: Measuring CLV Across Platforms, Devices and AppsTreasure Data, Inc.
 
How to Power Your Customer Experience with Data
How to Power Your Customer Experience with DataHow to Power Your Customer Experience with Data
How to Power Your Customer Experience with DataTreasure Data, Inc.
 
Why Your VR Game is Virtually Useless Without Data
Why Your VR Game is Virtually Useless Without DataWhy Your VR Game is Virtually Useless Without Data
Why Your VR Game is Virtually Useless Without DataTreasure Data, Inc.
 
Connecting the Customer Data Dots
Connecting the Customer Data DotsConnecting the Customer Data Dots
Connecting the Customer Data DotsTreasure Data, Inc.
 
Harnessing Data for Better Customer Experience and Company Success
Harnessing Data for Better Customer Experience and Company SuccessHarnessing Data for Better Customer Experience and Company Success
Harnessing Data for Better Customer Experience and Company SuccessTreasure Data, Inc.
 
Packaging Ecosystems -Monki Gras 2017
Packaging Ecosystems -Monki Gras 2017Packaging Ecosystems -Monki Gras 2017
Packaging Ecosystems -Monki Gras 2017Treasure Data, Inc.
 
글로벌 사례로 보는 데이터로 돈 버는 법 - 트레저데이터 (Treasure Data)
글로벌 사례로 보는 데이터로 돈 버는 법 - 트레저데이터 (Treasure Data)글로벌 사례로 보는 데이터로 돈 버는 법 - 트레저데이터 (Treasure Data)
글로벌 사례로 보는 데이터로 돈 버는 법 - 트레저데이터 (Treasure Data)Treasure Data, Inc.
 
Introduction to New features and Use cases of Hivemall
Introduction to New features and Use cases of HivemallIntroduction to New features and Use cases of Hivemall
Introduction to New features and Use cases of HivemallTreasure Data, Inc.
 
Scaling to Infinity - Open Source meets Big Data
Scaling to Infinity - Open Source meets Big DataScaling to Infinity - Open Source meets Big Data
Scaling to Infinity - Open Source meets Big DataTreasure Data, Inc.
 
Treasure Data: Move your data from MySQL to Redshift with (not much more tha...
Treasure Data:  Move your data from MySQL to Redshift with (not much more tha...Treasure Data:  Move your data from MySQL to Redshift with (not much more tha...
Treasure Data: Move your data from MySQL to Redshift with (not much more tha...Treasure Data, Inc.
 
Treasure Data From MySQL to Redshift
Treasure Data  From MySQL to RedshiftTreasure Data  From MySQL to Redshift
Treasure Data From MySQL to RedshiftTreasure Data, Inc.
 
Unifying Events and Logs into the Cloud
Unifying Events and Logs into the CloudUnifying Events and Logs into the Cloud
Unifying Events and Logs into the CloudTreasure Data, Inc.
 

Mehr von Treasure Data, Inc. (20)

GDPR: A Practical Guide for Marketers
GDPR: A Practical Guide for MarketersGDPR: A Practical Guide for Marketers
GDPR: A Practical Guide for Marketers
 
AR and VR by the Numbers: A Data First Approach to the Technology and Market
AR and VR by the Numbers: A Data First Approach to the Technology and MarketAR and VR by the Numbers: A Data First Approach to the Technology and Market
AR and VR by the Numbers: A Data First Approach to the Technology and Market
 
Introduction to Customer Data Platforms
Introduction to Customer Data PlatformsIntroduction to Customer Data Platforms
Introduction to Customer Data Platforms
 
Hands On: Javascript SDK
Hands On: Javascript SDKHands On: Javascript SDK
Hands On: Javascript SDK
 
Hands-On: Managing Slowly Changing Dimensions Using TD Workflow
Hands-On: Managing Slowly Changing Dimensions Using TD WorkflowHands-On: Managing Slowly Changing Dimensions Using TD Workflow
Hands-On: Managing Slowly Changing Dimensions Using TD Workflow
 
Brand Analytics Management: Measuring CLV Across Platforms, Devices and Apps
Brand Analytics Management: Measuring CLV Across Platforms, Devices and AppsBrand Analytics Management: Measuring CLV Across Platforms, Devices and Apps
Brand Analytics Management: Measuring CLV Across Platforms, Devices and Apps
 
How to Power Your Customer Experience with Data
How to Power Your Customer Experience with DataHow to Power Your Customer Experience with Data
How to Power Your Customer Experience with Data
 
Why Your VR Game is Virtually Useless Without Data
Why Your VR Game is Virtually Useless Without DataWhy Your VR Game is Virtually Useless Without Data
Why Your VR Game is Virtually Useless Without Data
 
Connecting the Customer Data Dots
Connecting the Customer Data DotsConnecting the Customer Data Dots
Connecting the Customer Data Dots
 
Harnessing Data for Better Customer Experience and Company Success
Harnessing Data for Better Customer Experience and Company SuccessHarnessing Data for Better Customer Experience and Company Success
Harnessing Data for Better Customer Experience and Company Success
 
Packaging Ecosystems -Monki Gras 2017
Packaging Ecosystems -Monki Gras 2017Packaging Ecosystems -Monki Gras 2017
Packaging Ecosystems -Monki Gras 2017
 
글로벌 사례로 보는 데이터로 돈 버는 법 - 트레저데이터 (Treasure Data)
글로벌 사례로 보는 데이터로 돈 버는 법 - 트레저데이터 (Treasure Data)글로벌 사례로 보는 데이터로 돈 버는 법 - 트레저데이터 (Treasure Data)
글로벌 사례로 보는 데이터로 돈 버는 법 - 트레저데이터 (Treasure Data)
 
Keynote - Fluentd meetup v14
Keynote - Fluentd meetup v14Keynote - Fluentd meetup v14
Keynote - Fluentd meetup v14
 
Introduction to New features and Use cases of Hivemall
Introduction to New features and Use cases of HivemallIntroduction to New features and Use cases of Hivemall
Introduction to New features and Use cases of Hivemall
 
Scalable Hadoop in the cloud
Scalable Hadoop in the cloudScalable Hadoop in the cloud
Scalable Hadoop in the cloud
 
Using Embulk at Treasure Data
Using Embulk at Treasure DataUsing Embulk at Treasure Data
Using Embulk at Treasure Data
 
Scaling to Infinity - Open Source meets Big Data
Scaling to Infinity - Open Source meets Big DataScaling to Infinity - Open Source meets Big Data
Scaling to Infinity - Open Source meets Big Data
 
Treasure Data: Move your data from MySQL to Redshift with (not much more tha...
Treasure Data:  Move your data from MySQL to Redshift with (not much more tha...Treasure Data:  Move your data from MySQL to Redshift with (not much more tha...
Treasure Data: Move your data from MySQL to Redshift with (not much more tha...
 
Treasure Data From MySQL to Redshift
Treasure Data  From MySQL to RedshiftTreasure Data  From MySQL to Redshift
Treasure Data From MySQL to Redshift
 
Unifying Events and Logs into the Cloud
Unifying Events and Logs into the CloudUnifying Events and Logs into the Cloud
Unifying Events and Logs into the Cloud
 

Kürzlich hochgeladen

SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROmotivationalword821
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmSujith Sukumaran
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 

Kürzlich hochgeladen (20)

SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
How To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTROHow To Manage Restaurant Staff -BTRESTRO
How To Manage Restaurant Staff -BTRESTRO
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
Intelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalmIntelligent Home Wi-Fi Solutions | ThinkPalm
Intelligent Home Wi-Fi Solutions | ThinkPalm
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 

Presto meetup 2015-03-19 @Facebook

  • 1. Copyright ©2015 Treasure Data. All Rights Reserved. Presto  as  a  Service Tips  for  operation  and  monitoring Dongmin Yu Treasure  Data,  Inc. min@treasure-­data.com JeroMQ /  ZeroMQ committer  &  maintainer Mar  19,  2015 Presto  Meetup @  Facebook
  • 2. Copyright ©2015 Treasure Data. All Rights Reserved. Topics   • Presto  as  a  Service  in  Treasure  Data – Error  Recovery – Presto  Deployment • Tips  for  Monitoring  Presto – JSON  API – Presto  +  Fluentd • Custom  changes 2
  • 3. Copyright ©2015 Treasure Data. All Rights Reserved. Treasure  Data:  Presto  as  a  Service 3 Presto Public Release
  • 4. Hive TD  API  /   Web  ConsoleInteractive  query batch  query Presto Treasure  Data PlazmaDB: MessagePack Columnar  Storage td-­presto  connector
  • 5. Copyright ©2015 Treasure Data. All Rights Reserved. Deployment • Building  Presto  takes  more  than  20  minutes. • Facebook  frequently  releases  new  versions • Let  CircleCI build  Presto   – Deploy  jar  files  to  private  Maven  repository – We  sometime  use  non-­release  versions • for  fixing  serious  bugs • hot-­fix  patches • Integration  Test – td-­presto  connector • PlazmaDB,  Multi-­tenant  query  scheduler • Query  optimizer – Run  test  queries  on  staging  cluster – Presto  Verifier 5
  • 6. Copyright ©2015 Treasure Data. All Rights Reserved. Production:  Blue-­Green  Deployment • http://martinfowler.com/bliki/BlueGreenDeployment.html • 2  Presto  Coordinators  (Blue/Green) – Route  Presto  queries  to  the  active  cluster – No  down-­time  upon  deployment • Launch  Presto  worker  instances  with  chef      <-­ less  than  5  min.  in  AWS • Inactive  clusters  is  used  for  pre-­production  testing  and  customer  support – Investigation  and  tuning  of  customer  query  performance – Trouble  shooting 6
  • 7. Copyright ©2015 Treasure Data. All Rights Reserved. Error  Recovery • Presto  has  no  fault  tolerance • Error  types – User  error • Syntax  errors – SQL  syntax,  missing  function • Semantic  errors – missing  tables/columns – Insufficient  resource   • Exceeded  task  memory  size – Internal  failure • I/O  error – S3/Riak CS • worker  failure • etc. 7 Worth A Retry!
  • 8. Copyright ©2015 Treasure Data. All Rights Reserved. Failed  Query  Rate 8
  • 9. Copyright ©2015 Treasure Data. All Rights Reserved. 9
  • 10. Copyright ©2015 Treasure Data. All Rights Reserved. Query  Retry  Patterns  used  in  TD • Error  code  +  message  pattern 10
  • 11. Copyright ©2015 Treasure Data. All Rights Reserved. Monitoring  Presto  with  Fluentd 11
  • 12. Copyright ©2015 Treasure Data. All Rights Reserved. Monitoring  Presto • REST  API  for  monitoring  Presto  state – JSON  format • (presto  server  IP):8080/v1/query – List  of  recent  queries    (BasicQueryInfo class) • (presto  server  IP):8080/v1/query/(query  id) – Detailed  query  state  information – Query  plan,  tasks  and  running  worker  IDs   – Processed  rows/data  size 12
  • 13. Copyright ©2015 Treasure Data. All Rights Reserved. Query  List      /v1/query 13
  • 14. Copyright ©2015 Treasure Data. All Rights Reserved. Detailed  query  Info  /v1/query/(query  id) 14
  • 15. Copyright ©2015 Treasure Data. All Rights Reserved. /ui/query-­execution/(query  id) 15
  • 16. Copyright ©2015 Treasure Data. All Rights Reserved. Complex  Queries 16
  • 17. Copyright ©2015 Treasure Data. All Rights Reserved. 17
  • 18. Copyright ©2015 Treasure Data. All Rights Reserved. Presto  Coordinator • Organizes  query  execution  pipelines – Coordinates  presto  workers • Retrieves  table  partition  and  split  location  from  connectors – Creates  distributed  query  plans • Full  GC – Stalls  coordinator • When  memory  is  insufficient – Use  memory-­rich  machine – GC  Tuning • UseG1GC 18
  • 19. Copyright ©2015 Treasure Data. All Rights Reserved. presto-­metrics  (Ruby) • https://github.com/xerial/presto-­metrics 19
  • 20. Copyright ©2015 Treasure Data. All Rights Reserved. 20
  • 21. Copyright ©2015 Treasure Data. All Rights Reserved. Query  Collection  in  TD • SQL  query  logs – query,  detailed  query  plan,  elapsed  time,  processed  rows,  etc. – newSetBinder(binder,EventClient.class).addBinding() .to(FluentEventClient.class) • Presto  is  used  for  analyzing  the  query  history 21
  • 22. Copyright ©2015 Treasure Data. All Rights Reserved. Daily/Hourly  Query  Usage 22
  • 23. Copyright ©2015 Treasure Data. All Rights Reserved. Query  Running  Time • More  than  90%  of  queries  finishes  within  2  min. ≒ expected  response  time  for  interactive  queries 23
  • 24. Copyright ©2015 Treasure Data. All Rights Reserved. Detecting  Anomaly • Started  Query  Rate  (in  5min/15min) – If  no  query  has  started,  cluster  may  be  down  (or  not  started  properly) • Processed  rows  in  a  query – Sum  up  the  number  of  the  processed  rows  from  all  of  the  sub  stages – Simple,  but  the  most  reliable  measure   • Send  an  alert – Slack  notification – PagerDuty call • JP/US  team  rotation 24
  • 25. Copyright ©2015 Treasure Data. All Rights Reserved. Benchmarking • Query  performance  comparison – between  two  versions  of  Presto • Benchmark – Run  query  set  multiple  times – Store  the  results  to  TD – Report  the  result  with  Presto • Aggregation  query 25
  • 26. Copyright ©2015 Treasure Data. All Rights Reserved. Presto  Operation  Tool • Prestop – Our  internal  tool  for  managing  multiple  presto   clusters • written  in  Scala – Query  monitoring – Benchmarking – Workload  simulation • stress  testing • Monitoring – Datadog – PageDuty – ChartIO (query  stats) 26
  • 27. Copyright ©2015 Treasure Data. All Rights Reserved. buffer Optimizing  Scan  Performance  – Storage  Manager • Fully  utilize  the  network  bandwidth  from  S3 • TD  Presto  becomes  CPU  bottleneck 27 TableScanOperators • s3  file  list • table  schema header   request S3 / RiakCS • release(Buffer) Buffer size limit Reuse allocated buffers Request Queue • priority queue • max connections limit Header Column Block 0 (column names) Column Block 1 Column Block i Column Block m MPC1 file HeaderReader • callback  to  HeaderParser ColumnBlockReader header HeaderParser • parse  MPC  file  header • column  block  offsets • column  names column block request Column  block  requests column block prepare buffer MessageUnpacker MessageUnpacker S3 read S3 read pull records Retry  GET  request  on -­ 500  (internal  error) -­ 503  (slow  down) -­ 404  (not  found) -­ eventual  consistency S3 read• decompression • msgpack-­java  v07 • On-­demand  de-­ser S3 read S3 read S3 read
  • 28. Copyright ©2015 Treasure Data. All Rights Reserved. Multi-­tenancy:  Resource  Allocation • Price-­plan  based  resource  allocation • Parameters – The  number  of  worker  nodes  to  use  (min-­candidates) – The  number  of  hash  partitions  (initial-­hash-­partitions) – The  maximum  number  of  running  tasks  per  account • If  running  queries  exceeds  allowed  number  of  tasks,  the  next  queries  need  to  wait   (queued) • Presto:  SqlQueryExecution class – Controls  query  execution  state:  planning  -­>  running  -­>  finished • No  resource  allocation  policy – Extended  TDSqlQueryExection class  monitors  running  tasks  and  limits  resource   usage • Rewriting  SqlQueryExecutionFactory at  run-­time  by  using  ASM  library 28
  • 29. Copyright ©2015 Treasure Data. All Rights Reserved. WE  ARE  HIRING! 29 Check: www.treasuredata.com