テーマ: profiling
-
本番環境での継続的プロファイリング: 常時稼働のサンプリングプロファイルが何に答えるか
継続的プロファイリングはCPUやメモリのプロファイルを時系列で体系的に取得し、ラベル付きの系列として保存する。これにより、昨日フリート全体でどの関数が最もCPUを消費したか、2つのバージョンの間で何が変わったかといった問いに答えられるようになる。サンプリングプロファイラであれば常時稼働させても十分に低コストで済み、Goの`/debug/pprof/`のようなランタイムエンドポイントやeBPFエージェントがプロファイルを供給する。
-
Reading a flame graph: width is samples, the x-axis is not time
A flame graph stacks sampled call stacks so that frame width is the share of samples and height is stack depth; the x-axis is sorted alphabetically, not by time. Read wide plateaus at the top as on-CPU hot spots, wide frames with many thin children as callers to call less often, and remember that a CPU flame graph cannot show waiting.
機械可読: JSON