RTX 3050 - Order Now
Home / Blog / Tutorials / Cost Monitoring for Self-Hosted AI
Tutorials

Cost Monitoring for Self-Hosted AI

Track £/M tokens, cache hit rate, fallback rate, and other cost-relevant metrics for self-hosted AI. The dashboard you actually need.

Table of Contents

  1. Metrics
  2. Dashboard
  3. Alerts
  4. Verdict

Self-hosted AI cost is harder to track than per-token API billing because it's a fixed monthly + variable utilisation. Without explicit monitoring, cost-per-token drifts invisibly. With the right metrics dashboard, cost stays under control.

TL;DR

Track six metrics: tokens served per month, £/M tokens (computed), GPU utilisation, cache hit rate (prefix + semantic), hosted-API fallback rate + cost, per-tenant attribution. Dashboard in Grafana with the same Prometheus / log-aggregation stack you already have for ops monitoring.

Metrics

  • Tokens served / month: from structured logs aggregated to Postgres / ClickHouse
  • £/M tokens computed: (server cost + ops cost + fallback cost) / tokens served
  • GPU utilisation: from DCGM Exporter; sustained > 70% is healthy, < 30% suggests over-provisioning
  • Prefix cache hit rate: from vLLM /metrics
  • Semantic cache hit rate: from your application-layer cache
  • Hosted-API fallback rate: % of queries routed to Claude / GPT-4o; cost per fallback query
  • Per-tenant tokens: from logs; basis for attribution / billing

Dashboard

Single Grafana dashboard with panels:

  • Tokens served (last 24h, 7d, 30d trend)
  • £/M tokens (last 30d trend)
  • GPU utilisation heatmap
  • Cache hit rate (prefix + semantic, separate panels)
  • Fallback rate + estimated fallback cost
  • Per-tenant token consumption (top 10)
  • Cost-per-tenant trend

Alerts

  • £/M tokens drifted up > 20% over 7 days — investigate efficiency regression
  • GPU utilisation sustained < 30% — over-provisioned, consider downgrade
  • Cache hit rate dropped > 10% — investigate prompt or query distribution change
  • Fallback rate > 15% — investigate self-hosted quality regression

Verdict

Self-hosted AI cost monitoring is the difference between "saved 80% on API" (year 1) and "saving has eroded to 40%" (year 2 from invisible drift). Build the dashboard early; alert on drift; review monthly with finance.

Bottom line

Track £/M tokens and drift. See ROI measurement.

Need a Dedicated GPU Server?

Deploy from RTX 3050 to RTX 5090. Full root access, NVMe storage, 1Gbps — UK datacenter.

Browse GPU Servers

gigagpu

We benchmark, deploy, and optimise GPU infrastructure for AI workloads. All data in our guides comes from real-world testing on our UK-based dedicated GPU servers.

Ready to deploy your AI workload?

Dedicated GPU servers from our UK datacenter. NVMe storage, 1Gbps networking, full root access.

Browse GPU Servers Contact Sales

Have a question? Need help?