Skip to content

Cache sort blocks by the sort owners to avoid contention in shared cache of sorts blocks. #7671

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

Merged
merged 2 commits into from
Jul 10, 2023

Conversation

hvlad
Copy link
Member

@hvlad hvlad commented Jul 9, 2023

If request performs many sorts while executing, it often uses shared cache of sort blocks (maintained at dbb-level).
When such requests run concurrently, its creates a big load on shared cache and wait for each other significant time, reducing common performance.

This problem present at SS architecture only.

The offered solution is to avoid return of used sort block into shared common cache until requiest finished its execution.

@hvlad hvlad requested a review from dyemanov July 9, 2023 11:06
@hvlad hvlad self-assigned this Jul 9, 2023
Copy link
Member

@dyemanov dyemanov left a comment

Choose a reason for hiding this comment

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

Approved with a couple of minor comments.

@hvlad hvlad merged commit 85716f7 into master Jul 10, 2023
@hvlad hvlad deleted the work/SortBlocksCache branch July 12, 2023 07:16
hvlad added a commit that referenced this pull request Apr 2, 2024
…e from backup (FB5, RC2)

Don't use common SortOwner for sorts with different dbb's.
After #7671 it could contain cached sort buffers from different pools (dbb_permanent) and then release it to the wrong dbb_sort_buffers making possible usage of deallocated memory later.
hvlad added a commit that referenced this pull request Apr 3, 2024
…e from backup (FB5, RC2)

Don't use common SortOwner for sorts with different dbb's.
After #7671 it could contain cached sort buffers from different pools (dbb_permanent) and then release it to the wrong dbb_sort_buffers making possible usage of deallocated memory later.
dyemanov pushed a commit that referenced this pull request Nov 16, 2024
…e from backup (FB5, RC2)

Don't use common SortOwner for sorts with different dbb's.
After #7671 it could contain cached sort buffers from different pools (dbb_permanent) and then release it to the wrong dbb_sort_buffers making possible usage of deallocated memory later.
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