Skip to content

perf(v2): optimize compaction planning #4149

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kolesnikovae
Copy link
Collaborator

It's been observed that the compaction process might be very wasteful in terms of CPU resources. The reason is that the compaction planner inspects the block queues, cancelling the planned compaction job if the conditions are not met. The problem is that we do not skip the queues that we could have already checked.

image

Comment on lines -388 to -391
// Assuming that block IDs (16b ULID) are globally unique.
// We could achieve the same with more efficiency by marking visited
// batches. However, marking visited blocks seems to be more robust,
// and the size of the map is expected to be small.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It was sort of expected, but was pessimized prematurelly.

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.

1 participant