You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each cache the runtime maintains exports its own metric family. The SQL results cache uses the `results_` prefix; the search results and embeddings caches use `search_results_` and `embeddings_` and expose the same metric names.
| `results_cache_evictions` | Counter | `reason` | Entries removed from the cache, by cause. |
89
+
| `results_cache_stale_rejections` | Counter | | Lookups that found an entry but did not serve it, because a table it read was invalidated first. Also counted as misses. |
90
+
| `results_cache_stale_swr_count` | Counter | | Stale-while-revalidate refreshes skipped because a revalidation was already in flight. |
91
+
| `results_cache_swr_background_query_count` | Counter | | Background queries started for stale-while-revalidate refreshes. |
92
+
93
+
The `reason` label on `*_cache_evictions` separates three causes that call for different responses:
| `size` | The cache exceeded `max_size` and reclaimed an entry. | Raise `max_size` if the hit ratio is also falling. |
98
+
| `expired` | The entry outlived `item_ttl`. | Expected. Raise `item_ttl` only if the data tolerates a longer staleness window. |
99
+
| `invalidated` | A refresh or a DML write dropped the entries referencing a table. | Expected on an accelerated dataset with a periodic refresh. |
100
+
101
+
On an accelerated dataset with a periodic refresh, `invalidated` is normally the dominant cause and would swamp an unlabelled total. Alert on `size` instead, which is the reason that indicates real cache pressure:
Cache counters are published at zero when the runtime starts, so each series exists before it first increments. A series that is absent altogether therefore indicates a scrape or configuration problem rather than an idle cache.
109
+
{% endhint %}
110
+
111
+
### Cayenne segment cache
112
+
113
+
[Cayenne](https://spiceai.org/docs/components/data-accelerators/cayenne) accelerations read through a segment cache, sized per dataset by the `cayenne_segment_cache_mb` acceleration parameter (default `256`). Every series carries a `dataset` label.
The accesses and hits series are cumulative counters, so read them with `rate()` or `increase()` rather than as instantaneous values. A hit ratio that falls while `cayenne_segment_cache_weighted_bytes` sits at `cayenne_segment_cache_capacity_bytes` means the working set no longer fits; raise `cayenne_segment_cache_mb` for that dataset.
124
+
75
125
## Grafana dashboard
76
126
77
127
Spice.ai publishes a maintained Grafana dashboard with the panels operations teams need most often (query rate / latency / errors, acceleration freshness and row counts, executor registration, certificate expiry).
0 commit comments