Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Dapper
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
a2-ito
May 17, 2022
Technology
0
68
Dapper
a2-ito
May 17, 2022
Tweet
Share
More Decks by a2-ito
See All by a2-ito
Devin の Org-level Skills
a2ito
0
560
AIエンジニア Devin と歩む、自律型運用プロセスの構築
a2ito
0
960
ECSにおけるBGデプロイの実現
a2ito
0
99
Organizations と Identity Center を Terraform で管理しよう
a2ito
0
120
App Runner 実践
a2ito
0
540
Bigtable
a2ito
0
83
Chord
a2ito
0
74
Chubby
a2ito
0
100
Dynamo
a2ito
0
110
Other Decks in Technology
See All in Technology
GitHub Advanced Security × Defender for Cloudで開発とSecOpsのサイロを超える: コードとクラウドをつなぐ、開発プラットフォームのセキュリティ
yuriemori
1
120
Kubernetesの「隠れメモリ消費」によるNode共倒れと、Request適正化という処方箋
g0xu
0
160
20260323_データ分析基盤でGeminiを使う話
1210yuichi0
0
210
Amazon Qはアマコネで頑張っています〜 Amazon Q in Connectについて〜
yama3133
1
160
OPENLOGI Company Profile for engineer
hr01
1
61k
How to install a gem
indirect
0
2k
開発チームとQAエンジニアの新しい協業モデル -年末調整開発チームで実践する【QAリード施策】-
kaomi_wombat
0
270
会社紹介資料 / Sansan Company Profile
sansan33
PRO
16
410k
トイルを超えたCREは何屋になるのか
bengo4com
0
100
パワポ作るマンをMCP Apps化してみた
iwamot
PRO
0
250
Bref でサービスを運用している話
sgash708
0
210
互換性のある(らしい)DBへの移行など考えるにあたってたいへんざっくり
sejima
PRO
0
390
Featured
See All Featured
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
420
We Have a Design System, Now What?
morganepeng
55
8k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
690
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.5k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
210
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Typedesign – Prime Four
hannesfritz
42
3k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.1k
Designing Powerful Visuals for Engaging Learning
tmiket
1
320
Transcript
Dapper 2021.6.11 @a2ito
Publication Dapper, a Large-Scale Distributed Sytems Tracing Infrastructure Benjamin H.
Sigelman, Luiz Andr´e Barroso, Mike Burrows, Pat Stephenson, Manoj Plakal, Donald Beaver, Saul Jaspan, Chandan Shanbhag Google Technical Report dapper-2010-1, April 2010
Dapper • Google社内の分散トレーシングツール • Dapper論文をベースにして作られたOSSたち ◦ zipkin - by Twitter
◦ jaeger - by Uber
Summary of contributions • 分散システムのトレーシングに関する基本的な考え方は既存の論文と同様 ◦ Pinpoint, Magpie, X-Trace •
プロダクション環境で何年も運用してきて何を経験し、どのようにプロダクトをイ ンクリメントしてきたか • アプリケーション透過性 ◦ ソフトウェアスタックの十分に低いレベルに限定される
Dapperの分散トレーシング • 分散されたシステムのトレーシングでは、各サーバで 実行されたすべての実行情報を記録する必要がある • トレースはすべての呼び出しと返却タイミングを記録 するもの • Dapper trace
は RPCをネストした tree 構造で構成さ れる
Trace trees and spans • Dapper trace tree は、ノードは基本的なユニッ トである
span である • span id と parent id • 全 span はtrace id に紐づく • 全IDはユニークな 64bit integer
Span詳細 • 2つ目の Helper.Call の各イベント • fooというannotationを挿入 • clock skew
に注意 ◦ クライアントはサーバーがリクエストを受信 する前に常にリクエストを送信し、サー バーの応答についてはその逆である
実装のポイント • a trace context ◦ span属性コンテナ • C++/Java の
RPC framework
Annotations • 開発者はトレースにアノテーションを挿 入できる ◦ 任意のコンテンツ • key-value 形式もサポート
Trace collection • 各spanは一度ローカルに保存され、その後中 央(googleだから、Bigtable)に送られる • 中央値は15秒未満。98パーセンタイルは2分未 満。(数時間掛かるものもある) • GoogleのエンジニアはリポジトリにAPI経由でも
アクセス可能 ◦ DAPI
Out-of-band trace collection • out-of-band にロギングとトレーシングされる • in-band collection では実現できない(RPCレスポンスヘッダを用いた実装)
◦ アプリケーションのネットワークダイナミクスに影響が大きい ◦ RPCがフルにネストしている前提になる
Dapper Runtime Library • Dapper RPC ◦ スパンの作成、サンプリング、ローカルディスクへのロギングなど • アプリに含まれるので、修正が困難
• C++ 1000行未満 • Java 800行未満 • key-value annotations 用には 500行のコードを加えている
トレース収集のオーバーヘッド • Dapperデーモンプロセスのトレース収集のCPU使用率は極めて少ない ◦ (1コアの)0.3%以上使われることはない ◦ kernel のスケジューラにおいて priority を可能な限り小さくしている
• ネットワークリソースも非常にライト ◦ 各スパンは平均426バイト ◦ Google のプロダクション環境において 0.01% 未満になるように抑えている
プロダクションワークロードへの影響 • サンプリングレートを変えながら本番ワークロード (Web search cluster)への影響を観察 ◦ スループット影響は大きくないが、レイテンシへの影響が大きい • 経験的には、high-volume
なサービスは 1/1024 あれば十分
Dapper Depot API, DAPI • トレースデータは regional Dapper repositories (Depots)
に格納される • Depot API, DAPI を使ってアクセスする ◦ Access by trace id ◦ Bulk access ▪ MapReduce向け ◦ Indexed access ▪ よく使われるアクセスパターンに基づく • 最もチャレンジング ▪ 元々はホストマシンorサービス名だったが、最終的にはホストマシン、サービス名、タイム スタンプの複合インデックスとした
DAPI usage within Google • DAPI使用分類 ◦ Webアプリ ▪ 3個
◦ コマンドラインツール ▪ 8個 ◦ on-off ツール ▪ 15-20個 ◦ それら以外はよくわからない
Dapper user interface
Dapper user interface サービスとタイムウィ ンドウを指定 +コストメトリック
Dapper user interface 実行パターン毎のパ フォーマンスサマリ ソートも可
Dapper user interface 特定の実行パターン の可視化(2で選択し たもの)
Dapper user interface パターンEの分布
Dapper user interface パターンEにおける各 サービスの振る舞い
Experiences Layered and Shared Storage Systems • Google における多くのストレージシステムは、複数のレイヤで構成されており、 多くのユーザでシェアされている
• Bigtable は Chubby と GFS を両方使用している ◦ Bigtable cell からのGFSトラフィックは、単一ユーザ or複数のユーザで使用されている可能性が あるが、GFSレベルでは、これら2つの異なる使用パターンの違いはわからない • Dapper UIは、実行パターンをグループ化できるため、ユーザをランク付けでき る
Other Lessons Learned • Google 社内利用での学び ◦ Coalescing effects ▪
トレースの処理単位を集約 ◦ Tracing batch workloads ▪ MapReduce のようなバッチワークロードにも有効 ▪ バッチ用には意味のある単位に紐付ける シャード IDなど ◦ Finding a root cause ▪ annotation を利用して、キューなどの具体的な情報を追加 ◦ Logging kernel-level information ▪ カーネルパラメータのスナップショットをスパンに紐付ける ▪ 調査中とのこと
まとめ • Googleの本番分散システムトレースプラットフォーム Dapper • ほとんどすべてのGoogleのシステムに導入されており、アプリケーションレベル の変更を必要とせず、パフォーマンスに目立った影響を与えることなく、最大の ワークロードの大部分を追跡可能 • Dapper
trace repositories を開発者に公開したことは大きなポイントだった