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

Compactor improvements #4018

Merged
merged 4 commits into from
Jul 22, 2021

Conversation

sandeepsukhani
Copy link
Contributor

What this PR does / why we need it:
A couple of improvements:

  1. During compaction, we create an empty file and merge the index from all the files into it. This wastes a lot of resources in a big cluster that has large index files. This PR changes it to use compacted file built from the last compaction as seed file and then copies index from all the other files into it. If there is no compacted file then it uses whatever files appear first in the list of files to compact. This should significantly reduce compaction time in a large cluster.
  2. Allows configuring compactor to compact multiple tables at a time.

Checklist

  • Tests updated

Copy link
Contributor

@cyriltovena cyriltovena left a comment

Choose a reason for hiding this comment

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

LGTM

@sandeepsukhani sandeepsukhani merged commit 8a9abdf into grafana:main Jul 22, 2021
@sandeepsukhani sandeepsukhani deleted the compactor-improvements branch March 9, 2022 11:03
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.

None yet

2 participants