Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run-queue: Automatically prune the test results database #7318

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

martinpitt
Copy link
Member

@martinpitt martinpitt commented Jan 17, 2025

If test-results.db gets too big (> 25 MB), prune it to the last 14 days. We are occasionally doing this manually, but not often enough -- it routinely grows to > 100 MB, which makes the weather report take ages to load.

The database shrinks to about 15 MB after being freshly pruned, so 25 MB gives enough margin to avoid running the pruning too often (as it's a bit expensive).


I tuned this with getting https://ci-weather-cockpit.apps.ocp.cloud.ci.centos.org/test-results.db (currently 170 MB). Running ./prometheus-stats --db /tmp/test-results.db --prune 14 shrinks it to 15 MB.

I just made a backup at https://ci-weather-cockpit.apps.ocp.cloud.ci.centos.org/test-results.db.20250117 in case anything goes wrong.

@martinpitt martinpitt requested a review from jelly January 17, 2025 08:27
@martinpitt martinpitt changed the title run-queue: Automatically the test results database run-queue: Automatically prune the test results database Jan 17, 2025
If test-results.db gets too big (> 25 MB), prune it to the last 14 days.
We are occasionally doing this manually, but not often enough -- it
routinely grows to > 100 MB, which makes the weather report take ages to
load.

The database shrinks to about 15 MB after being freshly pruned, so 25 MB
gives enough margin to avoid running the pruning too often (as it's a
bit expensive).
Copy link
Member

@jelly jelly left a comment

Choose a reason for hiding this comment

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

Thanks!

@martinpitt martinpitt merged commit f0bebc2 into main Jan 17, 2025
6 checks passed
@martinpitt martinpitt deleted the auto-prune-db branch January 17, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants