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.

# Uncomment the following line to override the JVM search sequence
# Uncomment the following line to add additional VM parameters
INSTALL4J_ADD_VM_PARAMS="-server -Xms256m -Xmx2048m -XX:+UseG1GC"

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.

This entry was posted in System Administration, Systems Analysis on by .

About phil

My name is Phil Lembo. In my day job I’m an enterprise IT architect for a leading distribution and services company. The rest of my time I try to maintain a semi-normal family life in the suburbs of Raleigh, NC. E-mail me at philipATlembobrothersDOTcom. The opinions expressed here are entirely my own and not those of my employers, past, present or future (except where I quote others, who will need to accept responsibility for their own rants).