~/talk

80% faster, 70% less memory: Go tricks we used to build a high-performance Prometheus query engine

Talkat GopherCon Singapore 2025 · 2025-01-22..01-24· [go, web-performance]
links:none on file
links:none on file
slides:none on file

Built a Prometheus‑compatible query engine for Grafana Mimir that benchmarks up to 80% faster and uses 70% lower peak memory, and that reduces real‑world memory spikes by streaming data series one at a time. Implementation specifics: streaming per-series execution so operators hold at most a couple of series, bucketed slice pooling to avoid allocations and GC, deferred []byte→string conversion to cut allocations (~5%) and latency (~2%), and per-query memory tracking to apply smarter limits — deployed and working in production.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 3:33Problems with Prometheus engine
  3. 5:59Introducing MQE and streaming
  4. 7:42Memory pooling in MQE
  5. 13:22Bucket pooling for efficiency
  6. 17:57Tracking memory usage
  7. 18:18Optimizing label handling
  8. 20:43Small optimizations matter
  9. 21:03Future plans and Q&A
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.