Skip to content

[Performance] Performance of main branch is worse compared to 2.x #9866

@bharath-techie

Description

@bharath-techie

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:

  1. https://github.com/bharath-techie/OpenSearch/pull/15/files - I have the changes in this PR to run search 50 times in 512 mb of heap.
  2. Run in 2.x - it passes
  3. Run in main - it fails
  4. Keep increasing the heap in main to find the limit at which the test passes
  5. Keep decreasing the heap in 2.x to find the limit at which the test fails

"./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):

  • OS: [e.g. iOS]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv3.0.0Issues and PRs related to version 3.0.0

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions