observability
Grafana Resource Sizing Calculator
Calculate Grafana RAM, CPU, and storage requirements based on dashboard count, concurrent users, alert rules, and data source count.
Grafana Resource Planning for Kubernetes
Grafana has a very different resource profile from Prometheus or Loki — it's lightweight at idle but spikes aggressively when users are actively loading dashboards.
Memory Usage
RAM = base (128 MB) + concurrent_users × 50 MB + dashboards × 5 MB + alerts × 10 MB/100Most of Grafana's memory is query result caching and active WebSocket connections.
CPU Spikes
CPU usage is query-driven. Each panel fires one or more data source queries. At peak:
- ›20-panel dashboard × 10 concurrent users = 200 simultaneous queries
- ›Each query involves HTTP proxying + JSON parsing + data transformation
Set CPU limit to 4–8× the request to handle spikes without throttling.
Storage Backend Options
| Backend | Use case |
|---|---|
| SQLite (default) | Single replica, development |
| PostgreSQL | HA Grafana, multiple replicas |
| MySQL | Legacy setups |
Dashboard as Code
Store dashboards in Git using Grafonnet (Jsonnet) or the Grafana dashboard JSON model, synced via grafana-operator or the Helm sidecar. This eliminates PVC dependency for dashboard state.
grafana.ini:
database:
type: postgres
host: postgres:5432
name: grafanaKey Terms
Full glossary →Prometheus
An open-source metrics and alerting system. Prometheus scrapes metrics from Kubernetes components and applications, stores them in a time-series database (TSDB), and evaluates alert rules.
Loki
A horizontally scalable log aggregation system by Grafana Labs. Unlike Elasticsearch, Loki only indexes metadata labels, storing log content as compressed chunks in object storage.
Frequently Asked Questions
What are good Kubernetes resource limits for Grafana?
For a small team (5–10 users, 30 dashboards): requests: 100m CPU / 256Mi RAM, limits: 500m CPU / 512Mi RAM. For large orgs: requests: 250m / 512Mi, limits: 2000m / 2Gi. Always set CPU limits higher than requests — Grafana CPU spikes on dashboard loads.
Does Grafana need a persistent volume?
Yes, unless you use an external database. By default Grafana uses SQLite stored in /var/lib/grafana. For HA Grafana (multiple replicas), you must use PostgreSQL or MySQL as the backend — SQLite cannot be shared.
How do I run multiple Grafana replicas?
Switch to PostgreSQL as the database backend, enable sticky sessions on your ingress, and set GF_SERVER_ROUTER_LOGGING=true. In Helm: set replicas: 2+ and configure the database section in values.yaml.
Why does Grafana spike CPU when dashboards load?
Each panel in a dashboard fires a separate query to the data source. A dashboard with 20 panels × 5 concurrent users = 100 simultaneous queries, each of which Grafana must proxy, parse, and transform. CPU requests should have at least 4× headroom over idle.
Related Tools
Observability Sizing
Size your Prometheus, Grafana, Loki, and Alertmanager stack. Calculate RAM, disk, and CPU requirements based on your cluster size and retention period.
Prometheus Storage
Calculate Prometheus disk and RAM requirements based on active time series count, scrape interval, and retention period. Includes TSDB head, WAL, and chunk cache sizing.
Loki Storage
Calculate Grafana Loki disk, S3 storage, and RAM requirements based on pod count, log rate, compression ratio, and retention period.