-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Performance] Performance of main branch is worse compared to 2.x #9866
Comments
@bharath-techie thanks a lot for raising that, I saw you've added |
Hi @reta , uploading couple of heap dumps ^ |
@reta -- I'm wondering if it's because OpenSearch/client/rest/src/main/java/org/opensearch/client/nio/HeapBufferedAsyncEntityConsumer.java Line 91 in b90a888
I think that buffer should be allocated as e.g. 1kB or 10kB be allowed to grow to 100MB. |
The good news is that Its expand behavior either jumps straight to the target size or doubles the size of the buffer (whichever is bigger):
|
Describe the bug
We started experiencing OOM in asynchronous search repository 'main' branch for 'Submit asynchronous search' concurrent tests which spawns 50 threads and performs 'Submit asynchronous search' API call.
The tests run in 512 mb of heap.
Test details:
Rest test case which calls submit async search API.
"org.opensearch.search.asynchronous.restIT.AsynchronousSearchSettingsIT.testMaxRunningAsynchronousSearchContexts"
In OpenSearch repository , I created a similar rest test which runs for Search API 50 times concurrently. And also changed the test heap size to 512 mb , to make it par with async search and any tests' default settings. ( opensearch tests runs in 3G heap)
In 2.x , even with 300 MB of max heap I'm able to run the test.
But in main branch the test fails with OOM even with 512 mb of max heap.
I need to allocate around 1GB of heap to run the same test in 'main' branch.
So performance of 'main' branch of OpenSearch seems to be worse than '2.x'.
To Reproduce
Steps to reproduce the behavior:
"./gradlew :client:rest-high-level:integTest --tests "org.opensearch.client.PitIT.testMaxRunningSearches -Dtest.heaps.size=1G"
Expected behavior
The 'main' branch and '2.x' branch should have similar performance.
Plugins
Rest high level client tests - so no plugins are enabled
Screenshots
If applicable, add screenshots to help explain your problem.
Host/Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: