Skip to content

Conversation

@metalmatze
Copy link
Member

@metalmatze metalmatze commented Oct 24, 2025

Summary

Introduce subquery-based calculations for improved performance while maintaining ~99% accuracy. This adds a new PerformanceOverAccuracy option that, when enabled, uses Prometheus subqueries with 5-minute step intervals to reduce query complexity and improve performance.

Changes

  • Add PerformanceOverAccuracy field to ServiceLevelObjective spec
  • Implement subquery expression handling in PromQL replacer

Closes #1440

@metalmatze metalmatze force-pushed the improve-slo-performance-with-subqueries branch from 3cc0bee to b8985c5 Compare November 4, 2025 10:27
metalmatze added a commit to metalmatze/kube-prometheus that referenced this pull request Nov 4, 2025
Introduce subquery-based calculations for improved performance while maintaining ~99% accuracy. This adds a new PerformanceOverAccuracy option that, when enabled, uses Prometheus subqueries with 5-minute step intervals to reduce query complexity and improve performance.

Changes:
- Add PerformanceOverAccuracy field to ServiceLevelObjective spec
- Implement subquery expression handling in PromQL replacer
- Add LessAccurate field to track optimization state in SLO objects

This optimization sacrifices minimal accuracy for significant performance gains in resource-intensive SLO calculations.

Closes #1440
- Rename LessAccurate to PerformanceOverAccuracy for consistency with the public API
- Add proper field alignment in Objective struct initialization
- Update all references throughout the codebase
@metalmatze metalmatze force-pushed the improve-slo-performance-with-subqueries branch from b8985c5 to 01b5ac6 Compare November 6, 2025 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SLO performance issue

3 participants