deploy/grafana: a dashboard for /metrics, on Prometheus or VictoriaMetrics

Throughput, prompt tokens by source, speculative decoding by draft
position, scheduler steps, latency, prefix cache and HTTP, from both
metric families. Plain PromQL, so the same JSON runs on Prometheus and on
VictoriaMetrics. Window ratios are counter ratios with the definitions of
the since-start gauges; conditional acceptance at position j in a window
is reached(j+1) / reached(j).

GUIDE: draft_position_acceptance_ratio is cumulative since start
(draft.h), and the dashboard is named under §6.3.
This commit is contained in:
keptn42 authored and StillDeadcode committed 2026-10-05 19:30:59 +02:00
1 parent ee65352d7d
commit 41c0d25233
3 files changed
+2624 -1

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
# Grafana dashboard
![The overview row, one hour of a four-rank server](overview.png)
`radiance.json` is a Grafana dashboard for `/metrics`: throughput, prompt tokens by source, speculative
decoding by draft position, scheduler steps, latency, the prefix cache and HTTP. The whole dashboard:
[dashboard.png](dashboard.png).
Import it (Dashboards → New → Import) and pick a Prometheus data source. Every query is plain PromQL,
so VictoriaMetrics added as a Prometheus data source works the same. Checked with Grafana 13.2 against
Prometheus 3.15 and VictoriaMetrics 1.153 scraping one server.
```yaml
scrape_configs:
- job_name: radiance
static_configs:
- targets: ["gpu-host:8000"]
```
Window values are counter ratios with the definitions of the since-start gauges:
| panel | over the window | since start |
|---|---|---|
| prompt from attention cache | `attn_cached_tokens` / `prompt_tokens` | `vllm:gpu_prefix_cache_hit_rate` |
| prompt from linear checkpoint | `linear_cached_tokens` / (`linear_cached_tokens` + `prefill_tokens`) | `radiance:linear_prefix_cache_hit_rate` |
| draft acceptance | `draft_accepted` / `draft_tokens` | `radiance:draft_acceptance_ratio` |
| conditional acceptance at j | `draft_position_reached`(j+1) / `draft_position_reached`(j) | `radiance:draft_position_acceptance_ratio` |
Position j+1 is evaluated only when j was accepted, so its reach counts j's acceptances. The last
position's acceptances are the total accepted minus every later reach. Draft blocks per decode step is
the reach of position 0 over `engine_steps_decode_total` (GUIDE §6.3).
Prometheus extrapolates `rate()` inside the window and VictoriaMetrics does not, so short windows at
the edge of a burst differ between the two. The overview's ratios are taken over the dashboard's time
range, where both agree.
File diff suppressed because it is too large. Load diff
+3 -1
View File
@@ -1399,7 +1399,7 @@ under the request's own spelling of each. `server.default_max_tokens` is `null`
| `decode_tokens_total`, `prefill_tokens_total` | |
| `decode_tokens_per_second`, `prefill_tokens_per_second` | |
| `draft_tokens_total`, `draft_accepted_total`, `draft_acceptance_ratio` | |
| `draft_position_reached_total`, `draft_position_acceptance_ratio` | acceptance by position in the window |
| `draft_position_reached_total`, `draft_position_acceptance_ratio` | acceptance by position, since start |
| `decode_rows_unspeculated_total` | rows that never drafted at all |
| `attn_cached_tokens_total`, `linear_cached_tokens_total` | prefix reuse, both halves |
| `linear_checkpoints_written_total`, `linear_prefix_cache_hit_rate` | |
@@ -1416,6 +1416,8 @@ Two traps worth naming:
- **Step time is not wall-clock over steps.** Use `engine_step_seconds_decode_total /
engine_steps_decode_total`, which charges only decode. Wall-clock charges idle and prefill to it.
`deploy/grafana/radiance.json` charts both families over time, on Prometheus or VictoriaMetrics.
### 6.4 The live terminal view
```sh