Prometheus Cardinality Cost Calculator
Estimate Prometheus cardinality cost from active series, scrape interval, retention, pricing, and label offenders with reduction savings.| Cost item | Estimate | Monthly cost | Detail | Copy |
|---|---|---|---|---|
| {{ row.item }} | {{ row.estimate }} | {{ row.cost }} | {{ row.detail }} |
| Metric | Series | Highest label | Share | Avoidable cost | Copy |
|---|---|---|---|---|---|
| {{ row.metric }} | {{ row.seriesDisplay }} | {{ row.highLabelDisplay }} | {{ row.shareDisplay }} | {{ row.savingsDisplay }} | |
| No valid offender rows are currently parsed. | |||||
| Finding | Signal | Recommendation | Impact | Copy |
|---|---|---|---|---|
| {{ row.finding }} | {{ row.signal }} | {{ row.recommendation }} | {{ row.impact }} |
{{ promqlArtifact }}
{{ jsonPayload }}
Introduction:
Prometheus cardinality is the count of active time series created by metric names and their label combinations. A single counter can be cheap when it has a few stable labels, then become expensive when it carries labels such as route, tenant, pod, worker, user, or span name with many possible values. Each unique combination has to be stored, indexed, scraped or ingested, retained, queried, and sometimes billed as a separate series.
Cost planning for Prometheus therefore needs more than a raw storage estimate. Active series drive head memory and many managed-metrics bills, scrape interval controls sample volume, retention controls stored bytes, and high-cardinality labels can multiply all of those costs before the team notices. A useful review separates total monthly cost from the labels and metrics that are most likely to create waste.
This workflow treats cardinality as an engineering budget. It connects the current active-series count, scrape and retention assumptions, resource or vendor pricing, and suspected label offenders so platform teams can estimate monthly spend, rank risky metrics, and size the savings from relabeling, aggregation, or instrumentation changes.
How to Use:
- Choose the workload preset closest to the Prometheus tenant, shard, remote-write stream, or managed metrics account you are reviewing.
- Enter the current active series from a TSDB metric, vendor billing export, or platform dashboard for the same scope.
- Set the scrape interval, retention period, bytes per sample, replication factor, and head-memory estimate that match your environment.
- Select a pricing profile, then replace the default rates with your managed active-series price, self-hosted storage and RAM rates, fixed cost, or internal chargeback values.
- Paste high-cardinality metric rows in the documented format so each metric can be ranked by likely series fan-out and remediation value.
- Use the budget cap, reduction target, growth rate, and forecast horizon to compare current cost, savings potential, and future budget risk.
Interpreting Results:
- Cost Ledger separates active-series charges, retained storage, head-memory cost, fixed monthly cost, budget variance, marginal cost per series, and forecasted growth.
- Label Offenders ranks metric rows by estimated series count and highlights labels that create the largest removable fan-out.
- Reduction Plan translates the reduction target into series avoided and estimated monthly savings so cleanup work can be prioritized.
- Offender Series Rank shows which metric families dominate the cardinality review.
- Cardinality Cost Curve shows how monthly cost changes as active series grows or shrinks around the current baseline.
- PromQL Checks provides query patterns for measuring current series, high-cardinality labels, and offender candidates in Prometheus-style systems.
- JSON captures the normalized inputs and calculated outputs for tickets, reviews, and recurring platform reports.
Technical Details:
The estimate starts with active time series, converts them into sample volume with the scrape interval, applies retention and replication to storage, estimates head memory from a per-series memory assumption, and then applies the selected pricing model. Managed billing usually emphasizes active series. Self-hosted planning often emphasizes storage, memory, and fixed cluster cost. A blended model can include both.
Formula Core:
For each offender row, estimated series equals the base series multiplied by the listed label value counts. The largest removable label is the one whose removal would collapse the most duplicate series while preserving the remaining label dimensions.
Accuracy Notes:
- Use measured active-series and billing data whenever possible. A sampled dashboard count can differ from monthly billing windows or remote-write accounting.
- Bytes per sample varies with label size, chunk compression, scrape interval, compaction, exemplars, histograms, and remote-storage implementation.
- Head-memory estimates are planning assumptions, not a substitute for measuring Prometheus process memory and shard pressure.
- High-cardinality label cleanup should preserve diagnostic value. Do not remove labels required for alerts, SLOs, routing, or incident response without owner review.
- Native histograms, classic histogram buckets, exemplars, and multi-tenant remote write can materially change the series and cost model.
Worked Examples:
| Scenario | Input Focus | Planning Readout |
|---|---|---|
| Kubernetes API service | 850,000 active series, 30-second scrape interval, managed active-series billing. | Checks whether the account stays under budget and which request or pod labels create the biggest cleanup opportunity. |
| Multi-tenant SaaS | Tenant, route, status, and method labels on hot request metrics. | Ranks tenant and route fan-out before deciding whether to bucket tenants, normalize routes, or export rollups separately. |
| Self-hosted shard | Retention days, bytes per sample, RAM per series, storage rate, and fixed cluster cost. | Shows whether cost pressure is mainly disk, memory, or fixed overhead rather than vendor active-series pricing. |
FAQ:
What is a high-cardinality label?
It is a label with many possible values, such as user ID, session ID, tenant, pod, route, or span name. The risk depends on how that label combines with the rest of the metric labels.
Why does scrape interval matter if billing is based on active series?
Active-series pricing may not change, but scrape interval still changes ingestion rate, storage footprint, query volume, and self-hosted resource pressure.
Should every expensive label be removed?
No. Some labels are worth their cost because they support alerts, routing, ownership, or debugging. Use the ranking to focus review, then decide with the service owner.
Glossary:
- Active series
- A currently active metric name and full label set combination.
- Cardinality
- The number of distinct series created by metric and label combinations.
- Head memory
- Memory used by recently active series and samples before they are fully compacted into long-term blocks.
- Retention
- The period for which samples are kept in the TSDB or remote storage layer.
- Offender row
- A metric-level estimate of base series, label value counts, owner, and intended cleanup action.