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

Remove skip building graph check for quantization use case #2430

Merged

Conversation

VijayanB
Copy link
Member

@VijayanB VijayanB commented Jan 23, 2025

Description

For on-disk quantization indices, we don't have to apply building graph check since it is already faster, and we found is causing latency spike during search. Hence, done check for threshold if quantization criteria is met.

Related Issues

part of #2215

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff.
  • Public documentation issue/PR created.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@VijayanB
Copy link
Member Author

I am raising directly to 2.x since i am blocked because of lucene codec issue. Will backport this to main once it is fixed.

@VijayanB
Copy link
Member Author

Currently quantization state is not null only for on-disk mode. We don't support in-memory quantization at this moment. Hence, this check is good enough. However if we want to check for on-disk, we have to pass this as parameter and add it to check.

@jmazanec15 @shatejas @Vikasht34 @navneet1v What do you think?

For quantization indices, we don't have to apply building graph check
since it is already faster, this is now only applied for fp32/16 indices
and where threshold is configured.

Signed-off-by: Vijayan Balasubramanian <[email protected]>
@VijayanB VijayanB force-pushed the remove-threshold-for-quants branch from ced2035 to db017b6 Compare January 23, 2025 21:25
@jmazanec15
Copy link
Member

In general, the "mode" is meant to select defaults for other parameters, so it should not be directly used to disable and enable certain features. Instead, it may resolve to a parameter that then makes this decision.

Anyway, in the PR, it appears that you actually disable if quantization is used. I think in general something like this is okay, but might be misleading/confusing to users who set the setting anticipating that graph builds will be skipped.

That being said, is this just a concern of performance, or is it a functional bug? If it is performance related only, Id recommend using mode to resolve a per-field value for skipping graph build. Then, users could override if need be. This would be consistent with current approach around mode.

Copy link
Collaborator

@shatejas shatejas left a comment

Choose a reason for hiding this comment

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

Do we need to update documentation around this?

@VijayanB
Copy link
Member Author

Do we need to update documentation around this?

Yes, i will update that this parameter will be no-hop for lucene, and on-disk

@VijayanB VijayanB merged commit 8d13c74 into opensearch-project:2.x Jan 24, 2025
102 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 24, 2025
For quantization indices, we don't have to apply building graph check
since it is already faster, this is now only applied for fp32/16 indices
and where threshold is configured.

Signed-off-by: Vijayan Balasubramanian <[email protected]>
(cherry picked from commit 8d13c74)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants