-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[META]: SIMD adoption in OpenSearch #9423
Comments
@heemin32 I think we would be looking into switching main / 2.x to JDK-21 (due Sep 19th) since JDK-20 is not LTS (or whatever the supported long time release means) |
@vamshin JDK-21 GA date is 19th of Sep. OpenSearch code freeze date for 2.10.0 is 5th of Sep. That mean, we might not be able to enable SIMD for OpenSearch 2.10.0. |
To note here, bundled JDK for 2.10.0 would still be JDK-17 but users could try to use JDK-20 instead at your own risks (although we have not run 2.x on JDK-20 yet it should work out of the box). |
@reta do you see issues if we bundle jdk-20 by default in 2.10 to take advantage of SIMD out of box for k-NN users? It would go through all the regular tests we do for the release |
yes, there are at least 3 issues here:
Primarily I think the efforts should be spent on JDK-21 taking into account it is weeks away (not months or years) |
@reta thanks for the details. Looks like we will have to push to 2.11 then |
@heemin32 I have repurposed this issue to discuss/explore the generic usage of SIMD in OpenSearch and added KNN related tasks as sub points in description. Let me know if you have any concerns or I am missing anything here |
Have done more testing regarding k-nn feature and result is available in opensearch-project/k-NN#1062 |
Another use-case in the date_histogram aggregation I've been exploring: #10392 |
@heemin32 would it be possible to run with JDK21 and update the numbers here, since JDK21 has LTS ? That'll help us prioritize this. |
Have no bandwidth as of now but will try to get the result with JDK21. |
note that the Vector API is still incubating in JDK 22: https://openjdk.org/jeps/460. Looks like potential minor revs in the API. Would we keep this off by default even when it is out of incubation or will it be safe to turn on once out of incubation? I think the Vector API itself determines what to do with or without SIMD present on the processor. |
Apache Lucene has Vector API support so having it on by default has benefits. |
100%; still wanted to call out the slight risk that the Vector API is incubating. I do know and get that Lucene is accepting that risk so we are, too... |
Is your feature request related to a problem? Please describe.
Lucene 9.7.0 introduced new incubating vector APIs from Java 20 which utilize SIMD hardware in x86 AVX2 or later, and ARM NEON platforms. The feature is disabled by default. For a OpenSearch user to enable the feature, the user should pass a command line parameter during launch time. Also, OpenSearch should be running using jdk 20 or 21. To take advantage of SIMD optimization we will need OpenSearch to first run with JDK-21 by default and with SIMD modules enabled. This issue is to track items needed for SIMD enablement and potential area of improvements.
Additional context
--add-modules jdk.incubator.vector
is already present in config/jvm.options formain
, needs backport to2.x
)K-NN performance comparison (https://github.com/opensearch-project/k-NN/tree/main/benchmarks/perf-tool)
The text was updated successfully, but these errors were encountered: