JVM settings seem to be ignored #651
-
I am using configuration for my nodepools to set the JVM heap to use 2 gigs of memory but that seems to be ignored. 98 org.opensearch.bootstrap.OpenSearch -Enetwork.publish_host=opensearch-cluster-master-1 -Ecluster.initial_master_nodes=opensearch-cluster-bootstrap-0 -Ecluster.name=opensearch-cluster -Ehttp.port=9200 -Ediscovery.seed_hosts=opensearch-cluster-discovery -Enetwork.bind_host=0.0.0.0 -Enode.roles=cluster_manager,data,remote_cluster_client,ingest -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.locale.providers=SPI,COMPAT -Xms1g -Xmx1g -XX:+UseG1GC -XX:G1ReservePercent=25 -XX:InitiatingHeapOccupancyPercent=30 -Djava.io.tmpdir=/tmp/opensearch-13888664803975905135 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=data -XX:ErrorFile=logs/hs_err_pid%p.log -Xlog:gc*,gc+age=trace,safepoint:file=logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m -Dclk.tck=100 -Djdk.attach.allowAttachSelf=true -Djava.security.policy=/usr/share/opensearch/config/opensearch-performance-analyzer/opensearch_security.policy --add-opens=jdk.attach/sun.tools.a |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @mrvdcsg. How are you checking the heap? |
Beta Was this translation helpful? Give feedback.
Hi @mrvdcsg. How are you checking the heap?
When trying to reproduce this I found that the log that prints the list of JVM arguments has some defaults for
Xms
andXmx
in the list but near the end were the correct overrides I put in.Also checking with
curl -k -u admin:admin https://localhost:9200/_nodes/jvm?pretty | grep heap_max_in_bytes
showed the correct heap after the cluster was bootstrapped (note the bootstrap pod has a different heap configuration).