-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
storage: use RangeKeyChanged()
in pebbleMVCCScanner
#86110
Merged
craig
merged 1 commit into
cockroachdb:master
from
erikgrinaker:mvcc-scan-rangekeychanged
Aug 14, 2022
Merged
storage: use RangeKeyChanged()
in pebbleMVCCScanner
#86110
craig
merged 1 commit into
cockroachdb:master
from
erikgrinaker:mvcc-scan-rangekeychanged
Aug 14, 2022
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
nicktrav
approved these changes
Aug 14, 2022
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @jbowens)
bors r=nicktrav |
This patch uses `RangeKeyChanged()` in `pebbleMVCCScanner` to detect MVCC range keys and enable point key synthesis. This shows a ~5% speedup for large scans with no range keys, but a minor regression for point gets with range keys -- the latter caused by having to call both `HasPointAndRange()` and `RangeKeyChanged()`, while previously only the first was called. ``` name old time/op new time/op delta MVCCScan_Pebble/rows=1/versions=1/valueSize=64/numRangeKeys=0-24 5.62µs ± 2% 5.68µs ± 1% ~ (p=0.058 n=10+8) MVCCScan_Pebble/rows=1/versions=1/valueSize=64/numRangeKeys=1-24 12.2µs ± 3% 12.3µs ± 1% ~ (p=0.113 n=10+9) MVCCScan_Pebble/rows=100/versions=1/valueSize=64/numRangeKeys=0-24 38.9µs ± 1% 38.5µs ± 1% -0.78% (p=0.019 n=9+9) MVCCScan_Pebble/rows=100/versions=1/valueSize=64/numRangeKeys=1-24 72.1µs ± 2% 72.7µs ± 2% +0.83% (p=0.043 n=10+10) MVCCScan_Pebble/rows=10000/versions=1/valueSize=64/numRangeKeys=0-24 2.85ms ± 1% 2.72ms ± 1% -4.63% (p=0.000 n=9+10) MVCCScan_Pebble/rows=10000/versions=1/valueSize=64/numRangeKeys=1-24 5.46ms ± 1% 5.48ms ± 1% ~ (p=0.065 n=9+10) MVCCGet_Pebble/batch=true/versions=1/valueSize=8/numRangeKeys=0-24 3.34µs ± 1% 3.33µs ± 2% ~ (p=0.591 n=10+10) MVCCGet_Pebble/batch=true/versions=1/valueSize=8/numRangeKeys=1-24 6.84µs ± 2% 7.00µs ± 1% +2.35% (p=0.000 n=10+8) MVCCGet_Pebble/batch=true/versions=10/valueSize=8/numRangeKeys=0-24 4.31µs ± 3% 4.28µs ± 2% ~ (p=0.225 n=10+10) MVCCGet_Pebble/batch=true/versions=10/valueSize=8/numRangeKeys=1-24 9.56µs ± 2% 9.83µs ± 3% +2.82% (p=0.000 n=10+10) ``` Release note: None
erikgrinaker
force-pushed
the
mvcc-scan-rangekeychanged
branch
from
August 14, 2022 21:03
8c1dac0
to
59b5bca
Compare
Canceled. |
bors r=nicktrav |
Build succeeded: |
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 patch uses
RangeKeyChanged()
inpebbleMVCCScanner
to detectMVCC range keys and enable point key synthesis. This shows a ~5% speedup
for large scans with no range keys, but a minor regression for point
gets with range keys -- the latter caused by having to call both
HasPointAndRange()
andRangeKeyChanged()
, while previously only thefirst was called.
Touches #82559.
Release note: None