SlideShare ist ein Scribd-Unternehmen logo
1 von 64
Downloaden Sie, um offline zu lesen
Presto As A Service
トレジャーデータでの運用事例
Taro L. Saito, Treasure Data
leo@treasure-data.com
April 24th, 2015
Presto 勉強会 @ IPROS
自己紹介 Taro L. Saito @taroleo
•  2002 東京大学 理学部 情報科学科卒
•  2007 Ph.D.
–  XMLデータベース、トランザクション処理の研究
•  ~ 2014 東京大学 情報生命科学専攻 助教
–  ゲノムサイエンス研究
•  大規模データ処理、並列・分散コンピューティング
•  2014.3月~ Treasure Data
–  ソフトウェアエンジニア
MPP Team Leader (Presto)
2
Prestoとは?
•  Facebook社が開発している分散SQLエンジン
–  ペタスケールのデータに対しインタラクティブ(対話的)な検索が必要に
•  それまではHive中心
–  2013年11月にオープンソース化
•  Prestoの特徴
–  CPU使用効率・スピード重視(アドホック検索)
–  インメモリ処理
–  教科書的なRDBMSの実装
–  ANSI SQLベース
3
バッチクエリ(Hive) とアドホッククエリ (Presto)
4
TDでは独自にリトライ
機構を導入
スループット重視 CPU使用効率、レスポンスタイム重視
耐障害性
エラーからの回復
•  Prestoそのものには障害耐性はない
•  エラーの種類
–  文法、関数名などの誤り
–  存在しないテーブル、カラム名の利用
–  Insufficient resource
•  タスク辺りの上限メモリ量を超える
–  Internal failure (内部エラー)
•  I/O error
–  S3の遅延
•  ノードの障害
•  など
5
Treasure DataのPrestoではクエリの
再実行により耐障害性を持つ
クエリ再実行の頻度 (log scale)
•  99.8%のクエリが1回目で成功。再実行は稀
6
Treasure Dataとは?
•  米シリコンバレー発日本人創業のビッグデータ関連企業
–  2011年12月、米Mountain Viewにて創業
–  2012年11月、東京丸の内に日本支社設立
•  クラウド型データマネージメントサービス「Treasure Data Service」を提供
7
芳川裕誠 – CEO
Open source business veteran
太田一樹 – CTO
Founder of world’s largest Hadoop Group
主要投資家
Bill Tai
Charles River Ventures, Twitterなどに投資
まつもとゆきひろ
Ruby言語開発者
Sierra Ventures – (Tim Guleri)
企業向けソフト・データベース領域での有力VC
創業者
Jerry Yang
Yahoo! Inc. 創業者
古橋貞之 – Software Engineer
MessagePack, Fluentd開発者
Treasure Data Service
ビッグデータのための「クラウド + マネジメント」一体型サービス
データ収集∼保存∼分析までワンストップでサポート
8
•  毎日数百億規模のレコードが取り込まれている
–  2014年5月に5兆(trillion)レコードに到達
•  SQLベース(Hive, Presto, Pigなど)による検索サービスを提供
Importing more than 500,000 records / sec.
0
1000
2000
3000
4000
5000
6000
7000
DataGrowthinBillions
Data (records) Imported
Service
Launched
3 Trillion
4 Trillion
1 Trillion
5 Trillion
2 Trillion
Series A Funding
100
Customers
Gartner Cool
Vendor
Report
9
Treasure Data: Presto Queries
10
•  More than 10k queries / day
TD Presto
•  Presto 0.100
•  AWS・IDCF クラウドで運用
•  td-presto connector
–  PlazmaDB にアクセスするコネクター
–  S3 (AWS) / RiakCS (IDCF) からデータを取得
–  列志向ストレージ
•  MessagePack フォーマット + 圧縮  (MPC file)
11
Hive
TD API /
Web ConsoleInteractive query
batch query
Presto
Treasure Data
PlazmaDB
td-presto connector
Web Console
13
14
buffer
Optimizing Scan Performance
•  Fully utilize the network bandwidth from S3
•  TD Presto becomes CPU bottleneck
15
TableScanOperator	
•  s3 file list
•  table schema
header
request
S3 / RiakCS	
•  release(Buffer)
Buffer size limit
Reuse allocated buffers
Request Queue	
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
MessageUnpacker	
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
S3 read	
S3 read	
S3 read
Prestoのアーキテクチャ
16
Query Planner
SELECT
name,
count(*) AS c

FROM impressions

