-
Notifications
You must be signed in to change notification settings - Fork 409
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
perf(pageserver): postpone vectored get fringe keyspace construction #7904
Conversation
Signed-off-by: Alex Chi Z <chi@neon.tech>
3144 tests run: 3011 passed, 0 failed, 133 skipped (full report)Flaky tests (3)Postgres 16Code coverage* (full report)
* collected from Rust tests only The comment gets automatically updated with the latest test results
d605bd1 at 2024-05-29T16:32:17.922Z :recycle: |
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.
LGTM
(CC @VladLazar so that this is in your inbox when you're back in the office.)
On staging the basebackup time drops to a reasonable number (30s->2s for now). With the delete tombstone pull request it should be even faster. |
…7904) Perf shows a significant amount of time is spent on `Keyspace::merge`. This pull request postpones merging keyspace until retrieving the layer, which contributes to a 30x improvement in aux keyspace basebackup time. ``` --- old 10000 files found in 0.580569459s --- new 10000 files found in 0.02995075s ``` Signed-off-by: Alex Chi Z <chi@neon.tech>
@@ -318,7 +318,7 @@ pub(crate) struct LayerFringe { | |||
#[derive(Debug)] | |||
struct LayerKeyspace { | |||
layer: ReadableLayer, | |||
target_keyspace: KeySpace, | |||
target_keyspace: Vec<KeySpace>, |
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.
nit: making this member a KeySpaceRandomAccum
would have been more expressive in my opinion, but this is fine.
Looks good to me as well. Nice find, Chi! |
follow up on #7904 avoid a layer of indirection introduced by `Vec<Range<Key>>` Signed-off-by: Alex Chi Z <chi@neon.tech>
Problem
Perf shows a significant amount of time is spent on
Keyspace::merge
. This pull request postpones merging keyspace until retrieving the layer, which contributes to a 30x improvement in aux keyspace basebackup time.Summary of changes
Checklist before requesting a review
Checklist before merging