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

Vector: optimize read performance #9687

Closed
wants to merge 9 commits into from

Conversation

Lloyd-Pottiger
Copy link
Contributor

@Lloyd-Pottiger Lloyd-Pottiger commented Nov 29, 2024

What problem does this PR solve?

Issue Number: ref #9032

Problem Summary:

What is changed and how it works?

Depends on #9678, #9690

  1. support filter in deserializeBinaryBulk so that we can only deserialize necessary rows
  2. refactor DMFileReader to pre-compute read block information so that we can know the block size before reading.
  3. refactor vector search path to use readWithFilter rather than read when there are vector indexes.

This PR can improve 8.5% QPS of vector search in scenarios with updates.

before

"metrics": {
    "qps": 114.8094,
    "serial_latency_p99": 0.0876,
    "recall": 0.9324
}

after

"metrics": {
    "qps": 124.6441,
    "serial_latency_p99": 0.0815,
    "recall": 0.9315
}

Why it has no benefit in scenarios with static data?

  1. When data-sharing is enabled, always deserialize all rows.
  2. There is a PK column cache in DMFile, there is no need to read the PK column in DMFile.
Improve 8.5% the performance of vector search in scenarios with updates.

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • 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

None

@ti-chi-bot ti-chi-bot bot added the release-note-none Denotes a PR that doesn't merit a release note. label Nov 29, 2024
Copy link
Contributor

ti-chi-bot bot commented Nov 29, 2024

[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 ask for approval from lloyd-pottiger, ensuring that each of them provides their approval before proceeding. For more information see the 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

@ti-chi-bot ti-chi-bot bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 29, 2024
Signed-off-by: Lloyd-Pottiger <[email protected]>
Signed-off-by: Lloyd-Pottiger <[email protected]>
Signed-off-by: Lloyd-Pottiger <[email protected]>
Signed-off-by: Lloyd-Pottiger <[email protected]>
Signed-off-by: Lloyd-Pottiger <[email protected]>
Signed-off-by: Lloyd-Pottiger <[email protected]>
Signed-off-by: Lloyd-Pottiger <[email protected]>
@JaySon-Huang
Copy link
Contributor

/hold
Get the preceding PR merged first: #9678, #9690

@ti-chi-bot ti-chi-bot bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Dec 6, 2024
Signed-off-by: Lloyd-Pottiger <[email protected]>
Copy link
Contributor

ti-chi-bot bot commented Dec 6, 2024

@Lloyd-Pottiger: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-unit-test 7fdb5af link true /test pull-unit-test

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@Lloyd-Pottiger Lloyd-Pottiger deleted the refine-vs branch December 10, 2024 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants