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

br/storage: disable keep alive for GCS on default to speed up request #49341

Merged
merged 5 commits into from
Dec 12, 2023

Conversation

D3Hunter
Copy link
Contributor

@D3Hunter D3Hunter commented Dec 11, 2023

What problem does this PR solve?

Issue Number: close #49340

Problem Summary:

What changed and how does it work?

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
    run TestReadFileConcurrently and check speed can use all network bandwidth
    before
    bench_test.go:575: concurrent read speed for 2.136GiB bytes(20 files): 234.9MiB/s, total-dur=9.309418879s

after

    bench_test.go:568: concurrent read speed for 2.136GiB bytes(20 files): 2.353GiB/s, total-dur=907.624007ms
  • No need to test
    • I checked and no code files have been changed.

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

@ti-chi-bot ti-chi-bot bot added 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 Dec 11, 2023
Copy link

tiprow bot commented Dec 11, 2023

Hi @D3Hunter. 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.

@D3Hunter
Copy link
Contributor Author

/test pull-br-integration-test

Copy link

tiprow bot commented Dec 11, 2023

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/test pull-br-integration-test

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.

if httpClient == nil {
// http2 will to reuse the connection to read multiple files, which is
// very slow, the speed is about the same speed as reading a single file.
// So we disable keepalive here to use multiple connections to read files.
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure if it should be the default behaviour of Google clous storage
cc @Leavrth @YuJuncen

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's OK because we don't have a high concurrency of Google cloud Storage objects accessing, and the socket/memory usage should be affordable.

Copy link

codecov bot commented Dec 11, 2023

Codecov Report

Merging #49341 (df8318b) into master (bcbccaf) will increase coverage by 0.8934%.
Report is 9 commits behind head on master.
The diff coverage is 0.0000%.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #49341        +/-   ##
================================================
+ Coverage   71.0591%   71.9525%   +0.8934%     
================================================
  Files          1368       1409        +41     
  Lines        401982     414081     +12099     
================================================
+ Hits         285645     297942     +12297     
- Misses        96472      97339       +867     
+ Partials      19865      18800      -1065     
Flag Coverage Δ
integration 43.6408% <0.0000%> (?)
unit 71.0589% <ø> (-0.0003%) ⬇️

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

Components Coverage Δ
dumpling 53.9663% <ø> (ø)
parser ∅ <ø> (∅)
br 48.1226% <0.0000%> (-4.8389%) ⬇️

test

fix test

test
if httpClient == nil {
// http2 will to reuse the connection to read multiple files, which is
// very slow, the speed is about the same speed as reading a single file.
// So we disable keepalive here to use multiple connections to read files.
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's OK because we don't have a high concurrency of Google cloud Storage objects accessing, and the socket/memory usage should be affordable.

@ti-chi-bot ti-chi-bot bot added the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Dec 11, 2023
@D3Hunter
Copy link
Contributor Author

/retest

Copy link

tiprow bot commented Dec 11, 2023

@D3Hunter: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

In response to this:

/retest

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 ti-chi-bot bot added lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Dec 12, 2023
Copy link

ti-chi-bot bot commented Dec 12, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-12-11 13:54:54.582403053 +0000 UTC m=+277985.619629977: ☑️ agreed by lance6716.
  • 2023-12-12 01:26:53.900791708 +0000 UTC m=+319504.938018634: ☑️ agreed by ywqzzy.

Copy link

ti-chi-bot bot commented Dec 12, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lance6716, Leavrth, ywqzzy

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 the approved label Dec 12, 2023
@ti-chi-bot ti-chi-bot bot merged commit 8c8333a into pingcap:master Dec 12, 2023
15 checks passed
@D3Hunter D3Hunter deleted the test-change branch December 12, 2023 03:20
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

reading from GCS parallelly is slow, the speed is about the same as reading serially.
4 participants