GROUP BY name
SQL
impressions (
name varchar
time bigint
)
Table schema
Table scan
(name:varchar)
GROUP BY
(name, count(*))
Output
(name, c)
+
Sink
Final aggregation
Exchange
Sink
Partial aggregation
Table scan
Output
Exchange
Logical query plan
Distributed query plan
Sink
Partial aggregation
Table scan
Sink
Partial aggregation
Table scan
Execution Planner
•  StageをTaskに分割して並列度を上げる
+ Node list
✓ 2 workers
Sink
Final aggregation
Exchange
Output
Exchange
Sink
Final aggregation
Exchange
Sink
Final aggregation
Exchange
Sink
Partial aggregation
Table scan
Output
Exchange
Worker 1 Worker 2
Execution Planner - Split
•  各TaskにはSplitが割り当てられ、並列に実行される
Sink
Final aggregation
Exchange
Sink
Partial aggregation
Table scan
Sink
Final aggregation
Exchange
Sink
Partial aggregation
Table scan
Output
Exchange
Split
many splits / task
= many threads / worker
(table scan)
1 split / task
= 1 thread / worker
Worker 1 Worker 2
1 split / worker
= 1 thread / worker
クエリの実行時間
•  90%以上のPrestoクエリが2分以内に処理されている
20
Prestoで処理されるレコード数
•  1億レコード以上を処理するクエリも珍しくない
21
Prestoの性能
•  クエリ中で一秒間に処理されるレコード数の分布
22
Challenges in Database as a Service
•  トレードオフ
•  Reference
–  Workload Management for Big Data Analytics. A. Aboulnaga
[SIGMOD2013 Tutorial]
23
個々のクエリを
単一クラスタで実行
全てのクエリを
必要最小限の
クラスタで実行
速いが非常に高価
$$$
性能は制限されるが、
手頃な価格で利用できる
Prestoクエリを快適に使うコツ
24
COUNT(DISTINCT x)
•  何種類の値があるかをチェック
•  種類が多い時(数百万種類∼)にメモリを多く消費
–  Task exceeded max memory ? GB エラーが生じやすい
•  count(distinct x) を approx_distinct(x) に置き換える
–  省メモリで近似的に値の種類をカウント
•  標準誤差2.3%
–  Probabilistic counting (Hyper-LogLog counting)という技術
•  その他:
–  approx_percentile(column, percentage)
–  例:approx_percentile(v, 0.5) = ほぼmedian
25
WINDOW関数
•  https://prestodb.io/docs/current/functions/window.html
•  利用例:累積和を計算したい場合
•  SELECT month, cnt, sum(cnt) over(order by month) from data;
26
month cnt total
2015-01 14 14
2015-02 20 34
2015-03 5 39
WINDOW関数: PARTITION
•  https://prestodb.io/docs/current/functions/window.html
•  グループごとに累積和を計算したい場合
•  SELECT month, item, cnt, sum(cnt)
over(partition by item order by month) from data
27
month item cnt total
2015-01 A 14 14
2015-02 A 20 34
2015-01 B 5 5
2015-02 B 18 23
カラーチャート (bar, rgb 関数)
28
Presto + BIツール:Prestogres
•  PostgreSQLを経由してPrestoにクエリを送信
–  ODBCドライバ経由でBIツールに接続
•  Tableau, Excel (Windows), ChartIOなど
2. select run_presto_as_temp_table(
‘presto_result’,
‘SELECT COUNT(1) FROM tbl1’
);
pgpool-II + patchclient
1. SELECT COUNT(1) FROM tbl1
4. SELECT * FROM presto_result;
PostgreSQL
3. “run_persto_as_temp_table” function
Prestoでクエリを実行
Presto
Coordinator
Monitoring Presto with ChartIO + Prestogres
30
TD + chartio.com
Database As A Service
31
Claremont Report on Database Research
•  データベースの研究者、ユーザー、
識者が今後のDBMSについて議論
–  CACM, Vol. 52 No. 6, 2009
•  Cloud Data Serviceの発展を予測
–  SQLの重要な役割
•  機能を制限できる
•  サービスとして提供するには好都合
–  難しい例:Spark 
•  任意のコードを実行させるためのセ
キュアなコンテナ開発が別途必要
32
Beckman Report on Database Research
•  2013年版
–  http://beckman.cs.wisc.edu/beckman-report2013.pdf
–  ほぼ全面Big Dataについての話題
•  End-to-end
–  データの収集から、knowledgeまで生み出す
•  Cloud Serviceの普及
–  IaaS, PaaS, SaaS
–  DBMSの全てをクラウドで、という理想にはまだ到達していない
33
Results Push
Results Push
SQL
Big Data Simplified: The Treasure Data Approach
AppServers
Multi-structured Events!
•  register!
•  login!
•  start_event!
•  purchase!
•  etc!
SQL-based
Ad-hoc Queries
SQL-based Dashboards
DBs & Data Marts
Other Apps
Familiar &
Table-oriented
Infinite & Economical
Cloud Data Store
ü  App log data!
ü  Mobile event data!
ü  Sensor data!
ü  Telemetry!
Mobile SDKs
Web SDK
Multi-structured Events
Multi-structured Events
Treasure Agent
Treasure Agent
Treasure Agent
Treasure Agent Treasure Agent
Treasure Agent
Treasure Agent
Treasure Agent
Embedded SDKs
Server-side Agents
34
TDのバックエンドストレージ
•  Real-Time Storage
–  直近のデータ (MessagePack format)
•  Archive Storage
–  過去のデータ, MapReduceでcolumnarに分解、圧縮 (MessagePack + gzipなど)
–  もともとのサイズ(json形式)の10分の1程度になる
35
Real-time
Storage
Archive
Storage
23c82b0ba3405d4c15aa85d2190e
6d7b1482412ab14f0332b8aee119
8a7bc848b2791b8fd603c719e54f
0e3d402b17638477c9a7977e7dab
...
2012-10-08 00:23:00 912ec80
2012-10-09 00:01:00 277a259
...
1時間毎にmerge
import SQL Query
Object Storage + Index
•  Storage
–  Amazon S3を利用。S3互換のRiak CS (Basho)も利用できる
–  HTTP経由のデータ通信
•  Object Index: PostgreSQLを使用
–  S3ファイルのリスト列挙操作は遅いため
–  ユーザー毎、時系列毎の範囲で検索するためにGiST indexを利用
36
Real-time
Storage
Archive
Storage
23c82b0ba3405d4c15aa85d2190e
6d7b1482412ab14f0332b8aee119
8a7bc848b2791b8fd603c719e54f
0e3d402b17638477c9a7977e7dab
...
2012-10-08 00:23:00 912ec80
2012-10-09 00:01:00 277a259
...
1時間毎にmerge
import SQL Query
PlazmaDB
37
time ip : string code :
int
action :
string
2014-09-21
10:14:33
135.52.211
.23
15 upload
2014-09-21
10:14:33
45.25.38.1
56
-1 temp
2014-09-21
10:14:34
97.12.76.5
5
99 null
2014-09-21
10:14:36
76.121.9.3
5
21 event
ü  Familiar Tables
Agent
Collectors
PlazmaDB
38
time ip : string code :
int
action :
string
2014-09-21
10:14:33
135.52.211
.23
15 upload
2014-09-21
10:14:33
45.25.38.1
56
-1 temp
2014-09-21
10:14:34
97.12.76.5
5
99 null
2014-09-21
10:14:36
76.121.9.3
5
21 event2014-09-21
11:27:41
97.12.76.5
5
99 null
2014-09-21
11:27:42
45.25.38.1
56
-1 temp
2014-09-21
11:27:42
135.52.211
.23
15 upload
2014-09-21
12:02:18
97.12.76.5
5
99 null
2014-09-21
12:02:18
45.25.38.1
56
-1 temp
2014-09-21
12:02:19
135.52.211
.23
15 upload
ü  Familiar Tables
ü  Time-based Partitioning
Agent
Collectors
Query
Partition
Pruning
PlazmaDB
39
time ip : string code :
int
action :
string
status :
string
2014-09-21
10:14:33
135.52.211
.23
15 upload null
2014-09-21
10:14:33
45.25.38.1
56
-1 temp null
2014-09-21
10:14:34
97.12.76.5
5
99 null null
2014-09-21
10:14:36
76.121.9.3
5
21 event null2014-09-21
11:27:41
97.12.76.5
5
99 null null
2014-09-21
11:27:42
45.25.38.1
56
-1 temp null
2014-09-21
11:27:42
135.52.211
.23
15 upload null
2014-09-21
12:02:18
97.12.76.5
5
99 null null
2014-09-21
12:02:18
45.25.38.1
56
-1 temp null
2014-09-21
12:02:19
135.52.211
.23
15 upload null
2014-09-21
12:03:24
76.34.123.
54
13 status ok
2014-09-21
12:03:25
92.67.7.11
3
13 status error
2014-09-21
12:04:51
135.52.211
.23
15 upload null
ü  Familiar Tables
ü  Time-based Partitioning
ü  Schema-Flexible
Agent
Collectors
PlazmaDB
40
MessagePack
41
•  レコードはMessagePack形式
•  入力時のデータ型はそのまま保存
–  intやstring型のデータが列中に混在した状況でも使える
PlazmaDBがスキーマに合わせて自動型変換を行う
MessagePack Format Types
•  0x00 ~ 0x7f int
–  1 byte
•  0xe0 ~ 0xff neg int
–  1 byte
•  Support
fixed/variable length
data
42
Dynamic Data Type Conversion
43
{“user”:54, “name”:”test”, “value”:”120”, “host”:”local”}
(Explicit) Schema user:int name:string value:int
SELECT 54 (int)
データ(JSON)
“test” (string) 120 (int)
host:int
NULL
Monitoring
44
Monitoring Presto Usage with Fluentd
45
Hive
Presto
DataDog
•  Monitoring CPU, memory and network usage
•  Query stats
46
DataDog: Presto Stats
47
Memory Usage
•  G1GC
-XX:+UseG1GC
適宜プロセスメモリが解放される (Presto 0.99で改善された)
•  -Xmx の値は低めに設定
–  システムメモリの8割程度
•  GCのタイミングでプロセスのメモリ使用量が跳ね上がることがある
–  OutOfMemory Error 対策
48
Query Collection in TD
•  SQL query logs
–  query, detailed query plan, elapsed time, processed rows, etc.
•  Presto is used for analyzing the query history
49
Clustering SQL
•  Clustering some customer queries
–  10000 queries, 2726 terms, 24 clusters.
50
Deployment
•  Building Presto takes more than 20 minute
•  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
51
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
52
Usage Shift: Simple to Complex queries
53
Admission control is necessary
•  Adjust resource utilization
–  Running Drivers (Splits)
–  MPL (Multi-Programming Level)
54
Challenge: Auto Scaling
•  Setting the cluster size based on the peak usage is expensive
•  But predicting customer usage is difficult
55
Problematic Queries
•  90% of queries finishes within 2 min.
–  But remaining 10% is still large
•  10% of 10,000 queries is 1,000.
•  Long-running queries
•  Hog queries
56
Long Running Queries
•  Typical bottlenecks
–  Cross joins
–  IN (a, b, c, …)
•  semi-join filtering process is slow
–  Complex scan condition
•  pushing down selection
•  but delays column scan
–  Tuple materialization
•  coordinator generates json data
–  Many aggregation columns
•  group by 1, 2, 3, 4, 5, 6, …
–  Full scan
•  Scanning 100 billion rows…
•  Adding more resources does not always make query faster
•  Storing intermediate data to disks is necessary
57
Result are
buffered
(waiting fetch)
slow process
fast
fast
Hog Query
•  Queries consuming a lot of CPU/memory resources
–  Coined by S. Krompass et al. [EDBT2009]
•  Example:
–  select 1 as day, count(…) from … where time <= current_date - interval 1 day
union all
select 2 as day, count(…) from … where time <= current_date - interval 2 day
union all
–  …
–  (up to 190 days)
•  More than 1000 query stages.
•  Presto tries to run all of the stages at once.
–  High CPU usage at coordinator
58
Presto Team at Facebook
•  Currently 12 members
•  Talked with core developers of Presto
•  2015 Q2 Plan
–  Per-query memory resource management
–  Stage-wise resource allocation
–  Raptor connector
•  native storage
•  + MySQL index
•  (internal-use only)
59
•  Huge Query Processing
•  Idea
–  Bushy plan -> Deep plan
–  Introduce stage-wise resource assignment
Huge Query Processing
60
Task-based memory limit -> Query Base Memory Limit
•  Task毎のメモリ割当はわかりにくい -> クエリ毎のメモリ割当に
Sink
Final aggregation
Exchange
Sink
Partial aggregation
Table scan
Sink
Final aggregation
Exchange
Sink
Partial aggregation
Table scan
Output
Exchange
Split
many splits / task
= many threads / worker
(table scan)
1 split / task
= 1 thread / worker
Worker 1 Worker 2
1 split / worker
= 1 thread / worker
Treasure Data: US Office
62
MessagePack Hackathon at Silicon Valley
•  SV
–  @frsyuki
–  @oza_x86
–  @hkmurakami
–  @taroleo
•  JP
–  @komamitsu
63
64

Weitere ähnliche Inhalte

Was ist angesagt?

ストリーム処理を支えるキューイングシステムの選び方
ストリーム処理を支えるキューイングシステムの選び方ストリーム処理を支えるキューイングシステムの選び方
ストリーム処理を支えるキューイングシステムの選び方Yoshiyasu SAEKI
 
大量のデータ処理や分析に使えるOSS Apache Spark入門(Open Source Conference 2021 Online/Kyoto 発表資料)
大量のデータ処理や分析に使えるOSS Apache Spark入門(Open Source Conference 2021 Online/Kyoto 発表資料)大量のデータ処理や分析に使えるOSS Apache Spark入門(Open Source Conference 2021 Online/Kyoto 発表資料)
大量のデータ処理や分析に使えるOSS Apache Spark入門(Open Source Conference 2021 Online/Kyoto 発表資料)NTT DATA Technology & Innovation
 
