Skip to content

vector: A new load balance to improve the vector search performance when tiflash replica >1#9636

Merged
ti-chi-bot[bot] merged 2 commits intopingcap:masterfrom
JaySon-Huang:ann_balance
Nov 18, 2024
Merged

vector: A new load balance to improve the vector search performance when tiflash replica >1#9636
ti-chi-bot[bot] merged 2 commits intopingcap:masterfrom
JaySon-Huang:ann_balance

Conversation

@JaySon-Huang
Copy link
Contributor

@JaySon-Huang JaySon-Huang commented Nov 18, 2024

backport https://github.com/tidbcloud/tiflash-cse/pull/295

What problem does this PR solve?

Issue Number: close #9637

Problem Summary:
when tiflash replica>1, the vector search qps is only 60% of the case when the tiflash replica=1

What is changed and how it works?

In this pr: [https://github.com/tikv/client-c/pull/193](https://github.com/tikv/client-c/pull/193)
add a bool paramater centralized_schedule for Client::buildBatchCopTasks
When set to true:  Regions are concentrated into as few BatchCopTasks as possible

This PR modifies the call to this function, setting the newly added parameter to true when the request is a ANN query.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • tiflash replica = 1, 2, ,3 , both all regions on one tiflash store and none-single tiflash store has all segmetns
  • called by an ANN request and non-ann reuqest
  • kill the requested tiflash
  • No code

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

Fix the vector search performance regression when tiflash write node scale out under disaggregated arch

@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. labels Nov 18, 2024
@sre-bot
Copy link
Collaborator

sre-bot commented Nov 18, 2024

CLA assistant check
All committers have signed the CLA.

@ti-chi-bot ti-chi-bot bot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. do-not-merge/needs-triage-completed and removed do-not-merge/needs-linked-issue labels Nov 18, 2024
@JaySon-Huang
Copy link
Contributor Author

@JinheLin @Lloyd-Pottiger PTAL
/cc @kolafish

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Nov 18, 2024

@JaySon-Huang: GitHub didn't allow me to request PR reviews from the following users: kolafish.

Note that only pingcap members and repo collaborators can review this PR, and authors cannot review their own PRs.

Details

In response to this:

@JinheLin @Lloyd-Pottiger PTAL
/cc @kolafish

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 needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. labels Nov 18, 2024
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Nov 18, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JinheLin, Lloyd-Pottiger

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

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [JinheLin,Lloyd-Pottiger]

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 18, 2024
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Nov 18, 2024

[LGTM Timeline notifier]

Timeline:

  • 2024-11-18 05:46:36.22119605 +0000 UTC m=+853558.412065046: ☑️ agreed by Lloyd-Pottiger.
  • 2024-11-18 09:30:39.24599562 +0000 UTC m=+867001.436864601: ☑️ agreed by JinheLin.

@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Nov 18, 2024

@JaySon-Huang: Your PR was out of date, I have automatically updated it for you.

At the same time I will also trigger all tests for you:

/run-all-tests

trigger some heavy tests which will not run always when PR updated.

If the CI test fails, you just re-trigger the test that failed and the bot will merge the PR for you after the CI passes.

Details

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 ti-community-infra/tichi repository.

@JaySon-Huang
Copy link
Contributor Author

/test pull-unit-test

@ti-chi-bot ti-chi-bot bot merged commit 2acface into pingcap:master Nov 18, 2024
@ti-chi-bot
Copy link
Member

In response to a cherrypick label: new pull request created to branch release-8.5: #9651.

@JaySon-Huang JaySon-Huang deleted the ann_balance branch November 18, 2024 15:19
@ti-chi-bot ti-chi-bot bot added release-note Denotes a PR that will be considered when it comes time to generate release notes. and removed release-note-none Denotes a PR that doesn't merit a release note. labels Nov 19, 2024
ti-chi-bot bot pushed a commit that referenced this pull request Nov 19, 2024
…hen tiflash replica >1 (#9636) (#9651)

close #9637

In this pr: [https://github.com/tikv/client-c/pull/193](https://github.com/tikv/client-c/pull/193)
add a bool paramater centralized_schedule for Client::buildBatchCopTasks
When set to true:  Regions are concentrated into as few BatchCopTasks as possible

This PR modifies the call to this function, setting the newly added parameter to true when the request is a ANN query.

Signed-off-by: Calvin Neo <calvinneo1995@gmail.com>

Co-authored-by: Yu Jin <yujin.yujin@gmail.com>
Co-authored-by: JaySon-Huang <tshent@qq.com>
Co-authored-by: Calvin Neo <CalvinNeo@users.noreply.github.com>
Co-authored-by: JaySon <tshent@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm needs-cherry-pick-release-8.5 Should cherry pick this PR to release-8.5 branch. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve the vector search performance when tiflash wn is scale-out

6 participants