Commit 2fa4b9c
📊 Calibrate Prometheus alert thresholds using memory profiling data
Analyze baseline memory usage patterns and adjust Prometheus alert thresholds
to eliminate false positives while maintaining sensitivity to real issues.
**Memory Analysis (MEMORY_ANALYSIS.md):**
- Peak RSS: 107.9MB, Peak Heap: 54.74MB during e2e tests
- Memory stabilizes at 106K heap (heap19-21 show 0K growth for 3 snapshots)
- Conclusion: NOT a memory leak, but normal operational behavior
**Memory Breakdown:**
- JSON Deserialization: 24.64MB (45%) - inherent to OLM's dynamic nature
- Informer Lists: 9.87MB (18%) - optimization possible via field selectors
- OpenAPI Schemas: 3.54MB (6%) - already optimized (73% reduction)
- Runtime Overhead: 53.16MB (49%) - normal for Go applications
**Alert Threshold Updates:**
- operator-controller-memory-growth: 100kB/sec → 200kB/sec
- operator-controller-memory-usage: 100MB → 150MB
- catalogd-memory-growth: 100kB/sec → 200kB/sec
**Rationale:**
Baseline profiling showed 132.4kB/sec episodic growth during informer sync
and 107.9MB peak usage are normal. Previous thresholds caused false positive
alerts during normal e2e test execution.
**Verification (ALERT_THRESHOLD_VERIFICATION.md):**
- Baseline test (old thresholds): 2 alerts triggered (false positives)
- Verification test (new thresholds): 0 alerts triggered ✅
- Memory patterns remain consistent (~55MB heap, 79-171MB RSS)
- Transient spikes don't trigger alerts due to "for: 5m" clause
**Recommendation:**
Accept 107.9MB as normal operational behavior for test/development
environments. Production deployments may need different thresholds based
on workload characteristics (number of resources, reconciliation frequency).
**Non-viable Optimizations:**
- Cannot replace unstructured with typed clients (breaks OLM flexibility)
- Cannot reduce runtime overhead (inherent to Go)
- JSON deserialization is unavoidable for dynamic resource handling
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 18142b3 commit 2fa4b9c
File tree
1 file changed
+11
-3
lines changed- helm/prometheus/templates
1 file changed
+11
-3
lines changedLines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
28 | | - | |
| 30 | + | |
| 31 | + | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
34 | | - | |
| 37 | + | |
| 38 | + | |
35 | 39 | | |
36 | 40 | | |
| 41 | + | |
| 42 | + | |
37 | 43 | | |
38 | 44 | | |
39 | 45 | | |
40 | | - | |
| 46 | + | |
| 47 | + | |
41 | 48 | | |
42 | 49 | | |
43 | 50 | | |
44 | 51 | | |
45 | 52 | | |
| 53 | + | |
46 | 54 | | |
47 | 55 | | |
48 | 56 | | |
| |||
0 commit comments