1. Describe your incident:
After migrating to Graylog datanode, I’ve tried to set the datanode heap size to 6 GB - as suggested by documentation provided: Data Node Configuration
To my surprise, a warning has been triggered in GUI:
There are data node nodes in the cluster which could potentially run with a higher configured heap size for better performance.
Data node REDACTED only has 1 GB Java Heap assigned, out of a total of 13 GB RAM.
Currently, there is 9 GB free memory available on the node. We recommend to make an additional half of this available to the Java Heap.
Note: For production performance, it is recommended to configure this node to use 6 GB Java Heap (50% of RAM).
The Java Heap can be configured using the opensearch_heap configuration parameter in the node’s configuration file (datanode.conf).
I’ve verified that the parameter is set correctly, also checking ps output:
graylog+ 48423 104 50.6 22093496 7229776 ? Sl 10:21 421:53 /usr/share/graylog-datanode/dist/opensearch-2.15.0-linux-x64/jdk/bin/java -Xshare:auto -Dopensearch.networkaddress.cache.ttl=60 -Dopensearch.networkaddress.cache.negative.ttl=10 -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitStackTraceInFastThrow -XX:+ShowCodeDetailsInExceptionMessages -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dio.netty.allocator.numDirectArenas=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.security.manager=allow -Djava.locale.providers=SPI,COMPAT -Xms1g -Xmx1g -XX:+UseG1GC -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 -Djava.io.tmpdir=/tmp/opensearch-4314876711978476423 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=data -XX:ErrorFile=/tmp/hs_err_pid%p.log -Xlog:gc*,gc+age=trace,safepoint:file=/tmp/gc.log:utctime,pid,tags:filecount=32,filesize=64m -Djava.security.manager=allow -Xms6g -Xmx6g -Dopensearch.transport.cname_in_publish_address=true … (more output follows, not relevant to the issue)
Please note, that -Xms and -Xmx parameters are present twice - once with (default) 1g, and once with (set by me) 6g.
It seems that the warning only takes the first encountered value (1g) into account.
2. Describe your environment:
-
OS Information: Ubuntu 22.04.5 LTS
-
Package Version: graylog-datanode/stable,now 6.3.7-1 amd64
-
Service logs, configurations, and environment variables: Graylog server 6.3.7 + datanode 6.3.7 + MongoDB 7.0 on single VM, opensearch_heap = 6g set in datanode.conf
3. What steps have you already taken to try and solve the problem?
Commenting and/or setting 6g in following files in addition to datanode.conf:
- /etc/graylog/datanode/jvm.options
- /usr/share/graylog-datanode/dist/opensearch-2.15.0-linux-x64/config/jvm.options
Different combinations with service restarts didn’t change the behaviour (in some cases changing the value for the other graylog-datanode process running, but not for OpenSearch)
I’ve also come across this post: https://mybroadband.co.za/forum/threads/i’m-going-mad-graylog.1320773/ but it seems to me that these steps set the values for server, not datanode.
Additionally, I’ve installed a clean instance of this stack on a fresh VM (also Ubuntu 22.04), confirmed the same behaviour, and then upgraded to Graylog 7.0 - again, same issue.
4. How can the community help?
How should I set the heap value correctly? Additionally, how can I verify the actual value used by OpenSearch? (how can I check if it is 1g or 6g in my case? I can ignore the warning if heap is actually set correctly)
Thanks in advance ![]()
Wojciech