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
{{ message }}
Repository navigation
Commit 3751e61
Browse filesBrowse the repository at this point in the historyBrowse files
authored
[release/13.6] Reduce dashboard CPU under sustained metric ingestion (#20747)
Backport of #20736 to release/13.6
/cc @JamesNK
## Customer Impact
In Aspire 13.6, long-running AppHosts with sustained metric ingestion
can consume steadily increasing dashboard CPU even under a fixed or idle
workload. A reported 15-project AppHost reached approximately 70% of one
core after 6.8 hours, with significant SQLite churn and database growth.
## Testing
Passed 59 targeted SQLite metrics and persistence tests, excluding
quarantined and outerloop tests. The source PR also validated the
before/after ingestion benchmarks and smoke-tested all 12 existing
metrics-query benchmark cases. Backport PR CI is currently in progress.
## Risk
Low. The change is localized to SQLite metric-retention cleanup,
preserves the existing retention limit and cascading deletes, and adds
focused coverage for retention, database reopening, and
transaction-failure recovery. It makes no public API or database schema
changes.
## Regression?
Yes — introduced in 13.6 with SQLite-backed telemetry in #18924.
Co-authored-by: James Newton-King <[email protected]>
Co-authored-by: Copilot <[email protected]>
Copy file name to clipboardExpand all lines: docs/specs/dashboard-persistence.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -295,6 +295,8 @@ The Dashboard applies these default ingestion limits:
295
295
296
296
The oldest logs, traces, and metric points are removed when their limits are exceeded. Fixed limits of 10,000 also apply to resource views per resource, scopes per database, instruments per resource, and dimensions per instrument; additional identities are rejected.
297
297
298
+
The `AddHistogramMetricsAtCapacity` benchmark in [TelemetryRepositoryMetricsBenchmarks](../../benchmarks/Aspire.Dashboard.Benchmarks/TelemetryRepositoryMetricsBenchmarks.cs) measures steady-state ingestion with one or five dimensions already at the default retention limit. Each invocation adds one cumulative histogram point per dimension with four replayed exemplars, exercising eviction and cascading exemplar deletes. Payload construction and history population are outside the measured operation.
299
+
298
300
Console logs are persisted only after their stream is viewed or exported. The frontend keeps up to `Dashboard:Frontend:MaxConsoleLogCount` entries in memory, which defaults to 100,000. The same limit applies across all console logs in the database, with the oldest entries removed when the limit is exceeded. Historical runs can therefore omit uncaptured logs.
0 commit comments