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

external/test: compare the performance of merge iter #48560

Merged
merged 10 commits into from
Nov 14, 2023

Conversation

lance6716
Copy link
Contributor

@lance6716 lance6716 commented Nov 13, 2023

What problem does this PR solve?

Issue Number: close #xxx

Problem Summary:

What is changed and how it works?

generate the speed, CPU/heap profile for reading from external storage. See below.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No need to test
    • I checked and no code files have been changed.
$ go test ./br/pkg/lightning/backend/external -v --tags=intest -test.run TestCompareReader --testing-storage-uri "s3://nfs/tianyuan-ut?access-key=xxx&secret-access-key=xxx&endpoint=https://xxx&force-path-style=false&region=xxx&provider=ks"
    bench_test.go:413: sequential read speed for 1258291200 bytes: 52.38 MB/s
    bench_test.go:420: concurrent read speed for 1258291200 bytes: 730.08 MB/s
    bench_test.go:427: merge iter read speed for 1258291200 bytes: 103.47 MB/s

The data is evenly distributed in files. We can see that even in this case merge iterator is slower than concurrent reading.

and here's the CPU flame graph of merge iter. We will improve the performance in future PR.

image

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

Please refer to Release Notes Language Style Guide to write a quality release note.

None

Signed-off-by: lance6716 <lance6716@gmail.com>
Signed-off-by: lance6716 <lance6716@gmail.com>
Signed-off-by: lance6716 <lance6716@gmail.com>
Signed-off-by: lance6716 <lance6716@gmail.com>
Signed-off-by: lance6716 <lance6716@gmail.com>
Signed-off-by: lance6716 <lance6716@gmail.com>
Signed-off-by: lance6716 <lance6716@gmail.com>
@ti-chi-bot ti-chi-bot bot added do-not-merge/needs-linked-issue release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 13, 2023
Copy link

tiprow bot commented Nov 13, 2023

Hi @lance6716. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

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.

@lance6716 lance6716 added the skip-issue-check Indicates that a PR no need to check linked issue. label Nov 13, 2023
Signed-off-by: lance6716 <lance6716@gmail.com>
@lance6716
Copy link
Contributor Author

/cc @D3Hunter

@ti-chi-bot ti-chi-bot bot requested a review from D3Hunter November 13, 2023 10:40
Copy link

codecov bot commented Nov 13, 2023

Codecov Report

Merging #48560 (5d11739) into master (b1d2a75) will increase coverage by 1.3978%.
Report is 2 commits behind head on master.
The diff coverage is n/a.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #48560        +/-   ##
================================================
+ Coverage   71.4161%   72.8139%   +1.3978%     
================================================
  Files          1403       1427        +24     
  Lines        406992     413830      +6838     
================================================
+ Hits         290658     301326     +10668     
+ Misses        96390      93554      -2836     
+ Partials      19944      18950       -994     
Flag Coverage Δ
integration 43.2712% <ø> (?)
unit 71.4258% <ø> (+0.0096%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 53.9874% <ø> (ø)
parser ∅ <ø> (∅)
br 48.8063% <ø> (-4.2851%) ⬇️

@ti-chi-bot ti-chi-bot bot added approved needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 14, 2023
@lance6716
Copy link
Contributor Author

/cc @ywqzzy

@ti-chi-bot ti-chi-bot bot requested a review from ywqzzy November 14, 2023 03:01
Copy link
Collaborator

@Benjamin2037 Benjamin2037 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

ti-chi-bot bot commented Nov 14, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Benjamin2037, D3Hunter

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Nov 14, 2023
Copy link

ti-chi-bot bot commented Nov 14, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-11-14 02:56:20.684333561 +0000 UTC m=+4131378.271443707: ☑️ agreed by D3Hunter.
  • 2023-11-14 03:03:55.721749037 +0000 UTC m=+4131833.308859167: ☑️ agreed by Benjamin2037.

@ti-chi-bot ti-chi-bot bot merged commit 032c8e5 into pingcap:master Nov 14, 2023
20 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. skip-issue-check Indicates that a PR no need to check linked issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants