eclipse-researchlabs / scava-deployment

This repository contains the Docker configuration files for the deployment of Scava platform
Eclipse Public License 2.0
2 stars 0 forks source link

duplicate parameters in ES command line #11

Closed davidediruscio closed 4 years ago

davidediruscio commented 4 years ago

If I ps aux into the ES container, I see:

    6 esuser    13:57 /opt/jdk/bin/java -Xms1g -Xmx1g -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCM
SInitiatingOccupancyOnly -XX:+AlwaysPreTouch -Xss1m -Djava.awt.headless=true -Dfile.encoding=UTF-8 -Djna.nosys=true -XX:-OmitS
tackTraceInFastThrow -Dio.netty.noUnsafe=true -Dio.netty.noKeySetOptimization=true -Dio.netty.recycler.maxCapacityPerThread=0 
-Dlog4j.shutdownHookEnabled=false -Dlog4j2.disable.jmx=true -Djava.io.tmpdir=/tmp -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDump
Path=data -XX:ErrorFile=logs/hs_err_pid%p.log -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -XX:+P
rintGCApplicationStoppedTime -Xloggc:logs/gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=32 -XX:GCLogFileSize=64m -Xms2g -Xmx2g -Des.path.home=/elasticsearch -Des.path.conf=/elasticsearch/config -Des.distribution.flavor=default -Des.distribution.type=tar -cp /elasticsearch/lib/* org.elasticsearch.bootstrap.Elasticsearch -E network.bind_host=0.0.0.0 -Ehttp.max_content
_length=500mb

Where you can see that Xmx/Xms is mentioned two times. (I wonder which value is taken into account). We need this fixed because we seem to reach a point where we need to raise the memory settings. flag @valeriocos

davidediruscio commented 4 years ago

I found the source of the problem. In the container, there is /elasticsearch/bin/elasticsearch which mentions:

# Optionally, exact memory values can be set using the `ES_JAVA_OPTS`. Note that
# the Xms and Xmx lines in the JVM options file must be commented out. Example
# values are "512m", and "10g".

So in the file /elasticsearch/config/jvm.options , the following options should be commented out as suggested above:

# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space

#-Xms1g
#-Xmx1g
davidediruscio commented 4 years ago

Thank you @mhow2 for pointing this out. The current values of Jvm can be found at: https://scava-dev.ow2.org:9200/_nodes/stats/jvm (e.g., heap_max_in_bytes).

From there, it's possible to see that the params defined at https://github.com/crossminer/scava-deployment/blob/dev/docker-compose.yml#L148 are used (instead of the default ones).

davidediruscio commented 4 years ago

@mhow2 if you are OK with the answer, can we close this issue?

davidediruscio commented 4 years ago

ping @mhow2

mhow2 commented 4 years ago

Yes we can close it. the memory value is well taken into account however notice there is still a duplicate in the command line.