Genesys Engage on-premises

 View Only
Discussion Thread View
  • 1.  GRE Enable GC logs and JVM tunning

    Posted 01-11-2020 11:10
    Hi Community,

    Someone knows the exactly commands to enable in Tomcat server in linux the JVM tunning performance and GC logs:

    JVM performance:

    -server -Xms2G -Xmx2G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=5 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=10

    GC Logs:

    -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=20M -Xloggc:[path to gc log file]

    Because I do not know if I have apply it in a setenv.sh file or in another if it is in that way which can be the commands to set in this files. I have this doubt because this page of Genesys Documentaction is not so clear how to doit.

    Documentation:GRS:Deployment:TuningJVM:9.0.0 - Genesys Documentation
    Genesys remove preview
    Documentation:GRS:Deployment:TuningJVM:9.0.0 - Genesys Documentation
    Use the following parameter settings in Java Virtual Machine (JVM) Garbage Collection (GC) to maximize the performance of GRE and GRAT.
    View this on Genesys >

    If someone can help me I will be very grateful.

    Awaiting for your comments
    #Unsure/Other

    ------------------------------
    Edwin Moreno
    Interaxa S.A.
    ------------------------------


  • 2.  RE: GRE Enable GC logs and JVM tunning

    Posted 01-13-2020 17:55
    To give more information about the issue, the Tomcat server started with a TomcatStarter  and I have a TomcatStarter.ini file.

    This is the parametros of startup of the application object to start the Tomcat Server:

    Working Directory: /opt/genesys/apache-tomcat-gre/bin
    Command Line: ./TomcatStarter
    Command Line Arguments: -host plpicestapp57 -port 2025 -app est_gre_webserver_02 start

    And here is a extract  of the file TomcatStarter.ini :
    [x300106@plpicestapp87 bin]$ cat TomcatStarter.ini
    [Service]
    AppTitle="est_gre_webserver_02"
    AppVersion=7.0.84
    MainClass=org/apache/catalina/startup/Bootstrap
    JVMPath=/usr/java/jre1.8.0_162/lib/amd64/server/libjvm.so
    EventHandlerMethod=ShutdownSignal

    [JavaArgs]
    -Djava.util.logging.config.file=/opt/genesys/apache-tomcat-gre/conf/logging.prop erties
    -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
    -Djdk.tls.ephemeralDHKeySize=2048
    -Dignore.endorsed.dirs=
    -classpath /opt/genesys/apache-tomcat-gre/bin/bootstrap.jar:/opt/genesys/apache- tomcat-gre/bin/tomcat-juli.jar
    -Dcatalina.base=/opt/genesys/apache-tomcat-gre
    -Dcatalina.home=/opt/genesys/apache-tomcat-gre
    -Djava.io.tmpdir=/opt/genesys/apache-tomcat-gre/temp
    [Djava.class.path]
    ./bootstrap.jar
    ./commons-daemon.jar
    ./tomcat-juli.jar
    ../lib/annotations-api.jar
    ../lib/catalina-ant.jar
    ../lib/catalina-ha.jar
    ../lib/catalina.jar
    ../lib/catalina-tribes.jar
    ../lib/ecj-4.4.2.jar
    ../lib/el-api.jar
    ../lib/jasper-el.jar
    ../lib/jasper.jar
    ../lib/jsp-api.jar
    ../lib/ojdbc8.jar
    ../lib/servlet-api.jar
    ../lib/tomcat7-websocket.jar
    ../lib/tomcat-api.jar
    ../lib/tomcat-coyote.jar
    ../lib/tomcat-dbcp.jar
    ../lib/tomcat-i18n-es.jar
    ../lib/tomcat-i18n-fr.jar
    ../lib/tomcat-i18n-ja.jar
    ../lib/tomcat-jdbc.jar
    ../lib/tomcat-util.jar
    ../lib/websocket-api.jar

    I Will be grateful if you can give me a help.

    ------------------------------
    Edwin Moreno
    Interaxa S.A.
    ------------------------------



  • 3.  RE: GRE Enable GC logs and JVM tunning

    Posted 01-14-2020 09:45

    Edwin,

    You define the JVM Options inside of setenv.sh like this:

    jvm_options="-server -Xms2g -Xmx2g -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=5 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=10"

    You define the GC parameters inside of setenv.sh like this:

    export CATALINA_OPTS=" \
    -XX:+PrintGCDetails \
    -XX:+PrintGCDateStamps \
    -XX:+UseGCLogFileRotation \
    -XX:NumberOfGCLogFiles=5 \
    -XX:GCLogFileSize=20M \
    -Xloggc:[path to gc log file]"

    More documentation for Tomcat tuning can be found at https://tomcat.apache.org/tomcat-9.0-doc/RUNNING.txt

    https://tomcat.apache.org/tomcat-9.0-doc/RUNNING.txt
    Apache remove preview
    View this on Apache >


    Thank you,
    -Ivan



    ------------------------------
    Ivan Ullmann
    Eventus Solutions Group
    ------------------------------



  • 4.  RE: GRE Enable GC logs and JVM tunning

    Posted 01-14-2020 10:06
    Hi Ivan thanks for your response is very correct your statenment but This instance of GRE/tomcat is deployed with the files TomcatStarter y TomcatStater.ini this files bypasses the files startup.sh,catalina.sh and setenv.sh of Tomcat.

    For that reason We need to know how to configure theses parameters in the TomcatStarter.ini this is a link in the KB of Genesys that talks about this type of deploy:
    https://genesyspartner.force.com/customercare/pkb_Home?id=kA00B000000DuH7SAK&l=en_US&fs=Search&pn=1

    If you have information how to setup this . it will be welcome.

    Regards

    ------------------------------
    Edwin Moreno
    Interaxa S.A.
    ------------------------------



  • 5.  RE: GRE Enable GC logs and JVM tunning

    Posted 01-14-2020 15:45
    Edwin,

    According to the documentation I read, here is the following pertinent snippet:

    • The TomcatStarter.ini file contains the java parameters so future changes to Tomcat parameters must be made in this .ini file. This includes setting up Java memory, GC settings etc.
    So to make the changes you were requesting would be like so:

    [JavaArgs] section - add any additional arguments that need to be passed to java
    Note: To determine this value, Tomcat can be started via the regular startup.sh and using ps -ef  you can get the full list of arguments needed.

    [JavaArgs]
    -Xms2g
    -Xmx2g
    -XX:+UseG1GC -XX:MaxGCPauseMillis=200
    -XX:ParallelGCThreads=5
    -XX:ConcGCThreads=5
    -XX:InitiatingHeapOccupancyPercent=10
    -XX:+PrintGCDetails
    -XX:+PrintGCDateStamps
    -XX:+UseGCLogFileRotation
    -XX:NumberOfGCLogFiles=5
    -XX:GCLogFileSize=20M
    -Xloggc:[path to gc log file]"

    ------------------------------
    Ivan Ullmann
    Eventus Solutions Group
    ------------------------------



  • 6.  RE: GRE Enable GC logs and JVM tunning

    Posted 01-14-2020 19:29
      |   view attached
    Hi Ivan thanks again for your answer, I am going to upload the TomcatStarter.ini after changes done and the logs file of the TomcatStarter with error obtained in the log TomcatStarter_20200114_160639_001.log after restarted the Tomcat Server :

    16:06:40: Setting service_synchronize_state = SCS_APP_STATUS_INITIALIZING
    16:06:40: Loaded JVM library: /usr/java/jre1.8.0_162/lib/amd64/server/libjvm.so
    16:06:40: Error: Could not create JVM: jvm_args.version = JNI_VERSION_1_6, ignoreUnrecognized = TRUE
    16:06:40: Shutdown started, calling g_shutdown() ...
    16:06:40: Starting application shutdown
    16:06:40: Setting service_synchronize_state = SCS_APP_STATUS_STOP_PENDING
    16:06:40: Error: JVM was not initialized or was already stopped

    If you have some new idea will be welcome.

    ------------------------------
    Edwin Moreno
    Interaxa S.A.
    ------------------------------

    Attachment(s)



  • 7.  RE: GRE Enable GC logs and JVM tunning

    Posted 01-14-2020 19:55
    Hi Ivan,

    I have uploaded the procedure that you recommended in your las post and this is the results:

    ps -ef | grep java

    root 10477 1 9 21:36 pts/2 00:00:07 java -Djava.util.logging.config.file=/opt/genesys/apache-tomcat-gre/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -server -Xms2G -Xmx2G -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=5 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=10 -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCApplicationStoppedTime -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=20M -Xloggc:/opt/genesys/apache-tomcat-gre/bin/logs/GClogs/ -Djdk.tls.ephemeralDHKeySize=2048 -Dignore.endorsed.dirs= -classpath /opt/genesys/apache-tomcat-gre/bin/bootstrap.jar:/opt/genesys/apache-tomcat-gre/bin/tomcat-juli.jar -Dcatalina.base=/opt/genesys/apache-tomcat-gre -Dcatalina.home=/opt/genesys/apache-tomcat-gre -Djava.io.tmpdir=/opt/genesys/apache-tomcat-gre/temp org.apache.catalina.startup.Bootstrap start
    root 10708 10144 0 21:37 pts/2 00:00:00 grep --color=auto java

    Based in this output of the command this must be way in tha  parameters I have to add to the TomcatStarter.ini:

    [Service]
    AppTitle="est_gre_webserver_02"
    AppVersion=7.0.84
    MainClass=org/apache/catalina/startup/Bootstrap
    JVMPath=/usr/java/jre1.8.0_162/lib/amd64/server/libjvm.so
    EventHandlerMethod=ShutdownSignal

    [JavaArgs]
    -Djava.util.logging.config.file=/opt/genesys/apache-tomcat-gre/conf/logging.properties
    -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
    -server
    -Xms2G
    -Xmx2G
    -XX:+UseG1GC
    -XX:MaxGCPauseMillis=200
    -XX:ParallelGCThreads=5
    -XX:ConcGCThreads=5
    -XX:InitiatingHeapOccupancyPercent=10
    -XX:+PrintGCDetails -XX:+PrintGCDateStamps
    -XX:+PrintTenuringDistribution
    -XX:+PrintGCApplicationConcurrentTime
    -XX:+PrintGCApplicationStoppedTime
    -XX:+UseGCLogFileRotation
    -XX:NumberOfGCLogFiles=5
    -XX:GCLogFileSize=20M
    -Xloggc:/opt/genesys/apache-tomcat-gre/bin/logs/GClogs/
    -Djdk.tls.ephemeralDHKeySize=2048
    -Dignore.endorsed.dirs=
    -classpath /opt/genesys/apache-tomcat-gre/bin/bootstrap.jar:/opt/genesys/apache-tomcat-gre/bin/tomcat-juli.jar
    -Dcatalina.base=/opt/genesys/apache-tomcat-gre
    -Dcatalina.home=/opt/genesys/apache-tomcat-gre
    -Djava.io.tmpdir=/opt/genesys/apache-tomcat-gre/temp

    [Djava.class.path]
    ./bootstrap.jar
    ./commons-daemon.jar
    ./tomcat-juli.jar
    ../lib/annotations-api.jar
    ../lib/catalina-ant.jar
    ../lib/catalina-ha.jar
    ../lib/catalina.jar
    ../lib/catalina-tribes.jar
    ../lib/ecj-4.4.2.jar
    ../lib/el-api.jar
    ../lib/jasper-el.jar
    ../lib/jasper.jar
    ../lib/jsp-api.jar
    ../lib/ojdbc8.jar
    ../lib/servlet-api.jar
    ../lib/tomcat7-websocket.jar
    ../lib/tomcat-api.jar
    ../lib/tomcat-coyote.jar
    ../lib/tomcat-dbcp.jar
    ../lib/tomcat-i18n-es.jar
    ../lib/tomcat-i18n-fr.jar
    ../lib/tomcat-i18n-ja.jar
    ../lib/tomcat-jdbc.jar
    ../lib/tomcat-util.jar
    ../lib/websocket-api.jar

    Please let me know if this looks good.

    Regards

    ------------------------------
    Edwin Moreno
    Interaxa S.A.
    ------------------------------



  • 8.  RE: GRE Enable GC logs and JVM tunning

    Posted 01-15-2020 09:10
    Edwin,

    Try your changes and see if they meet with your needs.  If not, I'm afraid I will have to refer you to customer care for further assistance.

    Thank you,
    -Ivan

    ------------------------------
    Ivan Ullmann
    Eventus Solutions Group
    ------------------------------



  • 9.  RE: GRE Enable GC logs and JVM tunning
    Best Answer

    Posted 01-15-2020 14:34
      |   view attached
    Hi Ivan.

    I have good news about this topic, I could get successful results doing the next configurations in the TomcatStarter.ini file:
    Specifically the changes that I have t do was set the letter G in lower case as you can see in bold bellow.
    [Service]
    AppTitle="est_gre_webserver_02"
    AppVersion=7.0.84
    MainClass=org/apache/catalina/startup/Bootstrap
    JVMPath=/usr/java/jre1.8.0_162/lib/amd64/server/libjvm.so
    EventHandlerMethod=ShutdownSignal

    [JavaArgs]
    -server
    -Xms1g
    -Xmx1g
    -XX:+UseG1GC
    -XX:MaxGCPauseMillis=200
    -XX:ParallelGCThreads=5
    -XX:ConcGCThreads=5
    -XX:InitiatingHeapOccupancyPercent=10
    -XX:+PrintGCDetails
    -XX:+PrintGCDateStamps
    -XX:+PrintTenuringDistribution
    -XX:+PrintGCApplicationConcurrentTime
    -XX:+PrintGCApplicationStoppedTime
    -XX:+UseGCLogFileRotation
    -XX:NumberOfGCLogFiles=5
    -XX:GCLogFileSize=20M
    -Xloggc:/opt/genesys/apache-tomcat-gre/bin/logs/gc_log
    -Djava.util.logging.config.file=/opt/genesys/apache-tomcat-gre/conf/logging.properties
    -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
    -Djdk.tls.ephemeralDHKeySize=2048
    -Dignore.endorsed.dirs=
    -classpath /opt/genesys/apache-tomcat-gre/bin/bootstrap.jar:/opt/genesys/apache-tomcat-gre/bin/tomcat-juli.jar
    -Dcatalina.base=/opt/genesys/apache-tomcat-gre
    -Dcatalina.home=/opt/genesys/apache-tomcat-gre
    -Djava.io.tmpdir=/opt/genesys/apache-tomcat-gre/temp

    [Djava.class.path]
    ./bootstrap.jar
    ./commons-daemon.jar
    ./tomcat-juli.jar
    ../lib/annotations-api.jar
    ../lib/catalina-ant.jar
    ../lib/catalina-ha.jar
    ../lib/catalina.jar
    ../lib/catalina-tribes.jar
    ../lib/ecj-4.4.2.jar
    ../lib/el-api.jar
    ../lib/jasper-el.jar
    ../lib/jasper.jar
    ../lib/jsp-api.jar
    ../lib/ojdbc8.jar
    ../lib/servlet-api.jar
    ../lib/tomcat7-websocket.jar
    ../lib/tomcat-api.jar
    ../lib/tomcat-coyote.jar
    ../lib/tomcat-dbcp.jar
    ../lib/tomcat-i18n-es.jar
    ../lib/tomcat-i18n-fr.jar
    ../lib/tomcat-i18n-ja.jar
    ../lib/tomcat-jdbc.jar
    ../lib/tomcat-util.jar
    ../lib/websocket-api.jar

    We could confirm this result executing the command jps -v in its output.

    [root@plpicestapp87 logs]# jps -v
    22728 -server -Xms1g -Xmx1g -XX:+UseG1GC -XX:MaxGCPauseMillis=200 -XX:ParallelGCThreads=5 -XX:ConcGCThreads=5 -XX:InitiatingHeapOccupancyPercent=10 -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationConcurrentTime -XX:+PrintGCApplicationStoppedTime -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=20M -Xloggc:/opt/genesys/apache-tomcat-gre/bin/logs/gc_log -Djava.util.logging.config.file=/opt/genesys/apache-tomcat-gre/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djdk.tls.ephemeralDHKeySize=2048 -Dignore.endorsed.dirs= -classpath /opt/genesys/apache-tomcat-gre/bin/bootstrap.jar:/opt/genesys/apache-tomcat-gre/bin/tomcat-juli.jar -Dcatalina.base=/opt/genesys/apache-tomcat-gre -Dcatalina.home=/opt/genesys/apache-tomcat-gre -Djava.io.tmpdir=/opt/genesys/apache-tomcat-gre/temp -agentpath:/opt/dynatrace/oneagent/agent/lib64/liboneagentloader.so

    And in the we page management of tomcat we can confirm the changes applied you can see it in the attach file.

    Thanks Ivan for your response and your help.

    Regards



    ------------------------------
    Edwin Moreno
    Interaxa S.A.
    ------------------------------



Need Help finding something?

Check out the Genesys Knowledge Network - your all-in-one access point for Genesys resources