Commit 05ee601
π Calibrate Prometheus alert thresholds using memory profiling data (#2308)
Analyze baseline memory usage patterns and adjust Prometheus alert thresholds
to eliminate false positives while maintaining sensitivity to real issues.
This is based on memory profiling done against BoxcutterRuntime, which has
increased memory load.
**Memory Analysis:**
- 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:**
- 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)
Signed-off-by: Todd Short <[email protected]>
Co-authored-by: Claude <[email protected]>1 parent 9937ae2 commit 05ee601
File tree
5 files changed
+44
-12
lines changed- hack/test
- helm
- prometheus
- templates
5 files changed
+44
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| 284 | + | |
284 | 285 | | |
285 | 286 | | |
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
289 | 290 | | |
290 | | - | |
| 291 | + | |
291 | 292 | | |
292 | 293 | | |
293 | 294 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
21 | 27 | | |
22 | 28 | | |
23 | 29 | | |
| |||
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
39 | | - | |
| 45 | + | |
40 | 46 | | |
41 | 47 | | |
42 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
Lines changed: 8 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
9 | 15 | | |
10 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
11 | 22 | | |
12 | 23 | | |
13 | 24 | | |
| |||
0 commit comments