Skip to content

Default stats.flush_interval to 10m - #10633

Closed
ItamarYuran wants to merge 3 commits into
masterfrom
stats-flush-interval-10m
Closed

ItamarYuran wants to merge 3 commits into
masterfrom
stats-flush-interval-10m

Conversation

@ItamarYuran

@ItamarYuran ItamarYuran commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

stats.flush_interval defaults now to 30s. That value overrides the collector's own fallback (flushInterval = 10 * time.Minute), so almost every lakeFS process sends usage stats every 30 seconds. Each send repeats one entry per distinct metric key, so a busy installation keeps re-sending the same keys. On the receiving side, a 10-minute window cuts the number of stored stats entries by about 79%.

ItamarYuran and others added 2 commits December 2, 2026 11:07
The config default of 30s overrode the collector's own 10-minute
fallback, so every lakeFS process sent usage stats every 30 seconds.
Totals are unchanged; only the time resolution of usage stats changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
pkg/stats already falls back to flushInterval (10m) when no interval is
configured. Drop the config default so that fallback is the single source
of the value. LAKEFS_STATS_FLUSH_INTERVAL and the config file still
override it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ItamarYuran ItamarYuran changed the title Default stats.flush_interval to 10m Use the collector's 10m stats flush interval by default Dec 2, 2026
Every other setting's default lives in pkg/config/defaults.go; keep this
one there too. The collector's flushInterval stays as the fallback that
keeps time.NewTicker from getting 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ItamarYuran ItamarYuran changed the title Use the collector's 10m stats flush interval by default Default stats.flush_interval to 10m Dec 2, 2026
@ItamarYuran ItamarYuran added exclude-changelog PR description should not be included in next release changelog minor-change Used for PRs that don't require issue attached labels Dec 2, 2026
@ItamarYuran
ItamarYuran marked this pull request as ready for review December 2, 2026 10:28

@nopcoder nopcoder left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should give the current flush interval as the current default for now, and handle the load the the backend.

@ItamarYuran ItamarYuran closed this Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

exclude-changelog PR description should not be included in next release changelog minor-change Used for PRs that don't require issue attached

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants