Java Parameters for Xms and Xmx

997 views
Skip to first unread message

Porteous, Todd

unread,
Nov 2, 2016, 6:24:27 PM11/2/16
to Matterhorn Users

Hey Guys,

 

I have a system with 32GB of Ram and I’m trying to figure out the best tuning for Java. My Java system locks up at least once a day and have to restart Matterhorn service. I’m currently running 1.5.1 and have the following Java Opts.  Ie 10GB heap Size with process starting off at 6GB.

 

JAVA_OPTS="-Xms6144m -Xmx10240m -XX:MaxPermSize=2048m"

 

What do you all use or recommend?

 

Todd

Mikey Orr

unread,
Nov 7, 2016, 3:02:25 PM11/7/16
to us...@opencast.org, Matterhorn Users
Hey Todd-

We use the defaults (-Xms1g -Xmx1g -XX:MaxPermSize=256m) on all of our nodes, except for our player/engage node, which gets "-Xms10g -Xmx10g -XX:MaxPermSize=256m". For some reason, our player node needs a lot of memory. You might want to start with a higher number and then watch the java process with JMX to see how much memory it actually uses. Even with 10g for our player node, it seems to hover around 4 to 6g and periodically flush itself back down to 2g. Here's our monitoring graph over the last 12 days:

daily graph

You can use the 'jconsole' command to monitor Matterhorn's RAM usage. I think JMX is enabled by default (it seemed to be for me), but check for a "JMX" variable in your /usr/sbin/matterhorn script. Mine looks like this:

JMX="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=1099 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"

Restart matterhorn if JMX wasn't enable. After that, you can type in 'jconsole localhost:1099' on the host to pull up a nice GUI tool to monitor everything. More information about JConsole can be found here: https://docs.oracle.com/javase/8/docs/technotes/guides/management/jconsole.html

Hope that helps! =)

-Mikey



--
You received this message because you are subscribed to the Google Groups "Opencast Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to users+un...@opencast.org.



--
Mikey Orr
Learning Technologies Mac/Unix Systems Integrator
ITS @ University of California, Santa Cruz
Reply all
Reply to author
Forward
0 new messages