At a docker-compose for an ELK stack, I have set up ES like this:
elasticsearch:
image: elasticsearch:latest
command: elasticsearch
environment:
- "ES_JAVA_OPTS=-Xms3g -Xmx3g"
volumes:
- ./elasticsearch/storage:/usr/share/elasticsearch/data
ports:
- "9200:9200"
- "9300:9300"
But, when running docket top es-container, I'm still seeing heap size as 2g (from jvm.options file inside the container) and after that, the 3g I set:
UID PID PPID C STIME TTY TIME CMD
102 17420 17403 21 00:00 ? 03:00:18 /docker-java-home/jre/bin/java -Xms2g -Xmx2g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+AlwaysPreTouch -server -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -Djdk.io.permissionsUseCanonicalPath=true -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 -Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Dlog4j.skipJansi=true -XX:+HeapDumpOnOutOfMemoryError -Xms3g -Xmx3g -Des.path.home=/usr/share/elasticsearch -cp /usr/share/elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch
Is it taking 2g or 3g? I don't have ps, top or some tools like that at the es container, I'm using the latest image BTW.
Thanks