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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

util/chunk: optimize (*ListInDisk).GetChunk and add a fast row container reader (#45130) #45205

Conversation

ti-chi-bot
Copy link
Member

This is an automated cherry-pick of #45130

What problem does this PR solve?

Issue Number: close #45125

Problem Summary:

The existing reading method of RowContainer (GetChunk(...)) is not fast enough for dumping a lot of rows from disk (for the cursorFetch use case).

The existing Iterator4RowContainer is even slower, as it allocates a new chunk for each row 馃う.

This PR is extracted from #44730 (with a some refractor).

What is changed and how it works?

This PR pipelines the IO and CPU calculation, to make full use of the IO bandwidth. It should also help other features using rowContainer, as GetChunk is now much faster.

The performance of existing benchmark BenchmarkListInDisk_GetChunk increases from 2877471ns/op to 462864ns/op

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
Signed-off-by: Yang Keao <yangkeao@chunibyo.icu>
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 6, 2023

This cherry pick PR is for a release branch and has not yet been approved by release team.
Adding the do-not-merge/cherry-pick-not-approved label.

To merge this cherry pick, it must first be approved by the collaborators.

AFTER it has been approved by collaborators, please ping the release team in a comment to request a cherry pick review.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jul 6, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign mmyj for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@YangKeao YangKeao closed this Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants