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

Add enable delayed compaction #6284

Conversation

SungJin1212
Copy link
Contributor

@SungJin1212 SungJin1212 commented Oct 23, 2024

This PR adds -blocks-storage.tsdb.enable-delayed-compaction to compact TSDBs in Ingester with random delay.
(Upstream prometheus PR: prometheus/prometheus#12532, Issue: prometheus/prometheus#8278)

Current behavior runs all of TSDB compaction simultaneously for every 2h (chunk range).
The problem is CPU and Disk of Ingesters spike every 2 our.
Periodic resource spike system resources could make capacity planning hard.

To address this concern, the Prometheus added the option for delaying TSDB compaction by adding some random delay.
Adding this option to the Cortex would be useful as the Ingester operates many TSDBs.
So, this PR adds it to Cortex and I expect it spreads system resources usage.

Here is my cortex cluster system resource usage:

스크린샷 2024-10-23 오후 1 43 48 ^ CPU usage of Ingesters 스크린샷 2024-10-23 오후 1 44 14 ^ Disk write bytes/s of Ingesters

Which issue(s) this PR fixes:
Fixes #

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@SungJin1212 SungJin1212 force-pushed the Add-enable-delayed-compaction branch from 33adefc to ecca5b8 Compare October 23, 2024 05:04
@yeya24
Copy link
Contributor

yeya24 commented Oct 23, 2024

Cortex already has compaction jitter and it is also zone aware so I don't think we really need it
#5919
#5928

@SungJin1212
Copy link
Contributor Author

@yeya24
I see. Let me close this PR. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants