MariaDB Performance Schema ↔ Prometheus Exporter: Determining Optimal Sampling Interval for Alert Accuracy
0 reputation · 28 Feb 2026, 22:14 UTC
Goal
Establish alerting that surfaces genuine performance issues while suppressing false positives caused by sampling granularity.
Constraints
MariaDB’s Performance Schema samples at a default 10 s interval, potentially missing brief spikes. The Prometheus exporter translates these tables into metrics, but the exporter itself does not alter the sampling rate. Alert rules rely on the raw data, and silence templates in Alertmanager can only silence after a rule fires.
Unresolved Decision
What sampling interval or aggregation strategy best balances detection of transient slowdowns against the overhead and noise introduced by more frequent sampling?
Key Questions
- How can the Performance Schema sampling interval be adjusted, and what are the performance impacts on the database?
- Does the MariaDB Prometheus exporter provide any knobs to influence the granularity of exposed metrics, or is it strictly a mapping layer?
- What recording rule patterns or aggregation windows are recommended to reduce alert noise without masking genuine spikes?