分析指向データレイク実現の次の一手 ~Delta Lake、なにそれおいしいの?~(NTTデータ テクノロジーカンファレンス 2020 発表資料)
分析指向データレイク実現の次の一手 ~Delta Lake、なにそれおいしいの?~(NTTデータ テクノロジーカンファレンス 2020 発表資料)分析指向データレイク実現の次の一手 ~Delta Lake、なにそれおいしいの?~(NTTデータ テクノロジーカンファレンス 2020 発表資料)
分析指向データレイク実現の次の一手 ~Delta Lake、なにそれおいしいの?~(NTTデータ テクノロジーカンファレンス 2020 発表資料)NTT DATA Technology & Innovation
 
「GraphDB徹底入門」〜構造や仕組み理解から使いどころ・種々のGraphDBの比較まで幅広く〜
「GraphDB徹底入門」〜構造や仕組み理解から使いどころ・種々のGraphDBの比較まで幅広く〜「GraphDB徹底入門」〜構造や仕組み理解から使いどころ・種々のGraphDBの比較まで幅広く〜
「GraphDB徹底入門」〜構造や仕組み理解から使いどころ・種々のGraphDBの比較まで幅広く〜Takahiro Inoue
 
AWSで作る分析基盤
AWSで作る分析基盤AWSで作る分析基盤
AWSで作る分析基盤Yu Otsubo
 
事例で学ぶApache Cassandra
事例で学ぶApache Cassandra事例で学ぶApache Cassandra
事例で学ぶApache CassandraYuki Morishita
 
[CTO Night & Day 2019] AWS で構築するデータレイク基盤と amazon.com での導入事例 #ctonight
[CTO Night & Day 2019] AWS で構築するデータレイク基盤と amazon.com での導入事例 #ctonight[CTO Night & Day 2019] AWS で構築するデータレイク基盤と amazon.com での導入事例 #ctonight
[CTO Night & Day 2019] AWS で構築するデータレイク基盤と amazon.com での導入事例 #ctonightAmazon Web Services Japan
 
データ分析を支える技術 DWH再入門
データ分析を支える技術 DWH再入門データ分析を支える技術 DWH再入門
データ分析を支える技術 DWH再入門Satoru Ishikawa
 
