-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
util/chunk: optimize (*ListInDisk).GetChunk
and add a fast row container reader (#45130)
#45203
util/chunk: optimize (*ListInDisk).GetChunk
and add a fast row container reader (#45130)
#45203
Conversation
Signed-off-by: Yang Keao <[email protected]>
Signed-off-by: Yang Keao <[email protected]>
Signed-off-by: Yang Keao <[email protected]>
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tiancaiamao, xhebox The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
[LGTM Timeline notifier]Timeline:
|
/test all |
@purelind: No presubmit jobs available for pingcap/[email protected] In response to this:
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. |
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 thecursorFetch
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
, asGetChunk
is now much faster.The performance of existing benchmark
BenchmarkListInDisk_GetChunk
increases from2877471ns/op
to462864ns/op
Check List
Tests