20131218 openfire java opts - plembo/onemoretech GitHub Wiki

title: openfire java opts link: https://onemoretech.wordpress.com/2013/12/18/openfire-java-opts/ author: phil2nc description: post_id: 6816 created: 2013/12/18 16:39:31 created_gmt: 2013/12/18 21:39:31 comment_status: closed post_name: openfire-java-opts status: publish post_type: post

openfire java opts

Always learning more about Openfire. Here are my current optional Java parameters. Openfire is still my favorite XMPP server platform. The following configuration should serve for a moderately trafficked service: These are set in $OPENFIRE_HOME/bin/openfire. [code language="bash"] # Uncomment the following line to override the JVM search sequence INSTALL4J_JAVA_HOME=/usr/lib/jvm/java # Uncomment the following line to add additional VM parameters OPENFIRE_HOME=/opt/openfire INSTALL4J_ADD_VM_PARAMS="-server -Xms256m -Xmx2048m -XX:+UseG1GC -Dcom.sun.management.jmxremote" [/code] Two important points about the above: (1) the "INSTALL4J" part comes from the program used to compile the service on Windows; (2) The VM_PARAMS include turning on the Garbage-First Garbage Collector (G1GC), which may be the most significant measure you can take to control memory leaks and generally tighten up memory management for any Java application. Oracle says that G1GC is fully supported with Java 7, but it has been available as an experimental option since JDK 1.6.0_20. Opinion on the fora differs as to its suitability for production with Java 6. For me the security issues raised by the EOL of Java 6 in September of this year made it a moot point. I upgraded everything to 7 before implementing G1GC.

Copyright 2004-2019 Phil Lembo