JVM Configuration and Tuning

Recommended Core Settings

JVM Logging Options

The JVM can be configured to log details about garbage collection and classloading that may be helpful when analyzing portal performance.

# GC Logging
-verbose:gc
-XX:+PrintGCTimeStamps
-XX:+PrintGCDetails
-XX:+PrintTenuringDistribution
-XX:+PrintAdaptiveSizePolicy
-XX:AdaptiveSizePolicyOutputInterval=1
-Xloggc:/my/up/logs/gc.log

# Classloading Logging
-verbose:class

JVM Monitoring Options

# Enable JMX Remote Monitoring
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.password.file=/my/password
-Dcom.sun.management.jmxremote.access.file=/my/access

JVM Debugging Options

# Debuging
-Xdebug
-Xrunjdwp:transport=dt_socket,address=7000,server=y,suspend=n

Preventing bad TCP Connections From Hanging Threads

To insure a bad network connection (open with no response or read with no response) for TCP or HTTP connections from uPortal to other systems does not hang the thread waiting for an infinite timeout, you can set global Connection Timeout and Socket Timeout values for the particular JVM you are using.  If you are using the Sun/Oracle JVM, set the following properties (from http://docs.oracle.com/javase/7/docs/technotes/guides/net/properties.html):

# Set timeout values to something long (especially the ReadTimeout where you may wait on a long SQL or WebServices response) 
# to insure a thread doesn't wait indefinitely on a bad network connection.
-Dsun.net.client.defaultConnectTimeout=20000 -Dsun.net.client.defaultReadTimeout=240000

Having problems with these instructions?

Please send us feedback at uportal-user@lists.ja-sig.org

Add Feedback content box here.....