Finding Bottlenecks in ClickHouse: Profiling, Heatmaps & Flamegraphs
summary
Practical checklist for finding ClickHouse bottlenecks: enable telemetry and trace logs and use internal system tables plus the embedded Prometheus exporter to visualize CPU/IO/memory patterns; for ~10 TB compressed per server aim for 64–128 GB RAM, ≥32 cores and 10 Gbps; build heatmaps from system.query_log to spot queries that read ~1 GB or spikes up to ~100 GB and show most queries use ~16 MB while some hit ~1 GB; generate flamegraphs from system.trace_log (sampling ~50 Hz) and use explain modes and timeline to find bad partitions, small inserts (use ~1e6 row batches), and memory/thread tuning.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 2:33Workload patterns and hardware
- 7:14Telemetry and monitoring
- 19:15Query bottlenecks with heatmaps
- 26:28Profiling with flame graphs
- 31:13Memory limits and execution
- 34:53EXPLAIN query analysis
- 37:05Q&A
related talks
57mQuery Performance Analysis in ClickHouse
42mTips & Tricks to Keep Your Queries under 100ms with ClickHouse®
59mEffective Use of ClickHouse
42mOptimizing ClickHouse query performance
28mExperiments in Backing Prometheus with Clickhouse
42mClickHouse: what is behind the fastest columnar database
51mWhat You Need to Know About ClickHouse Architecture
53mClickHouse Is Slowing Down