大規模データ処理の定番OSS Hadoop / Spark 最新動向 - 2021秋 -(db tech showcase 2021 / ONLINE 発...
大規模データ処理の定番OSS Hadoop / Spark 最新動向 - 2021秋 -(db tech showcase 2021 / ONLINE 発...大規模データ処理の定番OSS Hadoop / Spark 最新動向 - 2021秋 -(db tech showcase 2021 / ONLINE 発...
大規模データ処理の定番OSS Hadoop / Spark 最新動向 - 2021秋 -(db tech showcase 2021 / ONLINE 発...NTT DATA Technology & Innovation
 
Dockerからcontainerdへの移行
Dockerからcontainerdへの移行Dockerからcontainerdへの移行
Dockerからcontainerdへの移行Kohei Tokunaga
 
Apache Airflow 概要(Airflowの基礎を学ぶハンズオンワークショップ 発表資料)
Apache Airflow 概要(Airflowの基礎を学ぶハンズオンワークショップ 発表資料)Apache Airflow 概要(Airflowの基礎を学ぶハンズオンワークショップ 発表資料)
Apache Airflow 概要(Airflowの基礎を学ぶハンズオンワークショップ 発表資料)NTT DATA Technology & Innovation
 
マイクロサービス 4つの分割アプローチ
マイクロサービス 4つの分割アプローチマイクロサービス 4つの分割アプローチ
マイクロサービス 4つの分割アプローチ増田 亨
 
Snowflake Architecture and Performance(db tech showcase Tokyo 2018)
Snowflake Architecture and Performance(db tech showcase Tokyo 2018)Snowflake Architecture and Performance(db tech showcase Tokyo 2018)
Snowflake Architecture and Performance(db tech showcase Tokyo 2018)Mineaki Motohashi
 
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #1320210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13Amazon Web Services Japan
 
アプリ開発者、DB 管理者視点での Cloud Spanner 活用方法 | 第 10 回 Google Cloud INSIDE Games & App...
アプリ開発者、DB 管理者視点での Cloud Spanner 活用方法 | 第 10 回 Google Cloud INSIDE Games & App...アプリ開発者、DB 管理者視点での Cloud Spanner 活用方法 | 第 10 回 Google Cloud INSIDE Games & App...
アプリ開発者、DB 管理者視点での Cloud Spanner 活用方法 | 第 10 回 Google Cloud INSIDE Games & App...Google Cloud Platform - Japan
 
Presto ベースのマネージドサービス Amazon Athena
Presto ベースのマネージドサービス Amazon AthenaPresto ベースのマネージドサービス Amazon Athena
Presto ベースのマネージドサービス Amazon AthenaAmazon Web Services Japan
 
SQLアンチパターン 幻の第26章「とりあえず削除フラグ」
SQLアンチパターン 幻の第26章「とりあえず削除フラグ」SQLアンチパターン 幻の第26章「とりあえず削除フラグ」
SQLアンチパターン 幻の第26章「とりあえず削除フラグ」Takuto Wada
 
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティスAmazon Web Services Japan
 

Was ist angesagt? (20)

ストリーム処理を支えるキューイングシステムの選び方
ストリーム処理を支えるキューイングシステムの選び方ストリーム処理を支えるキューイングシステムの選び方
ストリーム処理を支えるキューイングシステムの選び方
 
大量のデータ処理や分析に使えるOSS Apache Spark入門(Open Source Conference 2021 Online/Kyoto 発表資料)
大量のデータ処理や分析に使えるOSS Apache Spark入門(Open Source Conference 2021 Online/Kyoto 発表資料)大量のデータ処理や分析に使えるOSS Apache Spark入門(Open Source Conference 2021 Online/Kyoto 発表資料)
大量のデータ処理や分析に使えるOSS Apache Spark入門(Open Source Conference 2021 Online/Kyoto 発表資料)
 
NetflixにおけるPresto/Spark活用事例
NetflixにおけるPresto/Spark活用事例NetflixにおけるPresto/Spark活用事例
NetflixにおけるPresto/Spark活用事例
 
分析指向データレイク実現の次の一手 ~Delta Lake、なにそれおいしいの?~(NTTデータ テクノロジーカンファレンス 2020 発表資料)
分析指向データレイク実現の次の一手 ~Delta Lake、なにそれおいしいの?~(NTTデータ テクノロジーカンファレンス 2020 発表資料)分析指向データレイク実現の次の一手 ~Delta Lake、なにそれおいしいの?~(NTTデータ テクノロジーカンファレンス 2020 発表資料)
分析指向データレイク実現の次の一手 ~Delta Lake、なにそれおいしいの?~(NTTデータ テクノロジーカンファレンス 2020 発表資料)
 
「GraphDB徹底入門」〜構造や仕組み理解から使いどころ・種々のGraphDBの比較まで幅広く〜
「GraphDB徹底入門」〜構造や仕組み理解から使いどころ・種々のGraphDBの比較まで幅広く〜「GraphDB徹底入門」〜構造や仕組み理解から使いどころ・種々のGraphDBの比較まで幅広く〜
「GraphDB徹底入門」〜構造や仕組み理解から使いどころ・種々のGraphDBの比較まで幅広く〜
 
AWSで作る分析基盤
AWSで作る分析基盤AWSで作る分析基盤
AWSで作る分析基盤
 
事例で学ぶApache Cassandra
事例で学ぶApache Cassandra事例で学ぶApache Cassandra
事例で学ぶApache Cassandra
 
[CTO Night & Day 2019] AWS で構築するデータレイク基盤と amazon.com での導入事例 #ctonight
[CTO Night & Day 2019] AWS で構築するデータレイク基盤と amazon.com での導入事例 #ctonight[CTO Night & Day 2019] AWS で構築するデータレイク基盤と amazon.com での導入事例 #ctonight
[CTO Night & Day 2019] AWS で構築するデータレイク基盤と amazon.com での導入事例 #ctonight
 
データ分析を支える技術 DWH再入門
データ分析を支える技術 DWH再入門データ分析を支える技術 DWH再入門
データ分析を支える技術 DWH再入門
 
大規模データ処理の定番OSS Hadoop / Spark 最新動向 - 2021秋 -(db tech showcase 2021 / ONLINE 発...
大規模データ処理の定番OSS Hadoop / Spark 最新動向 - 2021秋 -(db tech showcase 2021 / ONLINE 発...大規模データ処理の定番OSS Hadoop / Spark 最新動向 - 2021秋 -(db tech showcase 2021 / ONLINE 発...
大規模データ処理の定番OSS Hadoop / Spark 最新動向 - 2021秋 -(db tech showcase 2021 / ONLINE 発...
 
Dockerからcontainerdへの移行
Dockerからcontainerdへの移行Dockerからcontainerdへの移行
Dockerからcontainerdへの移行
 
Apache Airflow 概要(Airflowの基礎を学ぶハンズオンワークショップ 発表資料)
Apache Airflow 概要(Airflowの基礎を学ぶハンズオンワークショップ 発表資料)Apache Airflow 概要(Airflowの基礎を学ぶハンズオンワークショップ 発表資料)
Apache Airflow 概要(Airflowの基礎を学ぶハンズオンワークショップ 発表資料)
 
マイクロサービス 4つの分割アプローチ
マイクロサービス 4つの分割アプローチマイクロサービス 4つの分割アプローチ
マイクロサービス 4つの分割アプローチ
 
Snowflake Architecture and Performance(db tech showcase Tokyo 2018)
Snowflake Architecture and Performance(db tech showcase Tokyo 2018)Snowflake Architecture and Performance(db tech showcase Tokyo 2018)
Snowflake Architecture and Performance(db tech showcase Tokyo 2018)
 
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #1320210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
20210127 今日から始めるイベントドリブンアーキテクチャ AWS Expert Online #13
 
アプリ開発者、DB 管理者視点での Cloud Spanner 活用方法 | 第 10 回 Google Cloud INSIDE Games & App...
アプリ開発者、DB 管理者視点での Cloud Spanner 活用方法 | 第 10 回 Google Cloud INSIDE Games & App...アプリ開発者、DB 管理者視点での Cloud Spanner 活用方法 | 第 10 回 Google Cloud INSIDE Games & App...
アプリ開発者、DB 管理者視点での Cloud Spanner 活用方法 | 第 10 回 Google Cloud INSIDE Games & App...
 
Presto ベースのマネージドサービス Amazon Athena
Presto ベースのマネージドサービス Amazon AthenaPresto ベースのマネージドサービス Amazon Athena
Presto ベースのマネージドサービス Amazon Athena
 
SQLアンチパターン 幻の第26章「とりあえず削除フラグ」
SQLアンチパターン 幻の第26章「とりあえず削除フラグ」SQLアンチパターン 幻の第26章「とりあえず削除フラグ」
SQLアンチパターン 幻の第26章「とりあえず削除フラグ」
 
Hadoop入門
Hadoop入門Hadoop入門
Hadoop入門
 
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
[Aurora事例祭り]Amazon Aurora を使いこなすためのベストプラクティス
 

Andere mochten auch

爆速クエリエンジン”Presto”を使いたくなる話
爆速クエリエンジン”Presto”を使いたくなる話爆速クエリエンジン”Presto”を使いたくなる話
爆速クエリエンジン”Presto”を使いたくなる話Kentaro Yoshida
 
Presto - Hadoop Conference Japan 2014
Presto - Hadoop Conference Japan 2014Presto - Hadoop Conference Japan 2014
Presto - Hadoop Conference Japan 2014Sadayuki Furuhashi
 
Prestoで実現するインタラクティブクエリ - dbtech showcase 2014 Tokyo
Prestoで実現するインタラクティブクエリ - dbtech showcase 2014 TokyoPrestoで実現するインタラクティブクエリ - dbtech showcase 2014 Tokyo
Prestoで実現するインタラクティブクエリ - dbtech showcase 2014 TokyoTreasure Data, Inc.
 
2011年度 生物データベース論 2日目 木構造データ
2011年度 生物データベース論 2日目 木構造データ2011年度 生物データベース論 2日目 木構造データ
2011年度 生物データベース論 2日目 木構造データTaro L. Saito
 
Apache Flume 1.5を活⽤したAmebaにおけるログのシステム連携
Apache  Flume 1.5を活⽤したAmebaにおけるログのシステム連携Apache  Flume 1.5を活⽤したAmebaにおけるログのシステム連携
Apache Flume 1.5を活⽤したAmebaにおけるログのシステム連携cyberagent
 
Presto in my_use_case
Presto in my_use_casePresto in my_use_case
Presto in my_use_casewyukawa
 
Amebaにおけるログ解析基盤Patriotの活用事例
Amebaにおけるログ解析基盤Patriotの活用事例Amebaにおけるログ解析基盤Patriotの活用事例
Amebaにおけるログ解析基盤Patriotの活用事例cyberagent
 
トレジャーデータ新サービス発表 2013/12/9
トレジャーデータ新サービス発表 2013/12/9トレジャーデータ新サービス発表 2013/12/9
トレジャーデータ新サービス発表 2013/12/9Treasure Data, Inc.
 
d3sparql.js demo at SWAT4LS 2014 in Berlin
d3sparql.js demo at SWAT4LS 2014 in Berlind3sparql.js demo at SWAT4LS 2014 in Berlin
d3sparql.js demo at SWAT4LS 2014 in BerlinToshiaki Katayama
 
RedisのBitCountとHyperLogLogを使用した超高速Unique User数集計
RedisのBitCountとHyperLogLogを使用した超高速Unique User数集計RedisのBitCountとHyperLogLogを使用した超高速Unique User数集計
RedisのBitCountとHyperLogLogを使用した超高速Unique User数集計tmatsuura
 
SQL for Everything at CWT2014
SQL for Everything at CWT2014SQL for Everything at CWT2014
SQL for Everything at CWT2014N Masahiro
 
Presto anatomy
Presto anatomyPresto anatomy
Presto anatomyDongmin Yu
 
Presto Meetup 2016 Small Start
Presto Meetup 2016 Small StartPresto Meetup 2016 Small Start
Presto Meetup 2016 Small StartHiroshi Toyama
 
Ipros techmeetup 20131218_scala_handson
Ipros techmeetup 20131218_scala_handsonIpros techmeetup 20131218_scala_handson
Ipros techmeetup 20131218_scala_handsonhonda-y
 

Andere mochten auch (20)

爆速クエリエンジン”Presto”を使いたくなる話
爆速クエリエンジン”Presto”を使いたくなる話爆速クエリエンジン”Presto”を使いたくなる話
爆速クエリエンジン”Presto”を使いたくなる話
 
Presto - Hadoop Conference Japan 2014
Presto - Hadoop Conference Japan 2014Presto - Hadoop Conference Japan 2014
Presto - Hadoop Conference Japan 2014
 
Prestoで実現するインタラクティブクエリ - dbtech showcase 2014 Tokyo
Prestoで実現するインタラクティブクエリ - dbtech showcase 2014 TokyoPrestoで実現するインタラクティブクエリ - dbtech showcase 2014 Tokyo
Prestoで実現するインタラクティブクエリ - dbtech showcase 2014 Tokyo
 
Internals of Presto Service
Internals of Presto ServiceInternals of Presto Service
Internals of Presto Service
 
2011年度 生物データベース論 2日目 木構造データ
2011年度 生物データベース論 2日目 木構造データ2011年度 生物データベース論 2日目 木構造データ
2011年度 生物データベース論 2日目 木構造データ
 
Apache Flume 1.5を活⽤したAmebaにおけるログのシステム連携
Apache  Flume 1.5を活⽤したAmebaにおけるログのシステム連携Apache  Flume 1.5を活⽤したAmebaにおけるログのシステム連携
Apache Flume 1.5を活⽤したAmebaにおけるログのシステム連携
 
Presto in my_use_case
Presto in my_use_casePresto in my_use_case
Presto in my_use_case
 
Amebaにおけるログ解析基盤Patriotの活用事例
Amebaにおけるログ解析基盤Patriotの活用事例Amebaにおけるログ解析基盤Patriotの活用事例
Amebaにおけるログ解析基盤Patriotの活用事例
 
金融機関でのHive/Presto事例紹介
金融機関でのHive/Presto事例紹介金融機関でのHive/Presto事例紹介
金融機関でのHive/Presto事例紹介
 
d3sparql.js
d3sparql.js d3sparql.js
d3sparql.js
 
re:dash is awesome
re:dash is awesomere:dash is awesome
re:dash is awesome
 
トレジャーデータ新サービス発表 2013/12/9
トレジャーデータ新サービス発表 2013/12/9トレジャーデータ新サービス発表 2013/12/9
トレジャーデータ新サービス発表 2013/12/9
 
d3sparql.js demo at SWAT4LS 2014 in Berlin
d3sparql.js demo at SWAT4LS 2014 in Berlind3sparql.js demo at SWAT4LS 2014 in Berlin
d3sparql.js demo at SWAT4LS 2014 in Berlin
 
RedisのBitCountとHyperLogLogを使用した超高速Unique User数集計
RedisのBitCountとHyperLogLogを使用した超高速Unique User数集計RedisのBitCountとHyperLogLogを使用した超高速Unique User数集計
RedisのBitCountとHyperLogLogを使用した超高速Unique User数集計
 
SQL for Everything at CWT2014
SQL for Everything at CWT2014SQL for Everything at CWT2014
SQL for Everything at CWT2014
 
Presto anatomy
Presto anatomyPresto anatomy
Presto anatomy
 
Presto Meetup 2016 Small Start
Presto Meetup 2016 Small StartPresto Meetup 2016 Small Start
Presto Meetup 2016 Small Start
 
Vagrant
VagrantVagrant
Vagrant
 
Ipros techmeetup 20131218_scala_handson
Ipros techmeetup 20131218_scala_handsonIpros techmeetup 20131218_scala_handson
Ipros techmeetup 20131218_scala_handson
 
Fluentd
FluentdFluentd
Fluentd
 

Ähnlich wie Presto As A Service - Treasure DataでのPresto運用事例

Spark Summit 2014 の報告と最近の取り組みについて
Spark Summit 2014 の報告と最近の取り組みについてSpark Summit 2014 の報告と最近の取り組みについて
Spark Summit 2014 の報告と最近の取り組みについてRecruit Technologies
 
Developers.IO 2019 Effective Datalake
Developers.IO 2019 Effective DatalakeDevelopers.IO 2019 Effective Datalake
Developers.IO 2019 Effective DatalakeSatoru Ishikawa
 
最近のストリーム処理事情振り返り
最近のストリーム処理事情振り返り最近のストリーム処理事情振り返り
最近のストリーム処理事情振り返りSotaro Kimura
 
Deep Dive into Spark SQL with Advanced Performance Tuning
Deep Dive into Spark SQL with Advanced Performance TuningDeep Dive into Spark SQL with Advanced Performance Tuning
Deep Dive into Spark SQL with Advanced Performance TuningTakuya UESHIN
 
利用者主体で行う分析のための分析基盤
利用者主体で行う分析のための分析基盤利用者主体で行う分析のための分析基盤
利用者主体で行う分析のための分析基盤Sotaro Kimura
 
EmbulkとDigdagとデータ分析基盤と
EmbulkとDigdagとデータ分析基盤とEmbulkとDigdagとデータ分析基盤と
EmbulkとDigdagとデータ分析基盤とToru Takahashi
 
EmbulkとDigdagとデータ分析基盤と
EmbulkとDigdagとデータ分析基盤とEmbulkとDigdagとデータ分析基盤と
EmbulkとDigdagとデータ分析基盤とToru Takahashi
 
[db tech showcase Tokyo 2014] D33: Prestoで実現するインタラクティブクエリ by トレジャーデータ株式会社 斉藤太郎
[db tech showcase Tokyo 2014] D33: Prestoで実現するインタラクティブクエリ  by トレジャーデータ株式会社 斉藤太郎[db tech showcase Tokyo 2014] D33: Prestoで実現するインタラクティブクエリ  by トレジャーデータ株式会社 斉藤太郎
[db tech showcase Tokyo 2014] D33: Prestoで実現するインタラクティブクエリ by トレジャーデータ株式会社 斉藤太郎Insight Technology, Inc.
 
経済学のための実践的データ分析 4.SQL ことはじめ
経済学のための実践的データ分析 4.SQL ことはじめ経済学のための実践的データ分析 4.SQL ことはじめ
経済学のための実践的データ分析 4.SQL ことはじめYasushi Hara
 
大量のデータ処理や分析に使えるOSS Apache Sparkのご紹介(Open Source Conference 2020 Online/Kyoto ...
大量のデータ処理や分析に使えるOSS Apache Sparkのご紹介(Open Source Conference 2020 Online/Kyoto ...大量のデータ処理や分析に使えるOSS Apache Sparkのご紹介(Open Source Conference 2020 Online/Kyoto ...
大量のデータ処理や分析に使えるOSS Apache Sparkのご紹介(Open Source Conference 2020 Online/Kyoto ...NTT DATA Technology & Innovation
 
15.05.21_ビッグデータ分析基盤Sparkの最新動向とその活用-Spark SUMMIT EAST 2015-
15.05.21_ビッグデータ分析基盤Sparkの最新動向とその活用-Spark SUMMIT EAST 2015-15.05.21_ビッグデータ分析基盤Sparkの最新動向とその活用-Spark SUMMIT EAST 2015-
15.05.21_ビッグデータ分析基盤Sparkの最新動向とその活用-Spark SUMMIT EAST 2015-LINE Corp.
 
Spark Analytics - スケーラブルな分散処理
Spark Analytics - スケーラブルな分散処理Spark Analytics - スケーラブルな分散処理
Spark Analytics - スケーラブルな分散処理Tusyoshi Matsuzaki
 
クラウド運用のためのストリームマイニング
クラウド運用のためのストリームマイニングクラウド運用のためのストリームマイニング
クラウド運用のためのストリームマイニングShin Matsumoto
 
Data platformdesign
Data platformdesignData platformdesign
Data platformdesignRyoma Nagata
 
Treasure Dataを支える技術 - MessagePack編
Treasure Dataを支える技術 - MessagePack編Treasure Dataを支える技術 - MessagePack編
Treasure Dataを支える技術 - MessagePack編Taro L. Saito
 
Azure Antenna はじめての Azure Data Lake
Azure Antenna はじめての Azure Data LakeAzure Antenna はじめての Azure Data Lake
Azure Antenna はじめての Azure Data LakeHideo Takagi
 
GraphQLはどんな時に使うか
GraphQLはどんな時に使うかGraphQLはどんな時に使うか
GraphQLはどんな時に使うかYutaka Tachibana
 
PDF版 世界中のゲーム分析をしてきたPlayFabが大進化!一緒に裏側の最新データ探索の仕組みを覗いてみよう Db tech showcase2020
PDF版 世界中のゲーム分析をしてきたPlayFabが大進化!一緒に裏側の最新データ探索の仕組みを覗いてみよう Db tech showcase2020PDF版 世界中のゲーム分析をしてきたPlayFabが大進化!一緒に裏側の最新データ探索の仕組みを覗いてみよう Db tech showcase2020
PDF版 世界中のゲーム分析をしてきたPlayFabが大進化!一緒に裏側の最新データ探索の仕組みを覗いてみよう Db tech showcase2020Daisuke Masubuchi
 
PySpark Intro Part.2 with SQL Graph
PySpark Intro Part.2 with SQL GraphPySpark Intro Part.2 with SQL Graph
PySpark Intro Part.2 with SQL GraphOshitari_kochi
 

Ähnlich wie Presto As A Service - Treasure DataでのPresto運用事例 (20)

Spark Summit 2014 の報告と最近の取り組みについて
Spark Summit 2014 の報告と最近の取り組みについてSpark Summit 2014 の報告と最近の取り組みについて
Spark Summit 2014 の報告と最近の取り組みについて
 
Developers.IO 2019 Effective Datalake
Developers.IO 2019 Effective DatalakeDevelopers.IO 2019 Effective Datalake
Developers.IO 2019 Effective Datalake
 
最近のストリーム処理事情振り返り
最近のストリーム処理事情振り返り最近のストリーム処理事情振り返り
最近のストリーム処理事情振り返り
 
Deep Dive into Spark SQL with Advanced Performance Tuning
Deep Dive into Spark SQL with Advanced Performance TuningDeep Dive into Spark SQL with Advanced Performance Tuning
Deep Dive into Spark SQL with Advanced Performance Tuning
 
利用者主体で行う分析のための分析基盤
利用者主体で行う分析のための分析基盤利用者主体で行う分析のための分析基盤
利用者主体で行う分析のための分析基盤
 
EmbulkとDigdagとデータ分析基盤と
EmbulkとDigdagとデータ分析基盤とEmbulkとDigdagとデータ分析基盤と
EmbulkとDigdagとデータ分析基盤と
 
EmbulkとDigdagとデータ分析基盤と
EmbulkとDigdagとデータ分析基盤とEmbulkとDigdagとデータ分析基盤と
EmbulkとDigdagとデータ分析基盤と
 
[db tech showcase Tokyo 2014] D33: Prestoで実現するインタラクティブクエリ by トレジャーデータ株式会社 斉藤太郎
[db tech showcase Tokyo 2014] D33: Prestoで実現するインタラクティブクエリ  by トレジャーデータ株式会社 斉藤太郎[db tech showcase Tokyo 2014] D33: Prestoで実現するインタラクティブクエリ  by トレジャーデータ株式会社 斉藤太郎
[db tech showcase Tokyo 2014] D33: Prestoで実現するインタラクティブクエリ by トレジャーデータ株式会社 斉藤太郎
 
経済学のための実践的データ分析 4.SQL ことはじめ
経済学のための実践的データ分析 4.SQL ことはじめ経済学のための実践的データ分析 4.SQL ことはじめ
経済学のための実践的データ分析 4.SQL ことはじめ
 
大量のデータ処理や分析に使えるOSS Apache Sparkのご紹介(Open Source Conference 2020 Online/Kyoto ...
大量のデータ処理や分析に使えるOSS Apache Sparkのご紹介(Open Source Conference 2020 Online/Kyoto ...大量のデータ処理や分析に使えるOSS Apache Sparkのご紹介(Open Source Conference 2020 Online/Kyoto ...
大量のデータ処理や分析に使えるOSS Apache Sparkのご紹介(Open Source Conference 2020 Online/Kyoto ...
 
15.05.21_ビッグデータ分析基盤Sparkの最新動向とその活用-Spark SUMMIT EAST 2015-
15.05.21_ビッグデータ分析基盤Sparkの最新動向とその活用-Spark SUMMIT EAST 2015-15.05.21_ビッグデータ分析基盤Sparkの最新動向とその活用-Spark SUMMIT EAST 2015-
15.05.21_ビッグデータ分析基盤Sparkの最新動向とその活用-Spark SUMMIT EAST 2015-
 
Spark Analytics - スケーラブルな分散処理
Spark Analytics - スケーラブルな分散処理Spark Analytics - スケーラブルな分散処理
Spark Analytics - スケーラブルな分散処理
 
クラウド運用のためのストリームマイニング
クラウド運用のためのストリームマイニングクラウド運用のためのストリームマイニング
クラウド運用のためのストリームマイニング
 
Data platformdesign
Data platformdesignData platformdesign
Data platformdesign
 
SAIS/SIGMOD参加報告 in SAIS/DWS2018報告会@Yahoo! JAPAN
SAIS/SIGMOD参加報告 in SAIS/DWS2018報告会@Yahoo! JAPANSAIS/SIGMOD参加報告 in SAIS/DWS2018報告会@Yahoo! JAPAN
SAIS/SIGMOD参加報告 in SAIS/DWS2018報告会@Yahoo! JAPAN
 
Treasure Dataを支える技術 - MessagePack編
Treasure Dataを支える技術 - MessagePack編Treasure Dataを支える技術 - MessagePack編
Treasure Dataを支える技術 - MessagePack編
 
Azure Antenna はじめての Azure Data Lake
Azure Antenna はじめての Azure Data LakeAzure Antenna はじめての Azure Data Lake
Azure Antenna はじめての Azure Data Lake
 
GraphQLはどんな時に使うか
GraphQLはどんな時に使うかGraphQLはどんな時に使うか
GraphQLはどんな時に使うか
 
PDF版 世界中のゲーム分析をしてきたPlayFabが大進化!一緒に裏側の最新データ探索の仕組みを覗いてみよう Db tech showcase2020
PDF版 世界中のゲーム分析をしてきたPlayFabが大進化!一緒に裏側の最新データ探索の仕組みを覗いてみよう Db tech showcase2020PDF版 世界中のゲーム分析をしてきたPlayFabが大進化!一緒に裏側の最新データ探索の仕組みを覗いてみよう Db tech showcase2020
PDF版 世界中のゲーム分析をしてきたPlayFabが大進化!一緒に裏側の最新データ探索の仕組みを覗いてみよう Db tech showcase2020
 
PySpark Intro Part.2 with SQL Graph
PySpark Intro Part.2 with SQL GraphPySpark Intro Part.2 with SQL Graph
PySpark Intro Part.2 with SQL Graph
 

Mehr von Taro L. Saito

Unifying Frontend and Backend Development with Scala - ScalaCon 2021
Unifying Frontend and Backend Development with Scala - ScalaCon 2021Unifying Frontend and Backend Development with Scala - ScalaCon 2021
Unifying Frontend and Backend Development with Scala - ScalaCon 2021Taro L. Saito
 
Journey of Migrating 1 Million Presto Queries - Presto Webinar 2020
Journey of Migrating 1 Million Presto Queries - Presto Webinar 2020Journey of Migrating 1 Million Presto Queries - Presto Webinar 2020
Journey of Migrating 1 Million Presto Queries - Presto Webinar 2020Taro L. Saito
 
Scala for Everything: From Frontend to Backend Applications - Scala Matsuri 2020
Scala for Everything: From Frontend to Backend Applications - Scala Matsuri 2020Scala for Everything: From Frontend to Backend Applications - Scala Matsuri 2020
Scala for Everything: From Frontend to Backend Applications - Scala Matsuri 2020Taro L. Saito
 
td-spark internals: Extending Spark with Airframe - Spark Meetup Tokyo #3 2020
td-spark internals: Extending Spark with Airframe - Spark Meetup Tokyo #3 2020td-spark internals: Extending Spark with Airframe - Spark Meetup Tokyo #3 2020
td-spark internals: Extending Spark with Airframe - Spark Meetup Tokyo #3 2020Taro L. Saito
 
Airframe Meetup #3: 2019 Updates & AirSpec
Airframe Meetup #3: 2019 Updates & AirSpecAirframe Meetup #3: 2019 Updates & AirSpec
Airframe Meetup #3: 2019 Updates & AirSpecTaro L. Saito
 
Presto At Arm Treasure Data - 2019 Updates
Presto At Arm Treasure Data - 2019 UpdatesPresto At Arm Treasure Data - 2019 Updates
Presto At Arm Treasure Data - 2019 UpdatesTaro L. Saito
 
Reading The Source Code of Presto
Reading The Source Code of PrestoReading The Source Code of Presto
Reading The Source Code of PrestoTaro L. Saito
 
How To Use Scala At Work - Airframe In Action at Arm Treasure Data
How To Use Scala At Work - Airframe In Action at Arm Treasure DataHow To Use Scala At Work - Airframe In Action at Arm Treasure Data
How To Use Scala At Work - Airframe In Action at Arm Treasure DataTaro L. Saito
 
Airframe: Lightweight Building Blocks for Scala - Scale By The Bay 2018
Airframe: Lightweight Building Blocks for Scala - Scale By The Bay 2018Airframe: Lightweight Building Blocks for Scala - Scale By The Bay 2018
Airframe: Lightweight Building Blocks for Scala - Scale By The Bay 2018Taro L. Saito
 
Airframe: Lightweight Building Blocks for Scala @ TD Tech Talk 2018-10-17
Airframe: Lightweight Building Blocks for Scala @ TD Tech Talk 2018-10-17Airframe: Lightweight Building Blocks for Scala @ TD Tech Talk 2018-10-17
Airframe: Lightweight Building Blocks for Scala @ TD Tech Talk 2018-10-17Taro L. Saito
 
Tips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTaro L. Saito
 
Learning Silicon Valley Culture
Learning Silicon Valley CultureLearning Silicon Valley Culture
Learning Silicon Valley CultureTaro L. Saito
 
Presto At Treasure Data
Presto At Treasure DataPresto At Treasure Data
Presto At Treasure DataTaro L. Saito
 
Scala at Treasure Data
Scala at Treasure DataScala at Treasure Data
Scala at Treasure DataTaro L. Saito
 
Introduction to Presto at Treasure Data
Introduction to Presto at Treasure DataIntroduction to Presto at Treasure Data
Introduction to Presto at Treasure DataTaro L. Saito
 
Workflow Hacks #1 - dots. Tokyo
Workflow Hacks #1 - dots. TokyoWorkflow Hacks #1 - dots. Tokyo
Workflow Hacks #1 - dots. TokyoTaro L. Saito
 
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
 
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
 

Mehr von Taro L. Saito (20)

Unifying Frontend and Backend Development with Scala - ScalaCon 2021
Unifying Frontend and Backend Development with Scala - ScalaCon 2021Unifying Frontend and Backend Development with Scala - ScalaCon 2021
Unifying Frontend and Backend Development with Scala - ScalaCon 2021
 
Journey of Migrating 1 Million Presto Queries - Presto Webinar 2020
Journey of Migrating 1 Million Presto Queries - Presto Webinar 2020Journey of Migrating 1 Million Presto Queries - Presto Webinar 2020
Journey of Migrating 1 Million Presto Queries - Presto Webinar 2020
 
Scala for Everything: From Frontend to Backend Applications - Scala Matsuri 2020
Scala for Everything: From Frontend to Backend Applications - Scala Matsuri 2020Scala for Everything: From Frontend to Backend Applications - Scala Matsuri 2020
Scala for Everything: From Frontend to Backend Applications - Scala Matsuri 2020
 
Airframe RPC
Airframe RPCAirframe RPC
Airframe RPC
 
td-spark internals: Extending Spark with Airframe - Spark Meetup Tokyo #3 2020
td-spark internals: Extending Spark with Airframe - Spark Meetup Tokyo #3 2020td-spark internals: Extending Spark with Airframe - Spark Meetup Tokyo #3 2020
td-spark internals: Extending Spark with Airframe - Spark Meetup Tokyo #3 2020
 
Airframe Meetup #3: 2019 Updates & AirSpec
Airframe Meetup #3: 2019 Updates & AirSpecAirframe Meetup #3: 2019 Updates & AirSpec
Airframe Meetup #3: 2019 Updates & AirSpec
 
Presto At Arm Treasure Data - 2019 Updates
Presto At Arm Treasure Data - 2019 UpdatesPresto At Arm Treasure Data - 2019 Updates
Presto At Arm Treasure Data - 2019 Updates
 
Reading The Source Code of Presto
Reading The Source Code of PrestoReading The Source Code of Presto
Reading The Source Code of Presto
 
How To Use Scala At Work - Airframe In Action at Arm Treasure Data
How To Use Scala At Work - Airframe In Action at Arm Treasure DataHow To Use Scala At Work - Airframe In Action at Arm Treasure Data
How To Use Scala At Work - Airframe In Action at Arm Treasure Data
 
Airframe: Lightweight Building Blocks for Scala - Scale By The Bay 2018
Airframe: Lightweight Building Blocks for Scala - Scale By The Bay 2018Airframe: Lightweight Building Blocks for Scala - Scale By The Bay 2018
Airframe: Lightweight Building Blocks for Scala - Scale By The Bay 2018
 
Airframe: Lightweight Building Blocks for Scala @ TD Tech Talk 2018-10-17
Airframe: Lightweight Building Blocks for Scala @ TD Tech Talk 2018-10-17Airframe: Lightweight Building Blocks for Scala @ TD Tech Talk 2018-10-17
Airframe: Lightweight Building Blocks for Scala @ TD Tech Talk 2018-10-17
 
Tips For Maintaining OSS Projects
Tips For Maintaining OSS ProjectsTips For Maintaining OSS Projects
Tips For Maintaining OSS Projects
 
Learning Silicon Valley Culture
Learning Silicon Valley CultureLearning Silicon Valley Culture
Learning Silicon Valley Culture
 
Presto At Treasure Data
Presto At Treasure DataPresto At Treasure Data
Presto At Treasure Data
 
Scala at Treasure Data
Scala at Treasure DataScala at Treasure Data
Scala at Treasure Data
 
Introduction to Presto at Treasure Data
Introduction to Presto at Treasure DataIntroduction to Presto at Treasure Data
Introduction to Presto at Treasure Data
 
Workflow Hacks #1 - dots. Tokyo
Workflow Hacks #1 - dots. TokyoWorkflow Hacks #1 - dots. Tokyo
Workflow Hacks #1 - dots. Tokyo
 
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
 
JNuma Library
JNuma LibraryJNuma Library
JNuma Library
 
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
 

Kürzlich hochgeladen

スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムsugiuralab
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略Ryo Sasaki
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...Toru Tamaki
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)Hiroki Ichikura
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNetToru Tamaki
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A surveyToru Tamaki
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものですiPride Co., Ltd.
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Danieldanielhu54
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdftaisei2219
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Yuma Ohgami
 

Kürzlich hochgeladen (10)

スマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システムスマートフォンを用いた新生児あやし動作の教示システム
スマートフォンを用いた新生児あやし動作の教示システム
 
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
[DevOpsDays Tokyo 2024] 〜デジタルとアナログのはざまに〜 スマートビルディング爆速開発を支える 自動化テスト戦略
 
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
論文紹介:Content-Aware Token Sharing for Efficient Semantic Segmentation With Vis...
 
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
【早稲田AI研究会 講義資料】3DスキャンとTextTo3Dのツールを知ろう!(Vol.1)
 
論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet論文紹介:Automated Classification of Model Errors on ImageNet
論文紹介:Automated Classification of Model Errors on ImageNet
 
論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey論文紹介:Semantic segmentation using Vision Transformers: A survey
論文紹介:Semantic segmentation using Vision Transformers: A survey
 
SOPを理解する 2024/04/19 の勉強会で発表されたものです
SOPを理解する       2024/04/19 の勉強会で発表されたものですSOPを理解する       2024/04/19 の勉強会で発表されたものです
SOPを理解する 2024/04/19 の勉強会で発表されたものです
 
Postman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By DanielPostman LT Fukuoka_Quick Prototype_By Daniel
Postman LT Fukuoka_Quick Prototype_By Daniel
 
TSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdfTSAL operation mechanism and circuit diagram.pdf
TSAL operation mechanism and circuit diagram.pdf
 
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
Open Source UN-Conference 2024 Kawagoe - 独自OS「DaisyOS GB」の紹介
 

Presto As A Service - Treasure DataでのPresto運用事例

  • 1. Presto As A Service トレジャーデータでの運用事例 Taro L. Saito, Treasure Data leo@treasure-data.com April 24th, 2015 Presto 勉強会 @ IPROS
  • 2. 自己紹介 Taro L. Saito @taroleo •  2002 東京大学 理学部 情報科学科卒 •  2007 Ph.D. –  XMLデータベース、トランザクション処理の研究 •  ~ 2014 東京大学 情報生命科学専攻 助教 –  ゲノムサイエンス研究 •  大規模データ処理、並列・分散コンピューティング •  2014.3月~ Treasure Data –  ソフトウェアエンジニア MPP Team Leader (Presto) 2
  • 3. Prestoとは? •  Facebook社が開発している分散SQLエンジン –  ペタスケールのデータに対しインタラクティブ(対話的)な検索が必要に •  それまではHive中心 –  2013年11月にオープンソース化 •  Prestoの特徴 –  CPU使用効率・スピード重視(アドホック検索) –  インメモリ処理 –  教科書的なRDBMSの実装 –  ANSI SQLベース 3
  • 5. エラーからの回復 •  Prestoそのものには障害耐性はない •  エラーの種類 –  文法、関数名などの誤り –  存在しないテーブル、カラム名の利用 –  Insufficient resource •  タスク辺りの上限メモリ量を超える –  Internal failure (内部エラー) •  I/O error –  S3の遅延 •  ノードの障害 •  など 5 Treasure DataのPrestoではクエリの 再実行により耐障害性を持つ
  • 7. Treasure Dataとは? •  米シリコンバレー発日本人創業のビッグデータ関連企業 –  2011年12月、米Mountain Viewにて創業 –  2012年11月、東京丸の内に日本支社設立 •  クラウド型データマネージメントサービス「Treasure Data Service」を提供 7 芳川裕誠 – CEO Open source business veteran 太田一樹 – CTO Founder of world’s largest Hadoop Group 主要投資家 Bill Tai Charles River Ventures, Twitterなどに投資 まつもとゆきひろ Ruby言語開発者 Sierra Ventures – (Tim Guleri) 企業向けソフト・データベース領域での有力VC 創業者 Jerry Yang Yahoo! Inc. 創業者 古橋貞之 – Software Engineer MessagePack, Fluentd開発者
  • 8. Treasure Data Service ビッグデータのための「クラウド + マネジメント」一体型サービス データ収集∼保存∼分析までワンストップでサポート 8 •  毎日数百億規模のレコードが取り込まれている –  2014年5月に5兆(trillion)レコードに到達 •  SQLベース(Hive, Presto, Pigなど)による検索サービスを提供
  • 9. Importing more than 500,000 records / sec. 0 1000 2000 3000 4000 5000 6000 7000 DataGrowthinBillions Data (records) Imported Service Launched 3 Trillion 4 Trillion 1 Trillion 5 Trillion 2 Trillion Series A Funding 100 Customers Gartner Cool Vendor Report 9
  • 10. Treasure Data: Presto Queries 10 •  More than 10k queries / day
  • 11. TD Presto •  Presto 0.100 •  AWS・IDCF クラウドで運用 •  td-presto connector –  PlazmaDB にアクセスするコネクター –  S3 (AWS) / RiakCS (IDCF) からデータを取得 –  列志向ストレージ •  MessagePack フォーマット + 圧縮  (MPC file) 11
  • 12. Hive TD API / Web ConsoleInteractive query batch query Presto Treasure Data PlazmaDB td-presto connector
  • 14. 14
  • 15. buffer Optimizing Scan Performance •  Fully utilize the network bandwidth from S3 •  TD Presto becomes CPU bottleneck 15 TableScanOperator •  s3 file list •  table schema header request S3 / RiakCS •  release(Buffer) Buffer size limit Reuse allocated buffers Request Queue 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 MessageUnpacker 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 S3 read S3 read S3 read
  • 17. Query Planner SELECT name, count(*) AS c
 FROM impressions
 GROUP BY name SQL impressions ( name varchar time bigint ) Table schema Table scan (name:varchar) GROUP BY (name, count(*)) Output (name, c) + Sink Final aggregation Exchange Sink Partial aggregation Table scan Output Exchange Logical query plan Distributed query plan
  • 18. Sink Partial aggregation Table scan Sink Partial aggregation Table scan Execution Planner •  StageをTaskに分割して並列度を上げる + Node list ✓ 2 workers Sink Final aggregation Exchange Output Exchange Sink Final aggregation Exchange Sink Final aggregation Exchange Sink Partial aggregation Table scan Output Exchange Worker 1 Worker 2
  • 19. Execution Planner - Split •  各TaskにはSplitが割り当てられ、並列に実行される Sink Final aggregation Exchange Sink Partial aggregation Table scan Sink Final aggregation Exchange Sink Partial aggregation Table scan Output Exchange Split many splits / task = many threads / worker (table scan) 1 split / task = 1 thread / worker Worker 1 Worker 2 1 split / worker = 1 thread / worker
  • 23. Challenges in Database as a Service •  トレードオフ •  Reference –  Workload Management for Big Data Analytics. A. Aboulnaga [SIGMOD2013 Tutorial] 23 個々のクエリを 単一クラスタで実行 全てのクエリを 必要最小限の クラスタで実行 速いが非常に高価 $$$ 性能は制限されるが、 手頃な価格で利用できる
  • 25. COUNT(DISTINCT x) •  何種類の値があるかをチェック •  種類が多い時(数百万種類∼)にメモリを多く消費 –  Task exceeded max memory ? GB エラーが生じやすい •  count(distinct x) を approx_distinct(x) に置き換える –  省メモリで近似的に値の種類をカウント •  標準誤差2.3% –  Probabilistic counting (Hyper-LogLog counting)という技術 •  その他: –  approx_percentile(column, percentage) –  例:approx_percentile(v, 0.5) = ほぼmedian 25
  • 26. WINDOW関数 •  https://prestodb.io/docs/current/functions/window.html •  利用例:累積和を計算したい場合 •  SELECT month, cnt, sum(cnt) over(order by month) from data; 26 month cnt total 2015-01 14 14 2015-02 20 34 2015-03 5 39
  • 27. WINDOW関数: PARTITION •  https://prestodb.io/docs/current/functions/window.html •  グループごとに累積和を計算したい場合 •  SELECT month, item, cnt, sum(cnt) over(partition by item order by month) from data 27 month item cnt total 2015-01 A 14 14 2015-02 A 20 34 2015-01 B 5 5 2015-02 B 18 23
  • 29. Presto + BIツール:Prestogres •  PostgreSQLを経由してPrestoにクエリを送信 –  ODBCドライバ経由でBIツールに接続 •  Tableau, Excel (Windows), ChartIOなど 2. select run_presto_as_temp_table( ‘presto_result’, ‘SELECT COUNT(1) FROM tbl1’ ); pgpool-II + patchclient 1. SELECT COUNT(1) FROM tbl1 4. SELECT * FROM presto_result; PostgreSQL 3. “run_persto_as_temp_table” function Prestoでクエリを実行 Presto Coordinator
  • 30. Monitoring Presto with ChartIO + Prestogres 30 TD + chartio.com
  • 31. Database As A Service 31
  • 32. Claremont Report on Database Research •  データベースの研究者、ユーザー、 識者が今後のDBMSについて議論 –  CACM, Vol. 52 No. 6, 2009 •  Cloud Data Serviceの発展を予測 –  SQLの重要な役割 •  機能を制限できる •  サービスとして提供するには好都合 –  難しい例:Spark  •  任意のコードを実行させるためのセ キュアなコンテナ開発が別途必要 32
  • 33. Beckman Report on Database Research •  2013年版 –  http://beckman.cs.wisc.edu/beckman-report2013.pdf –  ほぼ全面Big Dataについての話題 •  End-to-end –  データの収集から、knowledgeまで生み出す •  Cloud Serviceの普及 –  IaaS, PaaS, SaaS –  DBMSの全てをクラウドで、という理想にはまだ到達していない 33
  • 34. Results Push Results Push SQL Big Data Simplified: The Treasure Data Approach AppServers Multi-structured Events! •  register! •  login! •  start_event! •  purchase! •  etc! SQL-based Ad-hoc Queries SQL-based Dashboards DBs & Data Marts Other Apps Familiar & Table-oriented Infinite & Economical Cloud Data Store ü  App log data! ü  Mobile event data! ü  Sensor data! ü  Telemetry! Mobile SDKs Web SDK Multi-structured Events Multi-structured Events Treasure Agent Treasure Agent Treasure Agent Treasure Agent Treasure Agent Treasure Agent Treasure Agent Treasure Agent Embedded SDKs Server-side Agents 34
  • 35. TDのバックエンドストレージ •  Real-Time Storage –  直近のデータ (MessagePack format) •  Archive Storage –  過去のデータ, MapReduceでcolumnarに分解、圧縮 (MessagePack + gzipなど) –  もともとのサイズ(json形式)の10分の1程度になる 35 Real-time Storage Archive Storage 23c82b0ba3405d4c15aa85d2190e 6d7b1482412ab14f0332b8aee119 8a7bc848b2791b8fd603c719e54f 0e3d402b17638477c9a7977e7dab ... 2012-10-08 00:23:00 912ec80 2012-10-09 00:01:00 277a259 ... 1時間毎にmerge import SQL Query
  • 36. Object Storage + Index •  Storage –  Amazon S3を利用。S3互換のRiak CS (Basho)も利用できる –  HTTP経由のデータ通信 •  Object Index: PostgreSQLを使用 –  S3ファイルのリスト列挙操作は遅いため –  ユーザー毎、時系列毎の範囲で検索するためにGiST indexを利用 36 Real-time Storage Archive Storage 23c82b0ba3405d4c15aa85d2190e 6d7b1482412ab14f0332b8aee119 8a7bc848b2791b8fd603c719e54f 0e3d402b17638477c9a7977e7dab ... 2012-10-08 00:23:00 912ec80 2012-10-09 00:01:00 277a259 ... 1時間毎にmerge import SQL Query
  • 38. time ip : string code : int action : string 2014-09-21 10:14:33 135.52.211 .23 15 upload 2014-09-21 10:14:33 45.25.38.1 56 -1 temp 2014-09-21 10:14:34 97.12.76.5 5 99 null 2014-09-21 10:14:36 76.121.9.3 5 21 event ü  Familiar Tables Agent Collectors PlazmaDB 38
  • 39. time ip : string code : int action : string 2014-09-21 10:14:33 135.52.211 .23 15 upload 2014-09-21 10:14:33 45.25.38.1 56 -1 temp 2014-09-21 10:14:34 97.12.76.5 5 99 null 2014-09-21 10:14:36 76.121.9.3 5 21 event2014-09-21 11:27:41 97.12.76.5 5 99 null 2014-09-21 11:27:42 45.25.38.1 56 -1 temp 2014-09-21 11:27:42 135.52.211 .23 15 upload 2014-09-21 12:02:18 97.12.76.5 5 99 null 2014-09-21 12:02:18 45.25.38.1 56 -1 temp 2014-09-21 12:02:19 135.52.211 .23 15 upload ü  Familiar Tables ü  Time-based Partitioning Agent Collectors Query Partition Pruning PlazmaDB 39
  • 40. time ip : string code : int action : string status : string 2014-09-21 10:14:33 135.52.211 .23 15 upload null 2014-09-21 10:14:33 45.25.38.1 56 -1 temp null 2014-09-21 10:14:34 97.12.76.5 5 99 null null 2014-09-21 10:14:36 76.121.9.3 5 21 event null2014-09-21 11:27:41 97.12.76.5 5 99 null null 2014-09-21 11:27:42 45.25.38.1 56 -1 temp null 2014-09-21 11:27:42 135.52.211 .23 15 upload null 2014-09-21 12:02:18 97.12.76.5 5 99 null null 2014-09-21 12:02:18 45.25.38.1 56 -1 temp null 2014-09-21 12:02:19 135.52.211 .23 15 upload null 2014-09-21 12:03:24 76.34.123. 54 13 status ok 2014-09-21 12:03:25 92.67.7.11 3 13 status error 2014-09-21 12:04:51 135.52.211 .23 15 upload null ü  Familiar Tables ü  Time-based Partitioning ü  Schema-Flexible Agent Collectors PlazmaDB 40
  • 41. MessagePack 41 •  レコードはMessagePack形式 •  入力時のデータ型はそのまま保存 –  intやstring型のデータが列中に混在した状況でも使える PlazmaDBがスキーマに合わせて自動型変換を行う
  • 42. MessagePack Format Types •  0x00 ~ 0x7f int –  1 byte •  0xe0 ~ 0xff neg int –  1 byte •  Support fixed/variable length data 42
  • 43. Dynamic Data Type Conversion 43 {“user”:54, “name”:”test”, “value”:”120”, “host”:”local”} (Explicit) Schema user:int name:string value:int SELECT 54 (int) データ(JSON) “test” (string) 120 (int) host:int NULL
  • 45. Monitoring Presto Usage with Fluentd 45 Hive Presto
  • 46. DataDog •  Monitoring CPU, memory and network usage •  Query stats 46
  • 48. Memory Usage •  G1GC -XX:+UseG1GC 適宜プロセスメモリが解放される (Presto 0.99で改善された) •  -Xmx の値は低めに設定 –  システムメモリの8割程度 •  GCのタイミングでプロセスのメモリ使用量が跳ね上がることがある –  OutOfMemory Error 対策 48
  • 49. Query Collection in TD •  SQL query logs –  query, detailed query plan, elapsed time, processed rows, etc. •  Presto is used for analyzing the query history 49
  • 50. Clustering SQL •  Clustering some customer queries –  10000 queries, 2726 terms, 24 clusters. 50
  • 51. Deployment •  Building Presto takes more than 20 minute •  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 51
  • 52. 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 52
  • 53. Usage Shift: Simple to Complex queries 53
  • 54. Admission control is necessary •  Adjust resource utilization –  Running Drivers (Splits) –  MPL (Multi-Programming Level) 54
  • 55. Challenge: Auto Scaling •  Setting the cluster size based on the peak usage is expensive •  But predicting customer usage is difficult 55
  • 56. Problematic Queries •  90% of queries finishes within 2 min. –  But remaining 10% is still large •  10% of 10,000 queries is 1,000. •  Long-running queries •  Hog queries 56
  • 57. Long Running Queries •  Typical bottlenecks –  Cross joins –  IN (a, b, c, …) •  semi-join filtering process is slow –  Complex scan condition •  pushing down selection •  but delays column scan –  Tuple materialization •  coordinator generates json data –  Many aggregation columns •  group by 1, 2, 3, 4, 5, 6, … –  Full scan •  Scanning 100 billion rows… •  Adding more resources does not always make query faster •  Storing intermediate data to disks is necessary 57 Result are buffered (waiting fetch) slow process fast fast
  • 58. Hog Query •  Queries consuming a lot of CPU/memory resources –  Coined by S. Krompass et al. [EDBT2009] •  Example: –  select 1 as day, count(…) from … where time <= current_date - interval 1 day union all select 2 as day, count(…) from … where time <= current_date - interval 2 day union all –  … –  (up to 190 days) •  More than 1000 query stages. •  Presto tries to run all of the stages at once. –  High CPU usage at coordinator 58
  • 59. Presto Team at Facebook •  Currently 12 members •  Talked with core developers of Presto •  2015 Q2 Plan –  Per-query memory resource management –  Stage-wise resource allocation –  Raptor connector •  native storage •  + MySQL index •  (internal-use only) 59
  • 60. •  Huge Query Processing •  Idea –  Bushy plan -> Deep plan –  Introduce stage-wise resource assignment Huge Query Processing 60
  • 61. Task-based memory limit -> Query Base Memory Limit •  Task毎のメモリ割当はわかりにくい -> クエリ毎のメモリ割当に Sink Final aggregation Exchange Sink Partial aggregation Table scan Sink Final aggregation Exchange Sink Partial aggregation Table scan Output Exchange Split many splits / task = many threads / worker (table scan) 1 split / task = 1 thread / worker Worker 1 Worker 2 1 split / worker = 1 thread / worker
  • 62. Treasure Data: US Office 62
  • 63. MessagePack Hackathon at Silicon Valley •  SV –  @frsyuki –  @oza_x86 –  @hkmurakami –  @taroleo •  JP –  @komamitsu 63
  • 64. 64