fix: remove project label from projectstorage metrics to reduce cardinality#558
Merged
zachsmith1 merged 1 commit intomainfrom Apr 2, 2026
Merged
Conversation
The project label on projectstorage_first_ready_seconds, projectstorage_child_creations_total, and projectstorage_reinitializing_errors_total creates a cardinality explosion: 414 projects × 82 resource kinds × histogram buckets × 9 pods = ~7.2M series, consuming 28% of all VictoriaMetrics storage in production. Drop the project label from all three metrics. The distribution of storage init latency by resource_group and resource_kind is the useful signal; per-project granularity is not needed and causes the cardinality problem. Reduces total series from ~4.7M to ~11K per pod. Ref: datum-cloud/infra#2113
Contributor
scotwells
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
projectlabel from all threeprojectstorage_*metricsProblem
The
projectlabel creates cardinality explosion in VictoriaMetrics production storage (datum-cloud/infra#2113). PVCs are at 93% capacity.projectstorage_first_ready_secondsprojectstorage_child_creations_totalprojectstorage_reinitializing_errors_total~430x reduction in cardinality.
What changed
projectfrom label dimensions on all three metricsprojectfield frominstrumentedStoragestructrecordFirstReady,incrReinit, andchildCreations.WithLabelValuescall sitesThe distribution by
resource_groupandresource_kindis the useful signal for understanding storage init performance. Per-project granularity is not actionable and is the source of the cardinality problem.Test plan
go build ./internal/apiserver/storage/project/passes