Increase Opensearch JVM HEAP (to solve search delay)

Before you post: Your responses to these questions will help the community help you. Please complete this template if you’re asking a support question.
Don’t forget to select tags to help index your topic!

1. Describe your incident:

I’m trying to increase the JVM Heap of Opensearch, but when I change the values and restart graylog services (graylog-server and graylog-datanode), the heap value back to default Xms1g and Xmx1g.
I’m change the JVM heap values on /var/lib/graylog-datanode/opensearch/config/opensearch/jvm.options file.

Obs: I had change the JVM heap from graylog-server and graylog-datanode and works fine, but for opensearch the values changed go back to the default values.

Captura de Tela 2025-04-09 às 13.48.23

2. Describe your environment:

  • OS Information: Ubuntu Server 22.04

  • Package Version:
    Graylog-server Community Edition 6.1.10
    Datanode version: 6.1.5

  • Service logs, configurations, and environment variables:

3. What steps have you already taken to try and solve the problem?

I 'm trying increase the JVM Heap but when I restart graylog services, the default values goes back.

4. How can the community help?

I would like to know how can I change the opensearch jvm heap values and this values doesn’t back to default values.

Thanks a lot for your help!

Helpful Posting Tips: Tips for Posting Questions that Get Answers [Hold down CTRL and link on link to open tips documents in a separate tab]

Its controlled from the datanode.config file with opensearch_heap Data Node Configuration

If you put it manually in the jvm file it will be overwritten.

Hi, @Joel_Duffield, thanks for your help.

So, I’m changing the JVM Heap into the same dir that pointed in datanode config file. How can I increase this Xms and Xmx values without replaced by datanode service?

No it is just a setting in the datanode.config file that you set, you don’t need to do anything with the JVM file.

Should I put OPENSEARCH_JAVA_OPTS=“-Xms4g -Xmx5g” in datanode config file or only -Xms4g -Xmx5g parameters?

Thanks for your reply.

No look at the link I posted to the docs site, I believe you just put “4g” etc

Hi, @Joel_Duffield!

Thanks for ur answer, works fine :smiley:
You’re the best!