-
Notifications
You must be signed in to change notification settings - Fork 444
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
page_service: getpage batching: refactor & minor fixes #9792
Open
problame
wants to merge
14
commits into
problame/batching-benchmark
Choose a base branch
from
problame/merge-getpage-test
base: problame/batching-benchmark
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
page_service: getpage batching: refactor & minor fixes #9792
problame
wants to merge
14
commits into
problame/batching-benchmark
from
problame/merge-getpage-test
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Nov 18, 2024
5535 tests run: 5309 passed, 0 failed, 226 skipped (full report)Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
058b35f at 2024-11-21T11:30:41.601Z :recycle: |
problame
added a commit
that referenced
this pull request
Nov 18, 2024
## Problem We don't take advantage of queue depth generated by the compute on the pageserver. We can process getpage requests more efficiently by batching them. ## Summary of changes Batch up incoming getpage requests that arrive within a configurable time window (`server_side_batch_timeout`). Then process the entire batch via one `get_vectored` timeline operation. By default, no merging takes place. ## Testing * **Functional**: #9792 * **Performance**: will be done in staging/pre-prod # Refs * #9377 * #9376 Co-authored-by: Christian Schwarz <[email protected]>
Base automatically changed from
vlad/pageserver-merge-get-page-requests
to
main
November 18, 2024 20:24
problame
changed the title
WIP: page_service: add basic testcase for merging
WIP: page_service: add basic benchmark
Nov 18, 2024
problame
changed the title
WIP: page_service: add basic benchmark
WIP: page_service: add basic test & benchmark
Nov 18, 2024
The steps in the test work in neon_local + psql but for some reason they don't work in the test. Asked compute team on Slack for help: https://neondb.slack.com/archives/C04DGM6SMTM/p1731952688386789
problame
force-pushed
the
problame/merge-getpage-test
branch
from
November 18, 2024 22:57
a149e89
to
15e21c7
Compare
problame
changed the title
WIP: page_service: add basic test & benchmark
WIP: page_service: add basic sequential scan benchmark
Nov 18, 2024
problame
changed the title
WIP: page_service: add basic sequential scan benchmark
WIP: batching: bugfixes & benchmark
Nov 19, 2024
This reverts commit aa695b2.
problame
changed the title
WIP: batching: bugfixes & benchmark
page_service: refactor & minor fixes for batching code
Nov 20, 2024
problame
changed the title
page_service: refactor & minor fixes for batching code
page_service: getpage batching: refactor & minor fixes
Nov 20, 2024
VladLazar
approved these changes
Nov 21, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked it out locally and stepped through it a number of times. Looks correct, but have a look at the comments.
This was referenced Nov 21, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR refactors the page_service server-side batching code that was recently added in
#9377.
Changes:
handle_pagestream
, instead of in thePageServerHandler
. This adds robustness because it systematically avoids a source of bugs.next_batch
, call itcarry
.&mut Option<Carry>
of in a local variable.batch
back into theself.next_batch
whenever we bail.