Speeding Up Grafana with SQLite WAL Mode

Grafana was feeling sluggish. Enabled SQLite WAL mode and noticed immediate improvement.

The Change

In Grafana config, enable WAL (Write-Ahead Logging) for SQLite:

[database]
wal = true

Restart Grafana.

What is WAL?

Write-Ahead Logging is an SQLite optimization:

Result: Better concurrency, especially for read-heavy workloads.

Why It Helps Grafana

Grafana does lots of concurrent reads:

Without WAL, writes (like saving dashboards) block all these reads.

With WAL, reads continue uninterrupted.

The Trade-off

WAL adds a second file (database.db-wal) alongside your database. Slightly more disk I/O.

But for most Grafana setups, the performance gain is worth it.

When to Use

Use WAL if:

Skip it if:

For production Grafana with SQLite backend, WAL should be default.