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

colblk: cache IndexBlockDecoder in block metadata #4072

Merged
merged 1 commit into from
Oct 19, 2024

Conversation

RaduBerinde
Copy link
Member

RandSeekInSST/v4/single-level-10  1.21µs ± 1%  1.25µs ± 5%   +3.40%  (p=0.005 n=8+8)
RandSeekInSST/v4/two-level-10     2.06µs ± 4%  2.06µs ± 1%     ~     (p=0.959 n=8+8)
RandSeekInSST/v5/single-level-10  1.11µs ± 1%  1.06µs ± 1%   -4.03%  (p=0.000 n=8+8)
RandSeekInSST/v5/two-level-10     1.79µs ± 5%  1.59µs ± 1%  -11.45%  (p=0.000 n=7+8)

@RaduBerinde RaduBerinde requested a review from a team as a code owner October 18, 2024 14:53
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@jbowens jbowens left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 6 of 7 files at r1, all commit messages.
Reviewable status: 6 of 7 files reviewed, 1 unresolved discussion (waiting on @RaduBerinde)


sstable/colblk/index_block.go line 229 at r1 (raw file):

	i.h.Release()
	i.h = block.BufferHandle{}
	i.allocDecoder.Init(blk)

Now that we expect most instances to use a pre-allocated IndexBlockDecoder, should we remove i.allocDecoder and update callers of IndexIter.Init to use InitWithDecoder?

@RaduBerinde
Copy link
Member Author

sstable/colblk/index_block.go line 229 at r1 (raw file):

Previously, jbowens (Jackson Owens) wrote…

Now that we expect most instances to use a pre-allocated IndexBlockDecoder, should we remove i.allocDecoder and update callers of IndexIter.Init to use InitWithDecoder?

There are quite a few uses and I'm not sure if any are performance sensitive. Will leave a TODO for now.

@RaduBerinde
Copy link
Member Author

TFTR!

```
RandSeekInSST/v4/single-level-10  1.21µs ± 1%  1.25µs ± 5%   +3.40%  (p=0.005 n=8+8)
RandSeekInSST/v4/two-level-10     2.06µs ± 4%  2.06µs ± 1%     ~     (p=0.959 n=8+8)
RandSeekInSST/v5/single-level-10  1.11µs ± 1%  1.06µs ± 1%   -4.03%  (p=0.000 n=8+8)
RandSeekInSST/v5/two-level-10     1.79µs ± 5%  1.59µs ± 1%  -11.45%  (p=0.000 n=7+8)
```
@RaduBerinde RaduBerinde merged commit 29cc16b into cockroachdb:master Oct 19, 2024
23 checks passed
@RaduBerinde RaduBerinde deleted the cache-index-decoder branch October 19, 2024 15:01
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