Skip to content
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 concrete pebbleIterator in verifyingIterator #86478

Merged
merged 2 commits into from
Aug 22, 2022

Conversation

erikgrinaker
Copy link
Contributor

@erikgrinaker erikgrinaker commented Aug 19, 2022

storage: add Pebble SST iterator benchmarks

Release justification: non-production code changes

Release note: None

storage: use concrete pebbleIterator in verifyingIterator

Gives a slight performance boost, since it avoid dynamic dispatch:

name                                                  old time/op  new time/op  delta
SSTIterator/keys=1/variant=pebble/verify=true-24      42.8µs ± 1%  42.4µs ± 1%  -0.79%  (p=0.043 n=10+10)
SSTIterator/keys=100/variant=pebble/verify=true-24    61.8µs ± 1%  60.7µs ± 1%  -1.64%  (p=0.000 n=10+10)
SSTIterator/keys=10000/variant=pebble/verify=true-24  1.91ms ± 0%  1.88ms ± 0%  -1.79%  (p=0.000 n=10+10)

An attempt was also made at using RangeKeyChanged() instead of
HasPointAndRange(), but this had no effect.

Touches #83051.

Release justification: bug fixes and low-risk updates to new functionality

Release note: None

Release justification: non-production code changes

Release note: None
Gives a slight performance boost, since it avoid dynamic dispatch:

```
name                                                  old time/op  new time/op  delta
SSTIterator/keys=1/variant=pebble/verify=true-24      42.8µs ± 1%  42.4µs ± 1%  -0.79%  (p=0.043 n=10+10)
SSTIterator/keys=100/variant=pebble/verify=true-24    61.8µs ± 1%  60.7µs ± 1%  -1.64%  (p=0.000 n=10+10)
SSTIterator/keys=10000/variant=pebble/verify=true-24  1.91ms ± 0%  1.88ms ± 0%  -1.79%  (p=0.000 n=10+10)
```

An attempt was also made at using `RangeKeyChanged()` instead of
`HasPointAndRange()`, but this had no effect.

Release justification: bug fixes and low-risk updates to new functionality

Release note: None
@erikgrinaker erikgrinaker requested review from jbowens and tbg August 19, 2022 19:08
@erikgrinaker erikgrinaker self-assigned this Aug 19, 2022
@erikgrinaker erikgrinaker requested a review from a team as a code owner August 19, 2022 19:08
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@erikgrinaker
Copy link
Contributor Author

@itsbilal You may want to use these benchmarks to compare the old and new SST iterators. They currently only benchmark the old implementation.

@erikgrinaker erikgrinaker requested a review from a team August 22, 2022 11:35
Copy link
Member

@tbg tbg left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1, 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @jbowens)

@erikgrinaker
Copy link
Contributor Author

bors r=tbg

@craig
Copy link
Contributor

craig bot commented Aug 22, 2022

Build succeeded:

@craig craig bot merged commit 9c7db33 into cockroachdb:master Aug 22, 2022
@erikgrinaker erikgrinaker deleted the verifying-iter-opt branch August 23, 2022 08:44
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.

3 participants